Using the pc_ble_driver_py.ble_driver I'm able to subscribe to notifications, but unable to get the values upon connection. The error is:
"/home/marc/dev/src/<redacted>/v2/./gui.py", line 258, in connect_and_discover
status, data = self.adapter.read_req(new_conn, build_uuid('button'))
File "/home/marc/.local/lib/python3.9/site-packages/pc_ble_driver_py/ble_adapter.py", line 528, in read_req
raise NordicSemiException("Characteristic value handler not found")
pc_ble_driver_py.exceptions.NordicSemiException: Characteristic value handler not foundFile
I do not know how to install a value handler and could not find documentation about it. The code looks like:
new_conn = self.conn_q.get(timeout=scan_duration)
self.adapter.service_discovery(new_conn)
self.adapter.enable_notification(new_conn, build_uuid('button'))
def read_value(adapter, conn_handle, handle, offset):
logging.debug(f"Readvalue({conn_handle} {handle} {offset}")
status, data = self.adapter.read_req(new_conn, build_uuid('button'))
logging.info('button_status: {} status: {}'.format(data, status))
and fails in read_req().
Any help would be helpful ; thanks.
Marc.