ESP8266 Webserver Project

Moderator: Sprite_tm

User avatar
By Sprite_tm
#40787 Hi all,

I just pushed some more new functionality to libesphttpd and the esphttpd demo. It bothered me that while there was some firmware upgrade functionality left in esphttpd, there was nothing user-friendly where people could just drop a file in a webpage and let the firmware do the rest.

I fixed this in this way:
- There now is an utility that merges the user1.bin and user2.bin into one user.ota file. This file is nothing more than the user1.bin and user2.bin files concatenated, with a small header in front of it.
- I fixed and mostly rewrote the existing firmware upload functionality. The original got broken during the core httpd re-writes, and in general did some things I wasn't extremely happy with. I rewrote it, and apart from the user1.bin/user2.bin/espfs files it used to accept, it also accepts the user.ota file. It will automatically pick the user1.bin or user2.bin that lives in there to flash the new firmware.
- I added a nice HTML/JS/AJAX/Web2.0/more_buzzwords page to do the actual uploading, including some feedback in the form of a progress bar.

I'm pretty happy with the result; it makes uploading new firmware pretty much fire-and-forget, even from a webbrowser. Obviously, you can also keep using curl or whatever to update the firmware in a Makefile or so.

For now, the functionality only works in the nonos-variant of the firmware; there is nothing technical keeping the FreeRTOS variant from working but the Makefile will need some overhauling. If you want to work on that, feel free to contact me.

Anyway, hope you like it. (And have read this. I don't mind creating these What's New topics, but with the zero replies under them, I have no idea if anyone reads them.)
User avatar
By grooves
#44051 Hi sprite,

I tried your new function and have some questions:

I have a ESP-03 with 512KB flash, when I select OTA with 512KB in makefile
It runs out of memory. Does that mean that OTA function meeds at least 1024 KB flash ?

Can you update the html code as well or just the firmware httpd code ?

Regards,
Grooves