Android Question Very strange SLOWNESS in BLE writeData

Mike1970

Well-Known Member
Licensed User
Longtime User
Hi everyone,

I'm trying to send a 900KB file to an ESP32 via BLE.
Assume that the code on the ESP32 is working because i tested it using a React WebApp running in the PC browser, that connects to it over BLE and send the files.
Everything works fine.

However... i managed to port the same exact javascript code in B4A in order to send several packets of 512bytes into a characterstic using the "writeData" function.
As soon as the ESP32 receives the data from the APP, it does it's things very fast and notify the APP to send another packet of 512bytes.

The problem is.... the APP takes about 3 seconds to send 512bytes... with the same exact code in the ESP, but using the React webapp to do the transfer was hundreds time faster...

Maybe the phone BLE is slower compared to the one of my PC?... can be the BLE library? i dont know.

I need to try running the webapp o my phone and test it like so...

Do you think is a solvable issue?

Thanks in advance
 

Mike1970

Well-Known Member
Licensed User
Longtime User
Thanks Erel for the answer. I didn't watch that thread.. however now i tried to do some experiment...
Initially i set the MTU at 512... but in the moment of sending the data the ESP32 disconnects ...

So i started decreasing the value gradually until the connection didn't broke anymore... I found that at MTU=200 it works... but in any case it takes about 15minutes to transfer 900KB... that is less than the about 80minutes of before.. but is still a enormous amount of time...

I tried also tu set a specific MTU "esp-side" but nothing changed...
 
Upvote 0
Top