6
votes

I work with BlueZ 5.30 and kernel 3.13.0-32 and I need to implement in my app read/write characteristics functionality via DBus.

I'm using BlueZ test scripts to established connection:

"test-discovery", and then "test-device connect".

the problem is I don't see any services displayed in DBus (org.bluez). Using d-feet app I can only see:

"/org/bluez/hci0/dev_btaddr" Interfaces org.bluez.Device1 org.freedesktop/DBus.Introspectable org.freedesktop.DBus.Properties

and in "/var/log/syslog" I can see many of:

" bluetoothd[715]: Unable to register GATT service with handle 0x0045 for device..."

using gatttool I'm able to read/write characteristics, primaries etc. Under hcidump I see all of characteristics are read properly.

But, from DBus PoV only Device1 interface is available.

here is my BlueZ configuration: " ./configure --prefix=/usr --mandir=/usr/share/man --sysconfdir=/etc --localstatedir=/var --enable-library --disable-systemd --enable-experimental --enable-maintainer-mode --enable-debug "

I was looking here: "http://i-miss-erin.blogspot.com/2010/12/gatt-related-dbus-api.html" but as I mentioned, don't have any interface or services which are displayed here.

For test I use proximity and hid devices. In case of hid, after proper connection I can see chars in the terminal window (hid keyboard device) so I assume it works correctly.

Any suggestions?

1
I've solved my issue. The problem was caused by bluetoothd running without "-E" which enables experimental part of BlueZMarcin Joppek
How did you end up adding the -E to the startup? I have been trying to add it to the daemon in /etc/init.d/bluetooth but that doesn't seem to do the trick. Where did you add it?Brook

1 Answers

4
votes

You have to activate the experimental features for your bluetooth set in order to get GATT services enabled.

On a Debian system you can achieve this by putting

NOPLUGIN_OPTION="-E"

into the /etc/default/bluetooth file.

After restart, in order to get my device (Logitech MX Master) working properly on my Debian Stretch, I also had to pair and trust it manually using the bluetoothctl command. I had no success with the graphical bluetooth tool from Gnome.