-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
Classical Bluetooth SPP send throughput is very slow to Android (IDFGH-466) #2725
Comments
Hi @copercini , There is one thing that needs attention here. We can't call esp_spp_write() multiple times in succession. We should wait for ESP_SPP_WRITE_EVT, then call esp_spp_write() again. |
@blueMoodBHD it's already implemented here and here, the packets are queued and only written after get the previous packet If you use arduino core for ESP32, you can test it using this simple code: #include "BluetoothSerial.h"
BluetoothSerial SerialBT;
void setup() {
Serial.begin(115200);
SerialBT.begin("ESP32test"); //Bluetooth device name
Serial.println("The device started, now you can pair it with bluetooth!");
}
void loop() {
SerialBT.printf("abcdefghjklmnopqrstuvxwyz");
delay(10); //If this delay is lower, the data rate if faster, causing a lot of transmission issues to Android, but not to others systems like Windows
} |
Hi @copercini Please pull the latest IDF and have a try. We have merged two MR related to SPP flow control. It will take several days to sync on Github. Thanks |
Thanks for reporting and sorry for slow turnaround, the fix has been available at 8e4b919, feel free to reopen if the issue still happens. Thanks. |
When sending data using
esp_spp_write()
at more than ~ 5KB/s to an Android phone, it triggers a lot ofESP_SPP_CONG_EVT
events and the communication slow down, this problem doesn't occur in other systems, like a Windows PC with the same ESP codeCommenting out this line as proposed by Markus Becker, this issue seems less frequent and no more ESP_SPP_CONG_EVT events with a high throughput
More discussion about this problem, and workaround: https://www.esp32.com/viewtopic.php?t=5613
The text was updated successfully, but these errors were encountered: