Open chalkers opened 8 years ago
There are two binaries if the flashing of the first binary fails.
The way this works is the /flash/next end point on port 88 is hit to find out which area should be flashed too.
If you have flashed using serial you will be using the user1.bin area - so the update will then post and the firmware will be saved into user2.bin. If this is successful, then the boot area is modified to point to user2.bin, and in reboot this is the new area the board in booted into. The next ota update would then write into user1.bin.
So if a firmware ota update fails, the board will still boot.
User1.bin is in the same place. User2.bin is in a difference area depending on the flash size of the chip.
The ESP8266 can be flashed over the air. Would be awesome to flash the chip OTA - we'll need to probably add a line to the manifest to say what binaries need to be flashed OTA.
This is the
wiflash.sh
code that's used to flash for reference: