OTA postpone system_upgrade_reboot / bootloader flag

skywave
Posts: 19
Joined: Sun May 17, 2015 3:33 am

OTA postpone system_upgrade_reboot / bootloader flag

Postby skywave » Mon Nov 06, 2017 7:27 pm

Hi There,

- Is there a way of OTA downloading the new firmware, but not reboot - and in the next system start, checking for a new firmware and switch. I would like to OTA update but without the reboot.
- Where does ESP8266 saves the user(1|2).bin it's currently using? How can I reset it to user1.bin? After doing a OTA update from user1.bin to user2.bin I flashed the uC (user1.bin), bootloader and device / user settings area, but it still wanted to load user2.bin.

blubb
Posts: 116
Joined: Mon Jun 22, 2015 5:35 am

Re: OTA postpone system_upgrade_reboot / bootloader flag

Postby blubb » Mon Nov 06, 2017 9:14 pm

If you do the update (flash writing) manually via the APIs spi_flash_erase_sector and spi_flash_write, there is no need to activate the new binary right away. You can do that at a later time (even after reboots) by

system_upgrade_flag_set(UPGRADE_FLAG_FINISH);
system_upgrade_reboot();

But doing it that way, of course, you have to make sure that (next) binary is really present.

Who is online

Users browsing this forum: No registered users and 120 guests