Characteristic was not found
See original GitHub issue- bleak version: 2.5.2
- Python version: 3.8.2
- Operating System: Win 10
- BlueZ version (
bluetoothctl -v
) in case of Linux:
Description
I wanted to read data from custom 128-bit UUID characteristic of my BLE Device (based on Nordic nRF development kit). So I used “Connect to a Bluetooth device and read its model number:” example - I changed the MAC and UUID for mine of course. I constantly had an “bleak.exc.BleakError: Characteristic c4d41401-a2b9-11eb-bcbc-0242ac130002 was not found!” despite it was visible for example in “NRF Connect” app for Android. Then I decided to check is it actually visible using “service_explorer.py” example - it seemed that my characteristic is not present. I’m sure it’s able to read, because I’m able to do it via read and notifications through “NRF Connect” Android App. What might be a problem? “Run as admin” makes no difference. All that code works for example with “Device Name” characteristic.
Full traceback:
PS C:\Projekty_STM32\Praca_Inzynierska\Inzynierka\Python_BLE_UART_Interface> py ble_uart_iface.py
Traceback (most recent call last):
File "ble_uart_iface.py", line 38, in <module>
loop.run_until_complete(run(address))
File "C:\Users\QB\AppData\Local\Programs\Python\Python38-32\lib\asyncio\base_events.py", line 616, in run_until_complete
return future.result()
File "ble_uart_iface.py", line 34, in run
model_number = await client.read_gatt_char(MODEL_NBR_UUID)
File "C:\Users\QB\AppData\Local\Programs\Python\Python38-32\lib\site-packages\bleak\backends\dotnet\client.py", line 593, in read_gatt_char
raise BleakError("Characteristic {0} was not found!".format(char_specifier))
bleak.exc.BleakError: Characteristic C4D41401-A2B9-11EB-BCBC-0242AC130002 was not found!
Issue Analytics
- State:
- Created 2 years ago
- Comments:10
Top GitHub Comments
First step was what had helped me. Thank you a lot!
Sorry for the noise, this seems to be an issue with bluez and unrelated to bleak.