client: Add acquire-notify command

System Internals / BlueZ - Luiz Augusto von Dentz [intel.com] - 5 July 2017 07:27 EDT

This adds acquire-notify command which uses D-Bus AcquireNotify method to acquire a file descriptor to read notifications locking the attribute:

[Test peripheral:/service001f/char0020]# acquire-notify [CHG] Attribute /org/bluez/hci1/dev_56_A0_AA_D0_12_FF/service001f/char0020 NotifyAcquired: yes AcquireNotify success: fd 7 MTU 65

< ACL Data TX: Handle 3585 flags 0x00 dlen 9 ATT: Write Request (0x12) len 4 Handle: 0x0022 Data: 0200

[CHG] /org/bluez/hci1/dev_56_A0_AA_D0_12_FF/service001f/char0020 Notification: 00

> ACL Data RX: Handle 3585 flags 0x02 dlen 8 ATT: Handle Value Indication (0x1d) len 3 Handle: 0x0021 Data: 00

706f9cb client: Add acquire-notify command
Makefile.tools | 4 +-
client/gatt.c | 163 ++++++++++++++++++++++++++++++++++++++++++++++++---------
client/gatt.h | 2 +
client/main.c | 12 +++++
4 files changed, 154 insertions(+), 27 deletions(-)

Upstream: git.kernel.org


  • Share