ESP8266 Webserver Project

Moderator: Sprite_tm

User avatar
By mharizanov
#18326 I just tried it and did my first OTA upgrade, excellent work!

With latest esphttpd and the 6 patches applied I get the following during make:

Code: Select alluser1.bin uses 236944 bytes of 241664 available


What does that mean? I assume there would be much more than 4K left for other code, so I am not sure how to read it

Again, excellent stuff.
User avatar
By tve
#18332 Thanks so much for trying it out! Are you using master or the ota-mods branch? I believe you'll be happier with the master branch, unless you just want the patches to apply to your own project.

WRT memory, I tweaked the official stuff a little bit. The full story is now documented in the memory layout section of the README.md at https://github.com/jeelabs/esp-link (I put it there for future reference as opposed to writing here inline).

Also, I might as well say that I created releases on github (https://github.com/jeelabs/esp-link/releases) with binary versions of the firmware. It implements a transparent serial bridge, which you may not care for, but which isn't gonna hurt anything if you just want to play with the OTA flash stuff.
User avatar
By tve
#18333
Sashpi wrote:Great work tve. This is exactly what I've been looking for although my journey on the OTA part has only just started.
I need to further dive into the work you already did.

Did anybody already manage to do the OTA upgrade for files of >512KB size? The flash locations change at that point and I'm not quite sure how this impacts the process and how the bootloader knows where to load user2.bin from.


Thanks for the kind words. I don't have a module with >512KB, but it should be pretty trivial to make the changes. See Espressif's 99C-ESP8266__OTA_Upgrade__EN_v1.5.pdf document. You will have to initially flash the blank.bin higher up (bootloader and user1.bin don't move).
You need to change the `build/eagle.esphttpd1.v6.ld` and following Makefile build targets to use
the 1024 or 2048 scripts from the SDK's ld directory (see the 1.1.0 SDK for the 2048 size).
Finally you need to modify the flashable size from 236KB to the right number in the Makefile at
https://github.com/jeelabs/esp-link/blo ... kefile#L59 (496KB with a 1MB flash?).

Hope this helps (yes, I could abstract this a bit better now that I actually understand the stuff. Please see the end of the updated README.md for details on how the flash layout works.
User avatar
By tve
#18334
On another note - did you ever figure out the issue with slow WiFi? I know you had mentioned in another forum that you were not getting packets fast?


Complicated... Some of it got solved, some of it not. I see weird interactions with my AP (a somewhat
dated Engenius 9500) which result in tons of retransmissions and similar stuff. I've gone to set the esp8266 to 11g so it doesn't speak 11n, which improves the situation. But satisfied I am not...