-
Notifications
You must be signed in to change notification settings - Fork 310
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
bleak.exc.BleakError: Could not pair with device: 19: FAILED #789
Comments
Latest is ambiguous since it can change when there is a new release. What are the exact version numbers? |
Can you give the full stack trace of the crash? Have you tried following the troubleshooting tips in the docs? |
|
bleak version: 0.14.2 |
It think the problem is that your program uses two different run loops.
Try rewriting the program to only use one run loop. |
this is what i get after rewriting the program using one run loop, the problem is not there because the connexion is ensured even with two different run loops but pairing is not even after using one run loop
|
A quick web search of this error gives: https://docs.microsoft.com/en-us/answers/questions/36820/bluetoothledevice-pairasync-intermittantly-fails.html So I would suggested doing a Bluetooth packet capture as detailed in the Bleak troubleshooting docs. |
after some research i think the option pairing is available only when you work with linux because it requires BlueZ and it's available only in linux |
Thanks for the detailed analysis. FYI, there is some work-in-progress improvements in #1100 that will effectively allow selecting the DevicePairingKinds. However, I'm not aware of a way to affect the Encryption Key bit. |
Alright. In the meantime I switched off the MITM attack detection on the embedded stm32 side and it works with pairing mode "ceremony = DevicePairingKinds.CONFIRM_ONLY" only. When I set any other pairing mode the pairing fails with error code 0x0c (numeric comparision failed). I guess this is reasonable given there is no way to present/confirm the pin on python side at the moment. For STM32WB55 users |
You could also try passing |
bluetoothctl -v
) in case of Linux:Description
there is a GATT server defined in STM32WB55RG
i want to connect to a stm32WB55RG via ble and read values from characteristics (to read the values you have to bond with the device)
What I Did
i wrote the script below and i tried all level of authentication but the error still the same
The text was updated successfully, but these errors were encountered: