Large File Transfer via Bluetooth Classic to ESP32
Posted: Sun Aug 16, 2020 9:55 pm
I hope someone can help.
I am trying to use an ESP32 module in Bluetooth Classic mode programmed in Arduino IDE to receive an image file from my Android device running a bluetooth terminal application "Serial Bluetooth Terminal" by Kai Morich.
I have successfully connected the Android to ESP32-WRover and can easily send a few bytes of data to control functions on the ESP32.
My goal is to send a 1 to 2 MB JPG to the ESP32 that is then (after transfer) analyzed.
My first take was to read the Bluetooth data, copy it to the on-board Flash (PSRAM) and post process the data.
The initial symptom was buffer overflows. So I slowed up the speed by slowing the comm rate and in an other test increased the delay between bytes (in the range of 1ms).
Constantly I am getting buffer overflow.
So I tightened up the data storage (in fact removed it and ran the bluetooth available loop without any processing). Still got the overflow.
Can someone tell me if Bluetooth Classic has any type of handshaking? Is there any flow control in the ESP32 development boards - my is a ESP32-WROVER built by TTGO.
Just seems like the ESP32 won't get the data from the bluetooth buffer fast enough.
Can I issue bluetooth RTS and CTS signals from the ESP32 to the Bluetooth Terminal?
Thanks,
I am trying to use an ESP32 module in Bluetooth Classic mode programmed in Arduino IDE to receive an image file from my Android device running a bluetooth terminal application "Serial Bluetooth Terminal" by Kai Morich.
I have successfully connected the Android to ESP32-WRover and can easily send a few bytes of data to control functions on the ESP32.
My goal is to send a 1 to 2 MB JPG to the ESP32 that is then (after transfer) analyzed.
My first take was to read the Bluetooth data, copy it to the on-board Flash (PSRAM) and post process the data.
The initial symptom was buffer overflows. So I slowed up the speed by slowing the comm rate and in an other test increased the delay between bytes (in the range of 1ms).
Constantly I am getting buffer overflow.
So I tightened up the data storage (in fact removed it and ran the bluetooth available loop without any processing). Still got the overflow.
Can someone tell me if Bluetooth Classic has any type of handshaking? Is there any flow control in the ESP32 development boards - my is a ESP32-WROVER built by TTGO.
Just seems like the ESP32 won't get the data from the bluetooth buffer fast enough.
Can I issue bluetooth RTS and CTS signals from the ESP32 to the Bluetooth Terminal?
Thanks,