I am currently using the ble driver for windows (Python) to get notifications from two Gatt services (Same Service/charac/descriptors/etc basically same application running on both devices). I think I am getting notifications from both the devices but I am unable to distinguish or confirm that owing to the lack of a specific device handle. In the on_hvx function, I get gattc_event which only has an event id and status. Could you please help me with how to identify which device handle I am getting the notifications from?
I am getting this now:
Received handle value notification, handle: 0x000E, value: 0x035A0E39ABFEC3E45A0216000000000000000000
However, I would like to have:
Received handle value notification,Device Name/HAndle:HRM1 handle: 0x000E, value: 0x035A0E39
Received handle value notification,Device Name/HAndle:HRM2 handle: 0x000E, value: 0x035A0E39
A second issue I am facing in python is that using the script, everytime I have to plug/unplug the Dongle to run the script again if I stop/close the process. I am aware that its because of not closing something somewhere so I tried closing ble_driver.sd_rpc_close() on errors but that did not work too . Could you'll please help me with that?
A third and last thing is while receiving notifications, is there a way to write to a characteristic on the Gatt server? Could you'll please guide me on that. For example, during notifications from two servers, I may want to write values to a control point heart rate characteristic .
I would be very grateful if you'll could help me with the above.I am using the driver as suggested by Stian devzone.nordicsemi.com/.../
Thanks and Regards,
###Get connection handle
To know which handle you get the notifications from you can use ble_event.evt.gap_evt.conn_handle (documented here: developer.nordicsemi.com/.../a00124.html)
In order to check…