5

How can I connect to a GATT service using the DBus API with BlueZ?

I have used the BlueZ DBUS API to discover a device, connect, and discover the GATT service UUID's.

However when I try to ConnectProfile for one of the GATT service UUID's I get a error.

sandeepmistry
  • 2,058
  • 4
  • 20
  • 25

1 Answers1

2

Got an answer from the BlueZ mailing list:

"So far, there is no GATT D-Bus API in BlueZ 5.x. The only way to access GATT profiles in BlueZ 5.x is using existing profile specific D-Bus APIs (thermometer, heart rate, proximity, cycling speed, HID over GATT) or using C API (like gatttool does)." (http://marc.info/?l=linux-bluetooth&m=136656873604635&w=2")

This is not supported into BlueZ 5.4

sandeepmistry
  • 2,058
  • 4
  • 20
  • 25
  • Have you found any solutions for this? There is a `gap-gatt-profile` but no watcher for it. – dashesy Aug 28 '13 at 17:11
  • @dashesy not yet, I downgraded to BlueZ 4.101, and shell out to gatttool. See [noble](https://github.com/sandeepmistry/noble) the node.js BLE lib. I've created for an example. – sandeepmistry Aug 29 '13 at 10:07
  • 1
    For the historical record, an experimental GATT D-Bus API was at long last added in release 5.29: https://git.kernel.org/cgit/bluetooth/bluez.git/tree/ChangeLog?h=5.29#n16 – Arto Bendiken Sep 18 '16 at 19:01