question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created 2 years ago
  • Comments:10

github_iconTop GitHub Comments

2reactions
jakubkoltoncommented, Oct 4, 2021

First step was what had helped me. Thank you a lot!

0reactions
fjmolinascommented, Dec 1, 2021

Hi, I seem to have the same issue on Linux Ubuntu21.04. I update the characteristics of a service but when I scan I always get the same, I’ve also rebooted my computer in between with the same result.

Sorry for the noise, this seems to be an issue with bluez and unrelated to bleak.

Read more comments on GitHub >

github_iconTop Results From Across the Web

bleak.exc.BleakError: Characteristic was not found! · Issue #359
I'm trying to connect to a BLE device via bleak - it works fine when I use my script on Windows 10, but...
Read more >
BleCharacteristicNotFoundExcep...
BleCharacteristicNotFoundException : Characteristic not found with UUID. How can I get the characteristic UUIDs from a Bluetooth device?
Read more >
After successful BLE.connect - Cannot read characteristic
Hello, After a successful BLE.connect() to a BLE device, I am unable to read that device's characteristics. This always returns false: peer.
Read more >
Source code for bleak.backends.bluezdbus.client
Raises: BleakError: If the device is already connected or if the device could not be found. BleakDBusError: If there was a D-Bus error...
Read more >
2497550 - Characteristic XXXX does not exist error in CTBW
Symptom. You are receiving the following error message when trying to add a characteristic to a datasource in transaction CTBW: · Environment. SAP...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found