title: Bluetooth SDP - where is sdpd?
body: <p><strong>Where is the Bluetooth Service Discovery Protocol (SDP) Daemon?</strong>  </p>
  
  <p>I'm trying to register a bluetooth service on Debian V8.0 using bluez. I use example code at <a href="https://people.csail.mit.edu/albert/bluez-intro/" rel="nofollow noreferrer">https://people.csail.mit.edu/albert/bluez-intro/</a>. Everything goes well until I try  </p>
  
  <pre><code>sdp_connect( BDADDR_ANY, BDADDR_LOCAL, 0 );
  </code></pre>
  
  <p>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.  </p>
  
  <p><strong>What I Tried:</strong></p>
  
  <ol>
  <li>I have installed (apt-get) every bluetooth or bluez package that seemed remotely relevant but still no sdpd.</li>
  <li>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.  </li>
  <li>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.  </li>
  </ol>
  
  <p><strong>My Goal:</strong>  </p>
  
  <p>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.  </p>
  
  <p>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 <code>BluetoothDevice.createRfcommSocketToServiceRecord(uuid)</code>), but I see no API to connect to a <em>channel</em>.  </p>
  
  <p>Interestingly, I <em>can</em> connect to a service on the Android by <em>channel number</em>, but not the other way around.  Me thinks maybe sdpd is obsolete - all references to it are several years old.</p>