OTA upgrade fail

huafan
Posts: 32
Joined: Sun Mar 15, 2015 2:30 pm

OTA upgrade fail

Postby huafan » Wed Jun 03, 2015 11:15 am

问题描述: user1.bin 升级到 user2.bin可以,但是 user2.bin升级到user1.bin 不正常,设备升级失败无法正常工作。
具体描述:
使用 SDK 1.0.1(b2) ,IOT demo 修改一点代码 ,1MB FLASH.
云端中有2个版本的ROM V1.0.1t23701(a) ROM V1.1.0t23701(a) (V1.0.1 V1.1.0是同一个个 user1.bin 和 user2.bin)
串口烧录V1.0程序,在WEB中请求升级ROM V1.1,可以升级成功,使用sys_reboot命令重启,正常跳转到user2.bin执行。
system_upgrade_start
upgrade_connect
upgrade_connect_cb
GET /v1/device/rom/?action=download_rom&version=v1.1.0t23701(a)&filename=user2.bin HTTP/1.0
Host: 115.29.202.58:80
Connection: keep-alive
Cache-Control: no-cache
User-Agent: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.101 Safari/537.36
Accept: */*
Authorization: token 2a55ed5373dc362ed8f02b3c4beb7cf40c9ee1d2
Accept-Encoding: gzip,deflate,sdch
Accept-Language: zh-CN,zh;q=0.8

upgrade file download start. <-------------------------------------------开始升级
totallen = 2604
totallen = 4064
totallen = 5524
totallen = 6984
totallen = 8444
totallen = 9904
totallen = 11364
totallen = 12824
totallen = 14284
totallen = 15744
totallen = 17204
totallen = 18664
totallen = 20124
totallen = 21584
totallen = 23044
totallen = 24504
totallen = 25964
totallen = 27424
totallen = 28884
totallen = 30344
totallen = 31804
totallen = 33264
totallen = 34724
totallen = 36184
totallen = 37644
totallen = 39104
totallen = 40564
totallen = 42024
totallen = 43484
totallen = 44944
totallen = 46404
totallen = 47864
totallen = 49324
totallen = 50784
totallen = 52244
totallen = 53704
totallen = 55164
totallen = 56624
totallen = 58084
totallen = 59544
totallen = 61004
totallen = 62464
totallen = 63924
totallen = 65384
totallen = 66844
totallen = 68304
totallen = 69764
totallen = 71224
totallen = 72684
totallen = 74144
totallen = 75604
totallen = 77064
totallen = 78524
totallen = 79984
totallen = 81444
totallen = 82904
totallen = 84364
totallen = 85824
totallen = 87284
totallen = 88744
totallen = 90204
totallen = 91664
totallen = 93124
totallen = 94584
totallen = 96044
totallen = 97504
totallen = 98964
totallen = 100424
totallen = 101884
totallen = 103344
totallen = 104804
totallen = 106264
totallen = 107724
totallen = 109184
totallen = 110644
totallen = 112104
totallen = 113564
totallen = 115024
totallen = 116484
totallen = 117944
totallen = 119404
totallen = 120864
totallen = 122324
totallen = 123784
totallen = 125244
totallen = 126704
totallen = 128164
totallen = 129624
totallen = 131084
totallen = 132544
totallen = 134004
totallen = 135464
totallen = 136924
totallen = 138384
totallen = 139844
totallen = 141304
totallen = 142764
totallen = 144224
totallen = 145684
totallen = 147144
totallen = 148604
totallen = 150064
totallen = 151524
totallen = 152984
totallen = 154444
totallen = 155904
totallen = 157364
totallen = 158824
totallen = 160284
totallen = 161744
totallen = 163204
totallen = 164664
totallen = 166124
totallen = 167584
totallen = 169044
totallen = 170504
totallen = 171964
totallen = 173424
totallen = 174884
totallen = 176344
totallen = 177804
totallen = 179264
totallen = 180724
totallen = 182184
totallen = 183644
totallen = 185104
totallen = 186564
totallen = 188024
totallen = 189484
totallen = 190944
totallen = 192404
totallen = 193864
totallen = 195324
totallen = 196784
totallen = 198244
totallen = 199704
totallen = 201164
totallen = 202624
totallen = 204084
totallen = 205544
totallen = 207004
totallen = 208464
totallen = 209924
totallen = 211384
totallen = 212844
totallen = 214304
totallen = 215764
totallen = 217224
totallen = 218684
totallen = 220144
totallen = 221604
totallen = 223064
totallen = 224524
totallen = 225984
totallen = 227444
totallen = 228904
totallen = 230364
totallen = 231824
totallen = 233284
totallen = 234744
totallen = 236204
totallen = 237664
totallen = 239124
totallen = 240584
totallen = 242044
totallen = 242416
upgrade file download finished.
upgrade_check
user_esp_platform_upgarde_successfully
{"path": "/v1/messages/", "method": "POST", "meta": {"Authorization": "token 2a55ed5373dc362ed8f02b3c4beb7cf40c9ee1d2"},"get":{"action":"device_upgrade_success"},"body":{"pre_rom_version":"v1.0.2t23701(a)","rom_version":"v1.1.0t23701(a)"}}

user_esp_platform_recv_cb {"status": 200, "message": "send message success", "result": "success"}



执行 sys_reboot 重启 <-------------------------------------------WEB 执行 sys_reboot重启
reboot to use2
del if0
usl
sul 5 0
rm mismatch
pm close 7 0 0/112366549
user_esp_platform_recon_cb
client_recon_cb

ets Jan 8 2013,rst cause:4, boot mode:(3,7)

wdt reset
load 0x40100000, len 1320, room 16
tail 8
chksum 0xb8
load 0x3ffe8000, len 776, room 0
tail 8
chksum 0xd9
load 0x3ffe8308, len 412, room 0
tail 12
chksum 0xb9
csum 0xb9

2nd boot version : 1.3(b3)
SPI Speed : 80MHz
SPI Mode : QIO
SPI Flash Size : 8Mbit
jump to run user2 <------------------------------------------ 执行user2.bin 正常

.....
GET /v1/device/rom/?action=download_rom&version=v1.1.0t23701(a)&filename=user1.bin HTTP/1.0 <-------------- user2 再次WEB升级
Host: 115.29.202.58:80
Connection: keep-alive
Cache-Control: no-cache
User-Agent: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.101 Safari/537.36
Accept: */*
Authorization: token 2a55ed5373dc362ed8f02b3c4beb7cf40c9ee1d2
Accept-Encoding: gzip,deflate,sdch
Accept-Language: zh-CN,zh;q=0.8


system_upgrade_start
upgrade_connect
upgrade_connect_cb
GET /v1/device/rom/?action=download_rom&version=v1.1.0t23701(a)&filename=user1.bin HTTP/1.0
Host: 115.29.202.58:80
Connection: keep-alive
Cache-Control: no-cache
User-Agent: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.101 Safari/537.36
Accept: */*
Authorization: token 2a55ed5373dc362ed8f02b3c4beb7cf40c9ee1d2
Accept-Encoding: gzip,deflate,sdch
Accept-Language: zh-CN,zh;q=0.8

upgrade file download start. <-------------------------------------- 不正常,卡住, 等待一段时间后 重启了。

ets Jan 8 2013,rst cause:4, boot mode:(3,7)

wdt reset
load 0x40100000, len 1320, room 16
tail 8
chksum 0xb8
load 0x3ffe8000, len 776, room 0
tail 8
chksum 0xd9
load 0x3ffe8308, len 412, room 0
tail 12
chksum 0xb9
csum 0xb9

2nd boot version : 1.3(b3)
SPI Speed : 80MHz
SPI Mode : QIO
SPI Flash Size : 8Mbit
jump to run user2 <------------------------------------------------ 重启后 出错了.

Fatal exception (0):
epc1=0x402016cc, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000000, depc=0x00000000
Fatal exception (0):
epc1=0x402016cc, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000000, depc=0x00000000
Fatal exception (0):
epc1=0x402016cc, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000000, depc=0x00000000
Fatal exception (0):
epc1=0x402016cc, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000000, depc=0x00000000
Fatal exception (0):

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

Re: OTA upgrade fail

Postby ESP_Faye » Wed Jun 03, 2015 11:39 am

Hi,

Here is the document "99C-ESP8266__OTA_Upgrade" introduces OTA function. http://bbs.espressif.com/viewtopic.php?f=21&t=413

Did you upload both user1.bin and user2.bin on Espressif Cloud ?

Could you offer your test code and bin files ? We will have a try.

huafan
Posts: 32
Joined: Sun Mar 15, 2015 2:30 pm

Re: OTA upgrade fail

Postby huafan » Wed Jun 03, 2015 12:11 pm

Espressif_Faye wrote:Hi,

Here is the document "99C-ESP8266__OTA_Upgrade" introduces OTA function. http://bbs.espressif.com/viewtopic.php?f=21&t=413

Did you upload both user1.bin and user2.bin on Espressif Cloud ?

Could you offer your test code and bin files ? We will have a try.


上传了user1.bin 和 user2.bin在 Espressif Cloud.
BIN见附件。
Attachments
ROM.jpg
ROM.jpg (100.55 KiB) Viewed 3982 times
8266BIN.zip
(512.22 KiB) Downloaded 288 times

huafan
Posts: 32
Joined: Sun Mar 15, 2015 2:30 pm

Re: OTA upgrade fail

Postby huafan » Wed Jun 03, 2015 2:32 pm

Espressif_Faye wrote:Hi,

Here is the document "99C-ESP8266__OTA_Upgrade" introduces OTA function. http://bbs.espressif.com/viewtopic.php?f=21&t=413

Did you upload both user1.bin and user2.bin on Espressif Cloud ?

Could you offer your test code and bin files ? We will have a try.


已经解决,谢谢。
原因是我生成 user1.bin 后 没有 make clean, 就生成 user2.bin了。
测试 user1 到 user2,user2 到user1 都是好着的,谢谢了。

Who is online

Users browsing this forum: No registered users and 10 guests