client: Add acquire-write command

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

This adds acquire-write command which uses D-Bus AcquireWrite methods to acquire a file descriptor to write to locking the attribute:

[Test peripheral:/service001f/char0020]# acquire-write [CHG] Attribute /org/bluez/hci1/dev_00_1B_DC_07_31_88/service001f/char0020 WriteAcquired: yes AcquireWrite success: fd 7 MTU 65 [Test peripheral:/service001f/char0020]# write 00 Attempting to write fd 7

< ACL Data TX: Handle 3585 flags 0x00 dlen 8 ATT: Write Command (0x52) len 3 Handle: 0x0021 Data: 00

b41cf31 client: Add acquire-write command
client/gatt.c | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
client/gatt.h | 2 ++
client/main.c | 12 ++++++++++
3 files changed, 87 insertions(+)

Upstream: git.kernel.org


  • Share