Where is the Bluetooth Service Discovery Protocol (SDP) Daemon?
I'm trying to register a bluetooth service on Debian V8.0 using bluez. I use example code at https://people.csail.mit.edu/albert/bluez-intro/. Everything goes well until I try
sdp_connect( BDADDR_ANY, BDADDR_LOCAL, 0 );
which fails. After some digging, I find that the sdp daemon (sdpd) (to which it needs to connect) is not running and in fact does not even exist on my system.
What I Tried:
- I have installed (apt-get) every bluetooth or bluez package that seemed remotely relevant but still no sdpd.
- I tried to connect using the address of my Android phone (using the same code). That worked fine but, of course, is of no use.
- Did an exhaustive Google search on the problem but found no clear answers. A lot of talk about hcid, pand, etc. but no clear answers about how these are relevant.
My Goal:
I am trying to register my service on my Debian system, so that I can connect to it from another bluetooth device (in particular, my Android). The service runs just fine, it just can't be found without SDP registration.
I'd be satified to connect to it directly, using it's (known) channel number, but Android can only connect via a registered service UUID (i.e., using BluetoothDevice.createRfcommSocketToServiceRecord(uuid)
), but I see no API to connect to a channel.
Interestingly, I can connect to a service on the Android by channel number, but not the other way around. Me thinks maybe sdpd is obsolete - all references to it are several years old.
[SOLVED] Apparently, sdpd is long gone. It's function has been subsumed by bluetoothd. To make it work, use the --compat flag, e.g.
This should be added to "/etc/init.d/bluetooth". With this, I can successfully connect and register my service.
I found a hint to this in a blog posting. Why the release notes or anything else on the planet never announced this, I have no idea.