esp-idf: Windows BLE reconnection not working after update to v4.4.6 (IDFGH-11531)
Answers checklist.
- I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
- I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
- I have searched the issue tracker for a similar issue and not found a similar issue.
IDF version.
v4.4.6
Espressif SoC revision.
ESP32-S3
Operating System used.
Windows
How did you build your project?
Command line with idf.py
If you are using Windows, please specify command line type.
CMD
Development Kit.
Custom Board
Power Supply used.
Battery
What is the expected behavior?
Using the ESP as BLE peripheral and windows as BLE central:
- Our proprietary Windows tools is able to disconnect a Windows BLE connection and the status of the device remains “Paired” in “Bluetooth & other devices” Setting in Windows until next connection is triggered by the tool.
- It is always possible to connect with our Windows tool.
This was working with v4.4.5.
In some cases, Windows anyway kept the connection open (as windows very much like to keep connections open), but it was still possible to reconnect with our Windows tool.
What is the actual behavior?
Some different strange behaviors, see steps to reproduce for more details:
- After running our proprietary windows tool, the BLE connection remains Connected (the tool fails to disconnect).
- When trying to reconnect, it fails directly in Windows without any logs on the ESP side indicating any communication at all. or
- Windows is able to connect but will itself disconnect directly
Steps to reproduce.
- Using v4.4.5, pair and bond with the device (ESP acting peripheral) from Windows
- Update to v4.4.6
- Try to connect -> connection is refused on Windows side. On ESP side, logs tell that windows connects and disconnects again
- Remove pairing info in windows
- Try to connect again -> it works
- Try to close connection in windows tool -> windows will not close its connection but keep it open
- Try to connect again -> it works (but sometimes it doesn’t, have no exact way to reproduce…)
- Downgrade to v4.4.5
- Windows directly automatically reconnects in background (not wanted)
- Try to connect in windows tool -> connection is refused on Windows side, no activity on windows side This state is also happening in v4.4.6 but I don’t know yet how to reproduce.
Debug Logs.
See More Information.
More Information.
Three example logs in “more Information” that contain much proprietary logging and no ESP logs:
-
v4.4.6 - Windows not disconnecting.txt (corresponding to step 6 above) to be compared with:
-
v4.4.5 - Windows disconnecting.txt where it works
-
v4.4.6 - Windows connecting but immediately disconnecting.txt (corresponding to step 3 above)
About this issue
- Original URL
- State: closed
- Created 7 months ago
- Comments: 19
Thanks @zhp0406 we will start look into this. We have a BLE sniffer that we hopefully can use to capture some more details.