The use of the ESP8266 in the world of IoT

User avatar
By tve
#9799 I've modified a transparent TCP Wifi-UART bridge to be able to upload sketches to arduinos. While it works, it's incredibly slow. It takes ~5 minutes to upload a 23KB sketch. The reason for the poor performance is the Wifi round-trip. It takes ~400ms to get any form of round-trip over Wifi and there are 2 round-trips per data block.

I tried siwtching to 160Mhz cpu clock but see no difference, maybe I didn't get that right. Does anyone know how to "tune" the Wifi? I'm configuring STA+AP and using STA with WPA/PSK, I wonder whether it might go faster if I turn AP off? Any experience?
User avatar
By alonewolfx2
#9802 I think your main problem is esp firmware or your update method. Can you share your update method and firmware?
User avatar
By ficeto
#9806 I see update method mentioned many times. What do you mean by "update method"and what that needs to be to be called "proper"?

On the topic:
UART blocking the response? And what do you mean by two transactions? PUSH-ACK or time between when you send the packet and your code responds that it is ready for the next? What baudrate are you using to upload to the ardiuno?
User avatar
By tve
#9856 I'm using the SDK 0.9.5 with some custom code to create a transparent bridge between Wifi and UART. I'm building the firmware with the esp-open-sdk and uploading two bin files at 0x00000 and 0x40000. Not sure how there would affect round-trip times...

Two transactions: avrdude sends a "set address" command to the arduino and waits for an ACK, then it sends a "write page" command to write a flash block and waits for an ACK. So it takes two round-trips per flash block.