ESP OTA successful,but why not start from USER2.BIN after reboot?

sdylion
Posts: 9
Joined: Thu Sep 24, 2015 11:15 am

ESP OTA successful,but why not start from USER2.BIN after reboot?

Postby sdylion » Thu May 12, 2016 3:16 pm

Hi,
I use esp upgrade api (system_upgrade_start) to process FOTA , and it is successful like this:
pusrdata HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Accept-Ranges: bytes
ETag: W/"359508-1463034102000"
Last-Modified: Thu, 12 May 2016 06:21:42 GMT
Content-Type: application/octet-stream
Content-Length: 359508
Date: Thu, 12 May 2016 06:44:26 GMT
Connection: close

?畝
"
userbin sumlength:359508
upgrade_task 94 word left
server response with something else,check it!
upgrade data error!

spi_flash_read error 1

Exit upgrade task.
user_ota_upgrade_successful
upgrade to reboot

upgrade reboot
reboot to use2

state: 5 -> 0 (0)
rm 0
del if0
apnetif->dhcps_pcb = 1073713888
bcn 0
del if1
usl
sul 0 0

when esp restarted , first i use the api to print information about USER.BIN and BIN addr like this:
printf("ESP Flash Size:%d\n",system_get_flash_size_map());
printf("ESP UserBin Addr:%d\n", system_get_userbin_addr());
but esp have already restarted from USER1.BIN like this:
ESP Flash Size:2
ESP UserBin Addr:4096
espFsInit test 0x3fff5420


USER1.BIN and USER2.BIN have different offset addrs, ox1000 is the USER1.BIN ,so
the question is : why not esp start from USER2.BIN after reboot because of FOTA?
Thanks!

ESP_Faye
Posts: 1646
Joined: Mon Oct 27, 2014 11:08 am

Re: ESP OTA successful,but why not start from USER2.BIN after reboot?

Postby ESP_Faye » Fri May 13, 2016 12:08 pm

Hi,

Here is an example of OTA http://bbs.espressif.com/viewtopic.php?f=7&t=423#p1619 you can refer to.

Thanks for your interest in ESP8266 !

Who is online

Users browsing this forum: No registered users and 13 guests