Slow BLE data flow after reconnection following a sudden disconnection
Posted: Tue Sep 24, 2024 10:07 am
Hello everyone,
I'm asking for your help in resolving an issue concerning BLE data transfer.
Context:
I'm using an ESP32 device running the Nimble host with ESP-IDF version 5.0.
To connect and send data to my device, I use a PC running Windows 10 or 11 with a Python script (using the Bleak module).
My device has one characteristic registered to a GATT service.
Actual behavior:
After a sudden BLE disconnection during data transfer, the device behaves strangely. Upon reconnection, the data transfer is incredibly slow, and the device automatically disconnects after receiving a few packets.
Expected behavior:
The data transfer should remain smooth and uninterrupted.
Here are steps to reproduce:
PS: I'm unable to reproduce the issue on ESP32-S3, ESP32-C3.
Cheers
I'm asking for your help in resolving an issue concerning BLE data transfer.
Context:
I'm using an ESP32 device running the Nimble host with ESP-IDF version 5.0.
To connect and send data to my device, I use a PC running Windows 10 or 11 with a Python script (using the Bleak module).
My device has one characteristic registered to a GATT service.
Actual behavior:
After a sudden BLE disconnection during data transfer, the device behaves strangely. Upon reconnection, the data transfer is incredibly slow, and the device automatically disconnects after receiving a few packets.
Expected behavior:
The data transfer should remain smooth and uninterrupted.
Here are steps to reproduce:
- 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.
PS: I'm unable to reproduce the issue on ESP32-S3, ESP32-C3.
Cheers