Chat freely about anything...

User avatar
By berkutta
#51007 Hi,

Want to build a "Bootloader" to flash the ESP8266 (Espressif SDK) via HTTP to a new/other firmware. Like using a standard HTML Interface with GET or POST Interface to push a new Firmware with the computer to the ESP.

My current problem for that is that I don't know how I can get a callback every like 4k of data. I only can receive the whole data "blob" once. But that isn't possible when this data "blob" for example is 512kB (Firmware size). So anyone knows how I can say the SDK that it should give me every 4k or so a callback with 4k of received data etc?

Or any other approaches to solve this ram issue?

Thanks

Benjamin
User avatar
By martinayotte
#51009 First, you need to decide if the ESP will be an HTTP Client or a Server, since it can be done both ways.
Second, you need to choose a framework, Native or ArduinoESP.

Under ArduinoESP, there is the ESP8266httpUpdate example which is an HTTPClient where it fetch itself the new firmware from a remote server. There is also the ESP8266HTTPUpdateServer, which is the reverse, it is a server which wait for a remote client providing the new binary using a post.