You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Checked the issue tracker for similar issues to ensure this is not a duplicate
Read the documentation to confirm the issue is not addressed there and your configuration is set correctly
Tested with the latest version to ensure the issue hasn't been fixed
How often does this bug occurs?
always
Expected behavior
The ESP32 device is able to receive data without disconnection or latency after a sudden disconnection.
Actual behavior (suspected bug)
After reconnection, the ESP32 device received data with high latency, and after a few transmissions, a disconnection occurred before the transfer was completed.
Error logs or terminal output
See additionale context for the log file
Steps to reproduce the behavior
Enable and initialize a characteristic for one GATT characteristic on Nimble for an ESP32 device.
Start advertising for the device to be discoverable.
On the PC, launch a Python script (using Bleak) to connect and send data (500 or more packets of 514 bytes).
Disconnect Bluetooth on the PC (disable the Bluetooth button or disconnect the Bluetooth antenna). The transfer and connection are interrupted.
Relaunch the same Python script. Here, the data reception on the device side is very slow, and the connection is interrupted after receiving a few data packets.
Project release version
esp-idf V5.0 release
System architecture
Intel/AMD 64-bit (modern PC, older Mac)
Operating system
Windows
Operating system version
Windows 10-11
Shell
other (details in Additional context)
Additional context
I tried to upgrade my ESP framework to version 5.3, but it was unsuccessful. I also attempted to reconnect to the device using another PC and an Android device, but the ESP32 still exhibited some strange behavior.
You can try to increase the connection supervision timeout to see if it helps ? Also, log just shows connection update happening, but not the parameters used. You can either add more debug logs at your layer OR enable nimble debug logs to check what new parameters are being negotiated. An aggressive parameter can help ensuring packets are always transferred periodically resulting in higher throughput also
I haven't tried your test yet, but I did try disabling the Host Flow Control option in Nimble through sdkconfig after reading issue https://github.com/espressif/esp-idf/issues/11011 and since then, the issue hasn't occurred anymore.
Interestingly, I noticed that in the default sdkconfig settings for ESP32-S3 and ESP32-C3, the Host Flow Control option is disabled by default, whereas it is enabled on the ESP32. I’m not entirely sure about the potential impacts of disabling this option, though.
Checklist
How often does this bug occurs?
always
Expected behavior
The ESP32 device is able to receive data without disconnection or latency after a sudden disconnection.
Actual behavior (suspected bug)
After reconnection, the ESP32 device received data with high latency, and after a few transmissions, a disconnection occurred before the transfer was completed.
Error logs or terminal output
See additionale context for the log file
Steps to reproduce the behavior
Project release version
esp-idf V5.0 release
System architecture
Intel/AMD 64-bit (modern PC, older Mac)
Operating system
Windows
Operating system version
Windows 10-11
Shell
other (details in Additional context)
Additional context
I tried to upgrade my ESP framework to version 5.3, but it was unsuccessful. I also attempted to reconnect to the device using another PC and an Android device, but the ESP32 still exhibited some strange behavior.
Here is the log from the device :
log.poc_ble.20240924110311.txt
Here is the sample project i use on ESP32. You will also find the script python file i use in the sample project
ble_sample.zip
On a ESP32-S3 and ESP32-C3 i don't reproduce the issue.
The text was updated successfully, but these errors were encountered: