ESP8266 Developer Zone The Official ESP8266 Forum 2016-05-13T12:08:57+08:00 https://bbs.espressif.com:443/feed.php?f=7&t=2161 2016-05-13T12:08:57+08:00 2016-05-13T12:08:57+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2161&p=6872#p6872 <![CDATA[Re: ESP OTA successful,but why not start from USER2.BIN after reboot?]]>
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 !

Statistics: Posted by ESP_Faye — Fri May 13, 2016 12:08 pm


]]>
2016-05-12T15:16:51+08:00 2016-05-12T15:16:51+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2161&p=6852#p6852 <![CDATA[ESP OTA successful,but why not start from USER2.BIN after reboot?]]> 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!

Statistics: Posted by sdylion — Thu May 12, 2016 3:16 pm


]]>