Ubuntu – Unified Remote: Bluetooth: Could not connect to SDP

bluetoothnetworking

I installed Unified Remote today in hope that I can use it with my bluetooth adapter to control my PC using my phone. But as I installed Unified Remote and loaded up the web interface, I got this error:

Bluetooth: Could not connect to SDP

Google has absoluetly nothing helpful about this error so this is one of my only chances here.

some outputs:

noneatme@noneatme-desktop:/etc/bluetooth$ sudo sdptool browse local
Failed to connect to SDP server on FF:FF:FF:00:00:00: Connection refused

Ubuntu 16.04

noneatme@noneatme-desktop:/etc/bluetooth$ uname -a
Linux noneatme-desktop 4.4.0-22-generic #40-Ubuntu SMP Thu May 12 22:03:46 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

noneatme@noneatme-desktop:/etc/bluetooth$ /usr/lib/bluetooth/bluetoothd -C
D-Bus setup failed: Connection ":1.129" is not allowed to own the service "org.bluez" due to security policies in the configuration file
(it works with sudo)

Starting Bluetoothd with –compat argument won't fix the problem.

What can I do?

/edit: I fixed this problem by starting the unified remote server as sudo. Is this really the only option I have?

Best Answer

You need to run the bluetooth daemon in compatibility mode to provide deprecated command line interfaces. You're running Bluez5 and you need some Bluez4 functions. You can do this by editing this file

/etc/systemd/system/dbus-org.bluez.service and changing this line

ExecStart=/usr/lib/bluetooth/bluetoothd to this

ExecStart=/usr/lib/bluetooth/bluetoothd --compat

and then restarting bluetooth like this

sudo systemctl daemon-reload
sudo systemctl restart bluetooth

and you'll also have to change permissions on /var/run/sdp

sudo chmod 777 /var/run/sdp

and finally restart unified remote server

Related Question