diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2017-07-03 13:49:19 +0300 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2017-07-05 14:27:38 +0300 |
commit | 706f9cb68fedb05b963c32d26c264c31d2f551f6 (patch) | |
tree | 17dec61bfc95cfada6da27d6dcb5b91fa2826b6e /client/gatt.h | |
parent | 23ca5047e821c266e1092922bc40a32ee14869e1 (diff) | |
download | bluez-706f9cb68fedb05b963c32d26c264c31d2f551f6.tar.gz |
client: Add acquire-notify command
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
Diffstat (limited to 'client/gatt.h')
-rw-r--r-- | client/gatt.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/client/gatt.h b/client/gatt.h index 68270577e..5dba26b6e 100644 --- a/client/gatt.h +++ b/client/gatt.h @@ -41,6 +41,8 @@ void gatt_notify_attribute(GDBusProxy *proxy, bool enable); void gatt_acquire_write(GDBusProxy *proxy, const char *arg); void gatt_release_write(GDBusProxy *proxy, const char *arg); +void gatt_acquire_notify(GDBusProxy *proxy, const char *arg); + void gatt_add_manager(GDBusProxy *proxy); void gatt_remove_manager(GDBusProxy *proxy); |