You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am facing a problem with my BLE Client's data request to a BLE Server. The issue is related to the pybgapi library, and I need assistance in resolving it.
[I created another Issue at the pybgapi repository. I am not 100% sure if it goes there or here, if you think I am in the wrong spot let me know or delete the issue]
Here is the relevant code snippet:
if self.conn_state == "enable_indication":
# ...
self.lib.bt.gatt.read_characteristic_value(
evt.connection, SENSOR_DATA_CHARACTERISTIC)
The SENSOR_DATA_CHARACTERISTIC variable is defined as:
File "/Users/username/Documents/GitHub/pybgapi-examples/lib/python3.11/site-packages/bgapi/apiparser.py", line 30, in toInt
return int(s)
ValueError: invalid literal for int() with base 10: b'f\xdc\xaf\xe1lel\x95\x01G\xe5\x95\xc9\x0b\x854'
I also tried another variant where I casted the byte to an integer value, but I guess this was not a good idea neither.
Issue Summary
I am facing a problem with my BLE Client's data request to a BLE Server. The issue is related to the
pybgapi
library, and I need assistance in resolving it.[I created another Issue at the pybgapi repository. I am not 100% sure if it goes there or here, if you think I am in the wrong spot let me know or delete the issue]
Here is the relevant code snippet:
The SENSOR_DATA_CHARACTERISTIC variable is defined as:
I am encountering the following error:
I also tried another variant where I casted the byte to an integer value, but I guess this was not a good idea neither.
Thank you for any advice in solving this issue and let me know if you need more information.
The text was updated successfully, but these errors were encountered: