I'm not so sure... there's a topic here regarding using bluetooth for internet sharing, but 1) It's Android specific, and 2) It relies on newer Android versions that have support for Internet Sharing over Bluetooth, which I gather is not the same as simply connecting to a local network via IP address. I'll give it a try tonight with VX ConnectBot, my Android SSH client-of-choice. Technically I would think it's possible using the rfcomm profile, but might need some programming on the client, which is beyond me.jamesh wrote:I would expect that the bluetooth connection would just appear as a network connection
Yes, have successfully created the bnep devices on both ends, and bridged the Pi-side bnep0 device to the Pi's eth0 or wlan0 device for internet access (tethering).DougieLawson wrote:Are you running bnep? You need that (on both ends) to encapsulate ethernet within bluetooth.
http://blog.kugelfish.com/2012/10/look- ... tooth.html

If you can connect to your RPi and the RPi is connected to the outside world via your gateway/router then with a bit of bridging between connections you can route traffic from one interface to another.Douglas6 wrote:I couldn't access any other IPs on the local network. I know squat about networking, so this may well be surmountable.
Is it? What shows up from ifconfig -a?Douglas6 wrote:Yeah, BT is different.
Code: Select all
$ ifconfig -a
bnep0 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx
inet6 addr: fe80::202:72ff:fedd:bb3b/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:839 errors:0 dropped:0 overruns:0 frame:0
TX packets:933 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:141226 (137.9 KiB) TX bytes:384122 (375.1 KiB)
br0 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx
inet addr:192.168.1.80 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::ba27:ebff:feed:9452/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3569 errors:0 dropped:0 overruns:0 frame:0
TX packets:423 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:418493 (408.6 KiB) TX bytes:47708 (46.5 KiB)
eth0 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:10046 errors:0 dropped:0 overruns:0 frame:0
TX packets:4300 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3163742 (3.0 MiB) TX bytes:649478 (634.2 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Code: Select all
$ brctl show
bridge name bridge id STP enabled interfaces
br0 8000.000272ddbb3b no bnep0
eth0
Hey Douglas, just wondering, when you ssh to your pi via bluetooth, did either your android phone or pi have internet connection? I have been reading about PAN and I havent found a solid answer to whether or not you can ssh via bluetooth without any internet connection on either device. ThanksDouglas6 wrote:Well, whaddaya know. I was able to simply SSH to my Pi via Bluetooth using the Android VX ConnectBot client (on a Nexus 4 running KitKat 4.4.2). The Pi was acting as a Bluetooth Network Access Point, ala some scripts I hacked together that are available at https://github.com/Douglas6/pinaple. Something similar (but better) is available from ykasidit at https://github.com/ykasidit/ecodroidlink. See the full story on this topic.
I couldn't access any other IPs on the local network. I know squat about networking, so this may well be surmountable.
I know, I know, it's not real if it's not on YouTube, but all I have is this screen shot:
In that test the phone definitely did not have Internet, both mobile data and Wifi were turned off. In fact it seems like my phone (Nexus 4) will not connect over Bluetooth if Wifi is available. The Pi was connected to the router, connected to the Internet. You wouldn't think that would matter; but it might, since the point of the phone's BT network connection is Internet sharing. I'll give it a try when I can with the Ethernet on the Pi yanked as well.HashNinja wrote:Hey Douglas, just wondering, when you ssh to your pi via bluetooth, did either your android phone or pi have internet connection? I have been reading about PAN and I havent found a solid answer to whether or not you can ssh via bluetooth without any internet connection on either device. Thanks
Code: Select all
auto lo
iface lo inet loopback
auto br0
iface br0 inet dhcp
bridge-ports eth0
bridge_fd 5Code: Select all
File "test-nap.py", line 9, in <module>
import bluezutils
ImportError: No module named bluezutils
Code: Select all
Making Bluetooth adapter discoverable
Traceback (most recent call last):
File "pinaple-agent", line 60, in <module>
adapter.RegisterAgent(agent_path, "KeyboardDisplay")
File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 145, in __call__
**keywords)
File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 651, in call_blocking
message, timeout)
dbus.exceptions.DBusException: org.bluez.Error.AlreadyExists: Already Exists
Code: Select all
File "pinaple", line 16
PIDFILE=/var/run/$DAEMON_NAME.pid
^ ^
SyntaxError: invalid syntax
There can be just one Bluetooth 'agent' running at a time. This error indicates that there is already an agent running. I'm guessing you're running the X desktop? That starts It's own BT agent, Blueman, which is conflicting with pinaple-agent.HashNinja wrote:I also tried sudo pinaple-agent but I keep getting errorCode: Select all
dbus.exceptions.DBusException: org.bluez.Error.AlreadyExists: Already Exists
Pinaple is not a Python script, it's a special bash script that starts pinapled as a background 'daemon'. If you ran this command:HashNinja wrote:Also, I tried running pinaple and it gives me errorCode: Select all
File "pinaple", line 16 PIDFILE=/var/run/$DAEMON_NAME.pid ^ ^ SyntaxError: invalid syntax
Code: Select all
sudo update-rc.d pinaple defaultsCode: Select all
sudo /etc/init.d/pinaple statusCode: Select all
sudo /etc/init.d/pinaple start
sudo /etc/init.d/pinaple stop