Skip to content

Instantly share code, notes, and snippets.

@arrase
Created April 9, 2017 21:14
Show Gist options
  • Save arrase/5ed707a3070ef527743d12c971dae6ef to your computer and use it in GitHub Desktop.
Save arrase/5ed707a3070ef527743d12c971dae6ef to your computer and use it in GitHub Desktop.
This error is due to incompatibility issues with BlueZ 5 and SDP with bluetoothd
Make sure, running sdptool browse local gives following error:
Failed to connect to SDP server on FF:FF:FF:00:00:00: No such file or directory
As it turns out, the culprit is bluetoothd, the Bluetooth daemon. Using SDP with bluetoothd requires deprecated features for some silly reason, so to fix this, the daemon must be started in compatibility mode with bluetoothd -C (or bluetooth --compat).
Find location of bluetooth.service by:
systemctl status bluetooth.service
Then edit bluetooth.service and look for
ExecStart=/usr/libexec/bluetooth/bluetoothd
Append --compat at the end of this line, save, and then run
service bluetooth start
If all goes well, you should be able to successfully run
sudo sdptool browse local
Finally, reset the adapter:
sudo hciconfig -a hci0 reset
FROM: http://stackoverflow.com/questions/33110992/python-code-for-bluetooth-throws-error-after-i-had-to-reset-the-adapter
Things should work fine now
@pipelinedave
Copy link

thanks a bunch, this was driving me crazy!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment