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
Cannot connect to ESP 32 BLE device. #369
Comments
Try using a longer |
I tried to set the timeout to 20, and discover() function 90% scan to ESP 32 devices, but the connection and printing service still reports an error, even if the timeout is set to 50S, the device still cannot be found. |
I have no idea why, I'm sorry. I cannot reproduce it since none of my devices produce the same behaviour. Can you connect to it from other BLE client software? |
I can use the ble scanner app on my iphone 12 to connect to the ESP32 development board without fail. |
I would suggest logging Bluetooth packets. Windows may be doing something different from the iPhone that the ESP32 doesn't respond to. See https://bleak.readthedocs.io/en/latest/troubleshooting.html. |
|
I actually meant logging the packets from the Bluetooth radio, rather than enabling bleak logging. https://bleak.readthedocs.io/en/latest/troubleshooting.html#capture-bluetooth-traffic |
|
here is the decoded data that can be opened with wireshark: issue369.zip There are a bunch of notifications that are received before the scanning starts. Is is possible that the ESP32 starts sending notifications before a connection is made? |
I use the sample code in arduino. From the code point of view, esp32 needs to establish a connection before it broadcasts the notify information. It is advertising at the beginning, which is in line with the steps and methods for BLE to establish a connection. There is no problem with the connection establishment on the mobile phone. I think this should be a problem with the connection code in win10.
|
@Danjuanlab @dlech When both indicate and notify are in the property, it was confirmed that only indicate is called in the start_notify callback. |
We just changed the default in #620 |
closing as duplicate of #604 |
bluetoothctl -v
) in case of Linux:Description
I want to connect to the BLE device of ESP 32 board through bleak, but I cannot connect to the device. The BLE_notify case code is running on ESP32. When using bleak to connect to the case code, it will prompt
When using the discover.py to scan board, it takes at least 7 times to run the code to recognize the ESP32 development board. I don't know which part of the problem is wrong.
ESP 32 CODE:
The text was updated successfully, but these errors were encountered: