-->
Page 1 of 2

Using the ESP8266HTTPUpdateServer to replace the entire code

PostPosted: Tue Sep 19, 2017 4:54 pm
by Snuffles
I have a situation where I have some in field ESP8266's running an Arduino sketch and they have the ESP8266HTTPUpdateServer in them to enable updating the "firmware" over WiFi.

Unfortunately we need to add some time critical features for which our timing test have shown the Arduino code is executed too slowly. :-(

The ESP is deeply embedded in the hardware and it is not possible to upgrade except using the code already inside it, being ESP8266HTTPUpdateServer.

So, is it possible to use ESP8266HTTPUpdateServer to completely upgrade the ESP much like using ESPTOOL to upload the boot_loader+user1.bin+user2.bin+blank.bin.

Note: If it is not possible to do this, can it simply load user1.bin and user2.bin and blank.bin or what are the options here?

Would really value some thoughts and feedback.

Cheers
Douglas

Re: Using the ESP8266HTTPUpdateServer to replace the entire

PostPosted: Wed Sep 20, 2017 9:04 pm
by Snuffles
Hi,

Thanks for the reply, I probably was not being very clear.

(1) We have existing Arduino code that uses ESP8266HTTPUdateServer to enable another Arduino sketch to be uploaded, this is at customer sites and is deeply embedded in the system.

(2) There is no ability to access the serial port to upgrade, so we can only use (1) to upgrade.

(3) But we now need to replace the Arduino environment and our existing sketch with native ESP8266 compiled code and completely remove the Arduino libraries etc and run our new compiled application.

(4) Our new application has similar code to ESP8266HTTPUdateServer so we can update our solution going forward.

(5) The reason we are doing this is that we have found our Arduino application is simply too slow and is causing customer problems.

The question is, for (3) can we use (1) to achieve our goal, if so how?

Cheers
Douglas

Re: Using the ESP8266HTTPUpdateServer to replace the entire

PostPosted: Thu Sep 21, 2017 1:34 pm
by martinayotte
Snuffles wrote:we have found our Arduino application is simply too slow

Why are you saying that ? Did you narrowed the piece of code that appears to be slow ?
Probably same piece of code re-written with Native SDK will act the same ...

Re: Using the ESP8266HTTPUpdateServer to replace the entire

PostPosted: Sun Sep 24, 2017 5:23 am
by Snuffles
Hi,

I am comparing a "standard" Websocket to UART bridge with the ESP-LINK Telnet to UART bridge, note I was in the process of writing a native Websocket to UART bridge but stopped and looked at ESP-LINK. (https://github.com/jeelabs/esp-link).

However, while I am comparing Websocket on Arduino to Telnet natively, the Telnet option is nonetheless faster.

This brings me full circle, asking how can I completely replace and Arduino environment with a native one remotely, using an Arduino sketch.