Environment: Bluez 5.14, Linux 3.1, USB Plugable BLE radio, TI BLE keyfob (CC2541 dev kit) Linux Device <---hci----> USB BLE Radio
We enabled key press events on TI keyfob using gatttool and started to listen for events
gatttool -b [hardware ID] --char-write-req -a [handle] -n [value] --listen
(gatttool -b 90:59:AF:09:E1:5D --char-write-req -a 0x0048 -n 0100 --listen)
Pressing buttons on the keyfob and see these events
Notification handle = 0x0047 value: 02
Notification handle = 0x0047 value: 00
Notification handle = 0x0047 value: 02
Hence we can receive the key press events from the Keyfob through the Bluez stack
Objective:
We need to catch the GATT Disconnect Event i.e. When we remove the battery from the keyfob sooner or later the GATT connection is broken. We would like to receive a disconnect event from Bluez stack. Bluez has this capability since Android supports GATT disconnect event which is built over Bluez.
Question:
How do we receive the GATT Disconnect event using Bluez command line hcitool/gatttool or Bluez API.