revk / ESP32-RevK

My tools for ESP32 projects under ESP-IDF
GNU General Public License v3.0
7 stars 6 forks source link

Fix OTA on 8266 #17

Closed Sonic-Amiga closed 1 year ago

Sonic-Amiga commented 1 year ago

ESP8266 requires app partition addresses to only differ by one bit. If this requirement isn't met, the chip will unrecoverably crash after the update; reflashing over the wire will be needed.

The information found here: https://www.esp8266.com/viewtopic.php?p=89807

Sonic-Amiga commented 1 year ago

Hello! This is why OTA didn't work on 8266. Looks like some bug in bootloader.

I am intentionally posting this as a separate PR because you could have some reasons why you arranged your partitions in that specific order; in this case this change would become more complicated. For now i am just KISS; in my opinion this should not harm ESP32.

revk commented 1 year ago

Very wary of partition changes, may make sense to force a specific 8266 partition table in the set build stuff.

Sonic-Amiga commented 1 year ago

Okay; that's exactly why i post it separately. Well redo. BTW, i have questions. What is this "fctry" partition for exactly ?

Sonic-Amiga commented 1 year ago

And one more. Since i've got the OTA working, would you agree to host my binary on your OTA server ? I don't have resources to run my own; plus a single binary isn't worth it.

And i'm way too lazy to rewrite the OTA code once again adding file upload form.

revk commented 1 year ago

Factory is for matter, but may ultimately not even be necessary. I have yet to finish it.

And yeh, I can host on my OTA.

Sonic-Amiga commented 1 year ago

Hi again! I've redone the patch, now there are special -8266 versions of the CSVs. I didn't throw anything away in order to be forward-compatible