Headless Raspberry Pi BT

ok-- i’ve spent a lot of hours on this and haven’t found a lot of help elsewhere, but i know there are some smart people on here that likely have this knowledge, so:

running a raspberry pi 3 headless and i’d like to connect to it via bluetooth for ssh. i’m using a macbook, so internet sharing is also easy. i’m trying to simply be able to click the BT dropdown on the mac to connect.

and for a few glorious moments at different times it was working-- i was able to simple ssh pi@raspberrypi.local and all was well. but the connections were getting dropped and pairing is very unreliable. i’ve started from a new image now several times and haven’t been able to replicate a working setup-- in fact, i can’t even say what precisely i did to get to those magic working moments and i’ve now entered a total fog.

this seems like it should be an easy thing with minimal setup-- can someone here help me out? this seems like a valuable general use case, and perhaps it’s dead-simple with a GUI helper, but i’m doing it all on the command line.

pulling from: https://github.com/bablokb/pi-btnap and https://www.raspberrypi.org/forums/viewtopic.php?f=36&t=37655 and https://raspberrypi.stackexchange.com/questions/29504/how-can-i-set-up-a-bluetooth-pan-connection-with-a-raspberry-pi-and-an-ipod

ps. awesome bonus tip: hold shift+option when you click the macos BT icon and you get extra debug tools!

This might not be the issue, but in general I’ve found OSX (atleast Yosemite which I’m still on ) bluetooth to be a bit buggy. Periodically my laptop will stop connecting to a bluetooth device, and I have to remove it from the bluetooth device list before it can be reconnected.

I haven’t touched my pi in quite a while, but are you totally sure that it wasn’t also connected to the same wifi when you managed to successfully ssh in?

“ssh over Bluetooth” actually raised a flag for me, since I was always under the impression that BT is basically just a serial pipe (rather than a network stack with ports, etc), but I did find some precendent for it in a search: http://talk.maemo.org/showthread.php?t=47201

(Obviously Maemo isn’t a pi platform, but it looks like there are some helpful Linux bits in there if you haven’t seen them)

i appreciate the second-guessing. indeed, the macos bt implementation feels frail at times. and certainly bluetooth networking is a thing-- bt is just the physical pipes which can have protocols overlaid. once you have IP you can ssh/whatever. i definitely have had it working as desired, just with dropouts.

it seems like a simple setup issue with bluez and basic linux networking, neither of which i’m an expert at.