embedded-community / pc-ble-driver-py

Python bindings for the ble-driver library
Other
3 stars 3 forks source link

ble_adapter: Increase wait timeout to 8s #14

Closed mkarhumaa closed 1 year ago

mkarhumaa commented 1 year ago

When longer than 5 seconds supervision timeout was used, wait() timeout triggered before supervision timeout which lead to situation that weird exceptions were thrown because pc-ble-driver-py did not receive response in time because the connection was just about to be lost.

Snippet from exception: File "/usr/local/lib/python3.10/site-packages/pc_ble_driver_py/ble_driver.py", line 104, in wrapper err_code = wrapped(*args, **kwargs) File "/usr/local/lib/python3.10/site-packages/pc_ble_driver_py/ble_adapter.py", line 512, in write_req return result["status"] TypeError: 'NoneType' object is not subscriptable