I'm trying to fix a Linux game I wrote years ago that used bluetooth/rfcomm to play against itself on Android or another Linux box. The Linux half broke somehow without any changes by me, I think because the low-level bluetooth stuff I was doing no longer works unless you're root. Certainly I'm learning that the modern/supported way to use bluez is through d-bus.
And so I'm looking without success for examples or docs to tell me how to get and use a rfcomm connection using the org.bluez d-bus APIs. On the Android side (which still works for android-to-android play) I listen for a rfcomm connection using a method called listenUsingRfcommWithServiceRecord() that takes a custom UUID. And if, with the app running on an android device that's paired with my linux box, I use d-feet to get the list of UUIDs from the device in /org/bluez/hci0/dev_* entry for my android device, I see the custom UUID I passed to listenUsingRfcommWithServiceRecord(). So the socket is showing up in the d-bus hierarchy. But using the dbus api Device1/ConnectProfile() with that UUID doesn't work, and doesn't seem to even reach the Android app. I suspect I'm just revealing my ignorance here. I know what I need: to study an app that does something close to what I want in the modern/supported way. Does anybody know of a FOSS app that uses rfcomm sockets established using d-bus APIs? Thanks, --Eric -- My g-bike can trounce your e-bike!
