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,
Large File Transfer via Bluetooth Classic to ESP32
Re: Large File Transfer via Bluetooth Classic to ESP32
Most of my BT classic is limited to low numbers of bytes so I thought that I would try larger transfers.
This is the result of Bytes sent from an APP to an ESP32 using classic bluetooth, no delays introduced
The bytes are send via an array which I populated with the same character. At the end of the send I sent a finish char
The ESP counted the received characters and when the finish character was send reset the counter and printed out the start, stop times and number of bytes received
The attached is a random selection for each byte array size. I only once counted the correct number of bytes received as sent!!!!
Hope this helps....
This is the result of Bytes sent from an APP to an ESP32 using classic bluetooth, no delays introduced
The bytes are send via an array which I populated with the same character. At the end of the send I sent a finish char
The ESP counted the received characters and when the finish character was send reset the counter and printed out the start, stop times and number of bytes received
The attached is a random selection for each byte array size. I only once counted the correct number of bytes received as sent!!!!
Hope this helps....
- Attachments
-
- BT Byte Send.xlsx
- (10.8 KiB) Downloaded 569 times
Re: Large File Transfer via Bluetooth Classic to ESP32
Second version of spread sheet, shows about 100K bytes/second transfer
Who is online
Users browsing this forum: Bing [Bot] and 71 guests