-
Notifications
You must be signed in to change notification settings - Fork 304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm trying to connect to a BLE device via bleak - it works fine when I use client.start_notify on Windows 11 and andriod , but script fails , My logcat error: bleak.exc.BleakError: Descriptor None was not found! #823
Comments
bleak.exc.BleakError: Descriptor None was not found! |
Can out share the output of https://github.com/hbldh/bleak/blob/develop/examples/service_explorer.py when connected to this device? |
INFO:bleak.backends.winrt.client:Services resolved for BleakClientWinRT (C4:BE:84:20:1B:59) |
This is the "COLOR" characteristic. It does not have a "Client Characteristic Configuration" descriptor, so that explains the error seen on Android. I'm not sure how it works on Windows. You could capture Bluetooth packets on Windows to get a better idea of what is going on under the hood on Windows. Perhaps we just need to surround bleak/bleak/backends/p4android/client.py Lines 497 to 500 in 46c828b
if characteristic.notification_descriptor: .
|
@dlech @hbldh
@dlech @hbldh |
I ran into the same thing, my fix was to pin bleak to 0.20.2 which resolves the "error" and makes the call to start_notify() work as expected. I haven't checked if the pinning causes other packets to be downgraded (since the problem is currently time sensitive) but i do as of now assume that this was caused by a change in bleak. |
@apacodes it sounds like there is a regression between 0.20.2 and 0.21.0? If so, can you please start a new issue with more detail about the problem? |
Yes. I will investigate an do so in the coming days. |
This issue may because of files in: bleak/backends/p4android CLIENT_CHARACTERISTIC_CONFIGURATION_UUID = "2902" characteristic.py #90
Maybe we need to use back the full string: CLIENT_CHARACTERISTIC_CONFIGURATION_UUID = "00002902-0000-1000-8000-00805f9b34fb" |
Hello, I'm currently having the same error (Descriptor None was not found). I've solved the issue by monkey patching the CLIENT_CHARACTERISTIC_CONFIGURATION_UUID constant at startup in my app using :
I think (Bleak version 0.21.1 with Python-for-Android, Kivy and Buildozer, running on Android 13.1) |
Thanks for confirming. I would take a pull request for this. I think the short version is wrong and we don't need to have both. |
Confirming this as well. I tried downgrading to 0.20.2 but it did not work either.
The monkey patch above worked though. I also had to copy the .java files as documented in another issue. |
@dlech @hbldh
The text was updated successfully, but these errors were encountered: