The Following User Says Thank You to jsiren For This Useful Post: | ||
|
2013-12-17
, 22:23
|
Posts: 64 |
Thanked: 69 times |
Joined on Dec 2013
@ Joensuu, Finland
|
#2
|
|
2013-12-18
, 22:34
|
Posts: 9 |
Thanked: 11 times |
Joined on Apr 2009
|
#3
|
DisablePlugins = networkin /etc/bluetooth/main.conf on the telephone, and then starting pand with the appropriate options on both sides (phone and laptop)
The Following 3 Users Say Thank You to hlub For This Useful Post: | ||
|
2013-12-19
, 22:07
|
Posts: 64 |
Thanked: 69 times |
Joined on Dec 2013
@ Joensuu, Finland
|
#4
|
I was able to set up a PAN between my laptop and my Jolla phone only after uncommentingDisablePlugins = networkin /etc/bluetooth/main.conf on the telephone, and then starting pand with the appropriate options on both sides (phone and laptop)
I can now ssh into the phone over the bluetooth link.
|
2013-12-19
, 23:43
|
Posts: 9 |
Thanked: 11 times |
Joined on Apr 2009
|
#5
|
|
2013-12-20
, 00:24
|
Posts: 64 |
Thanked: 69 times |
Joined on Dec 2013
@ Joensuu, Finland
|
#6
|
Ah, that was it. Thank you very much. I didn't realize it had to be disabled.
Edit: So for future reference, here's what I did:
in /etc/bluetoot/master.conf add line
DisablePlugins = network
After rebooting I ran these commands (as root)
echo 1 > /proc/sys/net/ipv4/ip_forward
pand --listen --role NAP --master
/sbin/iptables -t nat -A POSTROUTING -o rmnet0 -j MASQUERADE
/sbin/iptables -A FORWARD -i bnep0 -o rmnet0 -j ACCEPT
/sbin/iptables -A FORWARD -i rmnet0 -o bnep0 -m state --state RELATED,ESTABLISHED -j ACCEPT
(add iptables rules as you see fit, these are the bare minimum to communicate from BtPAN to mobile data)
Once the connection was successful, since there was no DHCP server that I knew of, I just configured the interface manually:
ifconfig bnep0 address broadcast broadcast netmask netmask
ifconfig bnep0 up
At the Mac end I gave a static address, and voilą - I was tethered.
Of course these commands should be scripted and wrapped into a nice UI, and DHCP might be nice to reduce the need of configuration at the other end, but there's no technical obstacle to any of this.
The Following User Says Thank You to jsiren For This Useful Post: | ||
|
2013-12-20
, 00:34
|
Posts: 64 |
Thanked: 69 times |
Joined on Dec 2013
@ Joensuu, Finland
|
#7
|
Tags |
bluetooth, configuration, connectivity, jolla phone |
|
I looked around the Jolla operating system and figured out that it should be possible to share the network connection through Bluetooth, specifically my laptop running OS X Mavericks.
Now, my first step was to simply start pand --listen --role NAP --master and see if the laptop would connect its Bluetooth PAN profile. I had to delete and reassociate the Jolla, only then was it shown as a PAN device (Mavericks no longer has a button to rescan the Bluetooth profile, although there may be a utility for the purpose in XCode).
Then I assigned a fixed IP address (private, off the top of my head, not in use anywhere in the nearby networks) to the Bt PAN interface on the laptop, after which its status changed to "Connected". What this means is something of a mystery, however, as there was no outward route from the laptop, and there was no obvious interface at either end to create it to.
(Of course I could just route 3G to WiFi with iptables, provided this thing knows how to make an ad-hoc network, but where's the fun in that? )
Helpful advice is welcome. If the Jolla 1/2014 update introduces a WiFi or Bluetooth sharing function, I'll be very happy indeed
The next step would be to find out how to get the two devices talking to each other over Bt, the rest is trivial