[Resolved]关于OTA升级后 bin文件crc问题

younger
Posts: 39
Joined: Mon Dec 29, 2014 1:49 pm

[Resolved]关于OTA升级后 bin文件crc问题

Postby younger » Tue Oct 20, 2015 10:14 am

Dear Espressif:

我在用贵司1.4版本,自己搭建的OTA Server中,做OTA升级,最后下载bin文件ok,但是:
upgrade file download finished.
flash_crc = 2063597568
img_crc = 314686468

1、请问这两个crc是什么意思?
2、这样的错误可能是什么原因导致的呢?

非常感谢!

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

Re: 关于OTA升级后 bin文件crc问题

Postby ESP_Faye » Tue Oct 20, 2015 10:51 am

您好,

请确认您是否更新到了 esp_iot_sdk_v1.4.0 的 tools 文件夹。

您这个错误很有可能是没有更新 tools 文件夹导致的。请更新 tools 文件夹,重新编译,上传 OTA server,再下载升级,看是否还有问题?

我们在新版 SDK 中加入了 OTA 的 CRC 校验,如果您没有更新 tools 文件夹,就会导致 CRC 校验出错。

younger
Posts: 39
Joined: Mon Dec 29, 2014 1:49 pm

Re: 关于OTA升级后 bin文件crc问题

Postby younger » Tue Oct 20, 2015 10:55 am

Espressif_Faye wrote:您好,

请确认您是否更新到了 esp_iot_sdk_v1.4.0 的 tools 文件夹。

您这个错误很有可能是没有更新 tools 文件夹导致的。请更新 tools 文件夹,重新编译,上传 OTA server,再下载升级,看是否还有问题?

我们在新版 SDK 中加入了 OTA 的 CRC 校验,如果您没有更新 tools 文件夹,就会导致 CRC 校验出错。




谢谢! 更新后校验正常。

但是有时会出现在擦写flash时,卡住了,然后wdt重启了。
Accept-Ranges: bytes
Content-Length: 315540
Connection: close
Content-Type: application/octet-stream


sumlength = 315540
sec_block 78
..............................................................................upgrade_get_sum_disconcb
10:56:12.854 erase sector=1 ok
10:56:12.955 erase sector=2 ok
10:56:13.061 erase sector=3 ok
10:56:13.161 erase sector=4 ok
10:56:13.260 erase sector=5 ok
10:56:13.348 erase sector=6 ok
10:56:21.779
ets Jan 8 2013,rst cause:4, boot mode:(3,3)

wdt reset
load 0x40100000, len 1396, room 16
tail 4
chksum 0x89
load 0x3ffe8000, len 776, room 4
tail 4
chksum 0xe8
load 0x3ffe8308, len 540, room 4
tail 8
chksum 0xc0
csum 0xc0

请问这种情况有没有什么办法避免?

younger
Posts: 39
Joined: Mon Dec 29, 2014 1:49 pm

Re: 关于OTA升级后 bin文件crc问题

Postby younger » Tue Oct 20, 2015 4:19 pm

问题原因找到了。

在擦写的过程中需要关掉相关中断,中断对擦写falsh过程中有非常大的影响。

limuzi2012
Posts: 4
Joined: Fri Aug 18, 2017 8:24 am

Re: 关于OTA升级后 bin文件crc问题

Postby limuzi2012 » Sat Mar 17, 2018 11:30 am

ESP_Faye wrote:您好,

请确认您是否更新到了 esp_iot_sdk_v1.4.0 的 tools 文件夹。

您这个错误很有可能是没有更新 tools 文件夹导致的。请更新 tools 文件夹,重新编译,上传 OTA server,再下载升级,看是否还有问题?

我们在新版 SDK 中加入了 OTA 的 CRC 校验,如果您没有更新 tools 文件夹,就会导致 CRC 校验出错。


我用NONOS 2.2.0遇到了一样的问题,并且是在更新了esp_iot_sdk_v1.5.0的 tools文件之后,问题依旧

Her Majesty
Posts: 319
Joined: Mon Oct 27, 2014 11:09 am

Re: [Resolved]关于OTA升级后 bin文件crc问题

Postby Her Majesty » Sat Mar 17, 2018 8:12 pm

直接在 PC 浏览器中打开你下载的 URL,看 bin 文件是否会被下载下来。

limuzi2012
Posts: 4
Joined: Fri Aug 18, 2017 8:24 am

Re: [Resolved]关于OTA升级后 bin文件crc问题

Postby limuzi2012 » Mon Mar 19, 2018 9:13 am

Her Majesty wrote:直接在 PC 浏览器中打开你下载的 URL,看 bin 文件是否会被下载下来。

可以下载下来

em78p153s
Posts: 1
Joined: Fri Mar 23, 2018 11:22 am

FOTA CRC ERROR question about the sdk ESP8266_RTOS_SDK-master.zip

Postby em78p153s » Fri Mar 23, 2018 11:28 am

Code: Select all

SDK_PATH: /cygdrive/d/ESP/ESP_IDE/ESP8266_RTOS_SDK-master
BIN_PATH: /cygdrive/d/ESP/ESP_IDE/ESP8266_RTOS_SDK-master/bin/upgrade

bin crc: 5cbd2cf8
Support boot_v1.2 and +
Generate user1.1024.new.2.bin successully in BIN_PATH
boot.bin------------>0x00000
user1.1024.new.2.bin--->0x01000
!!!
make[1]: Leaving directory '/cygdrive/d/ESP/ESP_IDE/ESP8266_RTOS_SDK-master/app'

11:11:27 Build Finished (took 57s.879ms)


Code: Select all

>>>recv 342539B, 265B left
upgrade_task 58 word left
>>>recv 342804B, 0B left
upgrade data load finish.

[11:14:12.197]收←◆img_crc = 2739065608
flash_crc = 1555901688
upgrade crc check failed !

 Exit upgrade task.
upgrade_failed

Her Majesty
Posts: 319
Joined: Mon Oct 27, 2014 11:09 am

Re: [Resolved]关于OTA升级后 bin文件crc问题

Postby Her Majesty » Tue Mar 27, 2018 6:01 pm

It says that you need to update to the new ESP8266_RTOS_SDK/tools, this may solve your problem.

wateras
Posts: 2
Joined: Mon Mar 30, 2015 11:28 am

Re: [Resolved]关于OTA升级后 bin文件crc问题

Postby wateras » Thu Jun 07, 2018 3:14 pm

最近也遇到这个问题,之前一直把bin文件放到公司服务器上面已经用了几年都升级没问题,前几天对网关升级,发现升级失败显示结果如下:

pusrdata = HTTP/1.1 200 OK
Server: nginx/1.9.11
Date: Thu, 07 Jun 2018 06:55:40 GMT
Content-Type: application/octet-stream
Content-Length: 357444
Last-Modified: Thu, 07 Jun 2018 06:03:49 GMT
Connection: close
ETag: "5b18cac5-57444"
Accept-Ranges: bytes


sumlength = 357444
sec_block 88
........................................................................................upgrade_get_sum_disconcb 18120
erase sector=129 ok
erase sector=130 ok
erase sector=131 ok
erase sector=132 ok
erase sector=133 ok
erase sector=134 ok
erase sector=135 ok
erase sector=136 ok
erase sector=137 ok
erase sector=138 ok
erase sector=139 ok
erase sector=140 ok
erase sector=141 ok
erase sector=142 ok
erase sector=143 ok
erase sector=144 ok
erase sector=145 ok
erase sector=146 ok
erase sector=147 ok
erase sector=148 ok
erase sector=149 ok
erase sector=150 ok
erase sector=151 ok
erase sector=152 ok
erase sector=153 ok
erase sector=154 ok
erase sector=155 ok
erase sector=156 ok
erase sector=157 ok
erase sector=158 ok
erase sector=159 ok
erase sector=160 ok
erase sector=161 ok
erase sector=162 ok
erase sector=163 ok
erase sector=164 ok
erase sector=165 ok
erase sector=166 ok
erase sector=167 ok
erase sector=168 ok
erase sector=169 ok
erase sector=170 ok
erase sector=171 ok
erase sector=172 ok
erase sector=173 ok
erase sector=174 ok
erase sector=175 ok
erase sector=176 ok
erase sector=177 ok
erase sector=178 ok
erase sector=179 ok
erase sector=180 ok
erase sector=181 ok
erase sector=182 ok
erase sector=183 ok
erase sector=184 ok
erase sector=185 ok
erase sector=186 ok
erase sector=187 ok
erase sector=188 ok
erase sector=189 ok
erase sector=190 ok
erase sector=191 ok
erase sector=192 ok
erase sector=193 ok
erase sector=194 ok
erase sector=195 ok
erase sector=196 ok
erase sector=197 ok
erase sector=198 ok
erase sector=199 ok
erase sector=200 ok
erase sector=201 ok
erase sector=202 ok
erase sector=203 ok
erase sector=204 ok
erase sector=205 ok
erase sector=206 ok
erase sector=207 ok
erase sector=208 ok
erase sector=209 ok
erase sector=210 ok
erase sector=211 ok
erase sector=212 ok
erase sector=213 ok
erase sector=214 ok
erase sector=215 ok
erase sector=216 ok

ALL=88 sectors erase ok!
upgrade_connect_cb
sumlength = 357444
upgrade file download start.
totallen = 1460
totallen = 2920
totallen = 4380
totallen = 5582
totallen = 7042
totallen = 8502
totallen = 9962
totallen = 11422
totallen = 12882
totallen = 14342
totallen = 15802
totallen = 17262
totallen = 18722
totallen = 20182
totallen = 21642
totallen = 23102
totallen = 24562
totallen = 26022
totallen = 27482
totallen = 28942
totallen = 30402
totallen = 31862
totallen = 33322
totallen = 34782
totallen = 36242
totallen = 37702
totallen = 39162
totallen = 40622
totallen = 42082
totallen = 43542
totallen = 45002
totallen = 46462
totallen = 47922
totallen = 49382
totallen = 50842
totallen = 52302
totallen = 53762
totallen = 55222
totallen = 56682
totallen = 58142
totallen = 59602
totallen = 61062
totallen = 62522
totallen = 63982
totallen = 65442
totallen = 66902
totallen = 68362
totallen = 69822
totallen = 71282
totallen = 72742
totallen = 74202
totallen = 75662
totallen = 77122
totallen = 78582
totallen = 80042
totallen = 81502
totallen = 82962
totallen = 84422
totallen = 85882
totallen = 87342
totallen = 88802
totallen = 90262
totallen = 91722
totallen = 93182
totallen = 94642
totallen = 96102
totallen = 97562
totallen = 99022
totallen = 100482
totallen = 101942
totallen = 103402
totallen = 104862
totallen = 106322
totallen = 107782
totallen = 109242
totallen = 110702
totallen = 112162
totallen = 113622
totallen = 115082
totallen = 116542
totallen = 118002
totallen = 119462
totallen = 120922
totallen = 122382
totallen = 123842
totallen = 125302
totallen = 126762
totallen = 128222
totallen = 129682
totallen = 131142
totallen = 132602
totallen = 134062
totallen = 135522
totallen = 136982
totallen = 138442
totallen = 139902
totallen = 141362
totallen = 142822
totallen = 144282
totallen = 145742
totallen = 147202
totallen = 148662
totallen = 150122
totallen = 151582
totallen = 153042
totallen = 154502
totallen = 155962
totallen = 157422
totallen = 158882
totallen = 160342
totallen = 161802
totallen = 163262
totallen = 164722
totallen = 166182
totallen = 167642
totallen = 169102
totallen = 170562
totallen = 172022
totallen = 173482
totallen = 174942
totallen = 176402
totallen = 177862
totallen = 179322
totallen = 180782
totallen = 182242
totallen = 183702
totallen = 185162
totallen = 186622
totallen = 188082
totallen = 189542
totallen = 191002
totallen = 192462
totallen = 193922
totallen = 195382
totallen = 196842
totallen = 198302
totallen = 199762
totallen = 201222
totallen = 202682
totallen = 204142
totallen = 205602
totallen = 207062
totallen = 208522
totallen = 209982
totallen = 211442
totallen = 212902
totallen = 214362
totallen = 215822
totallen = 217282
totallen = 218742
totallen = 220202
totallen = 221662
totallen = 223122
totallen = 224582
totallen = 226042
totallen = 227502
totallen = 228962
totallen = 230422
totallen = 231882
totallen = 233342
totallen = 234802
totallen = 236262
totallen = 237722
totallen = 239182
totallen = 240642
totallen = 242102
totallen = 243562
totallen = 245022
totallen = 246482
totallen = 247942
totallen = 249402
totallen = 250862
totallen = 252322
totallen = 253782
totallen = 255242
totallen = 256702
totallen = 258162
totallen = 259622
totallen = 261082
totallen = 262542
totallen = 264002
totallen = 265462
totallen = 266922
totallen = 268382
totallen = 269842
totallen = 271302
totallen = 272762
totallen = 274222
totallen = 275682
totallen = 277142
totallen = 278602
totallen = 280062
totallen = 281522
totallen = 282982
totallen = 284442
totallen = 285902
totallen = 287362
totallen = 288822
totallen = 290282
totallen = 291742
totallen = 293202
totallen = 294662
totallen = 296122
totallen = 297582
totallen = 299042
totallen = 300502
totallen = 301962
totallen = 303422
totallen = 304882
totallen = 306342
totallen = 307802
totallen = 309262
totallen = 310722
totallen = 312182
totallen = 313642
totallen = 315102
totallen = 316562
totallen = 318022
totallen = 319482
totallen = 320942
totallen = 322402
totallen = 323862
totallen = 325322
totallen = 326782
totallen = 328242
totallen = 329702
totallen = 331162
totallen = 332622
totallen = 334082
totallen = 335542
totallen = 337002
totallen = 338462
totallen = 339922
totallen = 341382
totallen = 342842
totallen = 344302
totallen = 345762
totallen = 347222
totallen = 348682
totallen = 350142
totallen = 351602
totallen = 353062
totallen = 354522
totallen = 355982
totallen = 357442
totallen = 357444
upgrade file download finished.
flash_crc = 1940848640
img_crc = 1940912746

upgrade_check

后面我把文件从外网服务器取下来放到了我本地搭建的服务器上面(自己电脑),测试没问题,搞不懂为什么会这样,我看上面说什么tools更新,这个应该不对吧,毕竟我那个用了两年多了,一直OK.而且我本地服务器验证也OK.下面是我本地服务器的升级的结果相同文件:

GET /esp8266/?is_format_simple=true HTTP/1.0
Host: 192.168.5.13
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: */*
Accept-Encoding: gzip,deflate
Accept-Language: zh-CN,eb-US;q=0.8

system_upgrade_start
upgrade_connect 21552
upgrade_connect_cb
pusrdata = HTTP/1.1 200 OK
Date: Thu, 07 Jun 2018 06:53:26 GMT
Server: Apache/2.4.23 (Win32) OpenSSL/1.0.2j PHP/5.4.45
Last-Modified: Thu, 07 Jun 2018 06:52:27 GMT
ETag: "57444-56e07b9fb40e2"
Accept-Ranges: bytes
Content-Length: 357444
Connection: close
Content-Type: application/octet-stream


sumlength = 357444
sec_block 88
........................................................................................upgrade_get_sum_disconcb 19488
erase sector=1 ok
erase sector=2 ok
erase sector=3 ok
erase sector=4 ok
erase sector=5 ok
erase sector=6 ok
erase sector=7 ok
erase sector=8 ok
erase sector=9 ok
erase sector=10 ok
erase sector=11 ok
erase sector=12 ok
erase sector=13 ok
erase sector=14 ok
erase sector=15 ok
erase sector=16 ok
erase sector=17 ok
erase sector=18 ok
erase sector=19 ok
erase sector=20 ok
erase sector=21 ok
erase sector=22 ok
erase sector=23 ok
erase sector=24 ok
erase sector=25 ok
erase sector=26 ok
erase sector=27 ok
erase sector=28 ok
erase sector=29 ok
erase sector=30 ok
erase sector=31 ok
erase sector=32 ok
erase sector=33 ok
erase sector=34 ok
erase sector=35 ok
erase sector=36 ok
erase sector=37 ok
erase sector=38 ok
erase sector=39 ok
erase sector=40 ok
erase sector=41 ok
erase sector=42 ok
erase sector=43 ok
erase sector=44 ok
erase sector=45 ok
erase sector=46 ok
erase sector=47 ok
erase sector=48 ok
erase sector=49 ok
erase sector=50 ok
erase sector=51 ok
erase sector=52 ok
erase sector=53 ok
erase sector=54 ok
erase sector=55 ok
erase sector=56 ok
erase sector=57 ok
erase sector=58 ok
erase sector=59 ok
erase sector=60 ok
erase sector=61 ok
erase sector=62 ok
erase sector=63 ok
erase sector=64 ok
erase sector=65 ok
erase sector=66 ok
erase sector=67 ok
erase sector=68 ok
erase sector=69 ok
erase sector=70 ok
erase sector=71 ok
erase sector=72 ok
erase sector=73 ok
erase sector=74 ok
erase sector=75 ok
erase sector=76 ok
erase sector=77 ok
erase sector=78 ok
erase sector=79 ok
erase sector=80 ok
erase sector=81 ok
erase sector=82 ok
erase sector=83 ok
erase sector=84 ok
erase sector=85 ok
erase sector=86 ok
erase sector=87 ok
erase sector=88 ok

ALL=88 sectors erase ok!
upgrade_connect_cb
sumlength = 357444
upgrade file download start.
totallen = 2590
totallen = 4050
totallen = 5510
totallen = 6970
totallen = 8430
totallen = 9890
totallen = 11350
totallen = 12810
totallen = 14270
totallen = 15730
totallen = 17190
totallen = 18650
totallen = 20110
totallen = 21570
totallen = 23030
totallen = 24490
totallen = 25950
totallen = 27410
totallen = 28870
totallen = 30330
totallen = 31790
totallen = 33250
totallen = 34710
totallen = 36170
totallen = 37630
totallen = 39090
totallen = 40550
totallen = 42010
totallen = 43470
totallen = 44930
totallen = 46390
totallen = 47850
totallen = 49310
totallen = 50770
totallen = 52230
totallen = 53690
totallen = 55150
totallen = 56610
totallen = 58070
totallen = 59530
totallen = 60990
totallen = 62450
totallen = 63910
totallen = 65370
totallen = 66830
totallen = 68290
totallen = 69750
totallen = 71210
totallen = 72670
totallen = 74130
totallen = 75590
totallen = 77050
totallen = 78510
totallen = 79970
totallen = 81430
totallen = 82890
totallen = 84350
totallen = 85810
totallen = 87270
totallen = 88730
totallen = 90190
totallen = 91650
totallen = 93110
totallen = 94570
totallen = 96030
totallen = 97490
totallen = 98950
totallen = 100410
totallen = 101870
totallen = 103330
totallen = 104790
totallen = 106250
totallen = 107710
totallen = 109170
totallen = 110630
totallen = 112090
totallen = 113550
totallen = 115010
totallen = 116470
totallen = 117930
totallen = 119390
totallen = 120850
totallen = 122310
totallen = 123770
totallen = 125230
totallen = 126690
totallen = 128150
totallen = 129610
totallen = 131070
totallen = 132530
totallen = 133990
totallen = 135450
totallen = 136910
totallen = 138370
totallen = 139830
totallen = 141290
totallen = 142750
totallen = 144210
totallen = 145670
totallen = 147130
totallen = 148590
totallen = 150050
totallen = 151510
totallen = 152970
totallen = 154430
totallen = 155890
totallen = 157350
totallen = 158810
totallen = 160270
totallen = 161730
totallen = 163190
totallen = 164650
totallen = 166110
totallen = 167570
totallen = 169030
totallen = 170490
totallen = 171950
totallen = 173410
totallen = 174870
totallen = 176330
totallen = 177790
totallen = 179250
totallen = 180710
totallen = 182170
totallen = 183630
totallen = 185090
totallen = 186550
totallen = 188010
totallen = 189470
totallen = 190930
totallen = 192390
totallen = 193850
totallen = 195310
totallen = 196770
totallen = 198230
totallen = 199690
totallen = 201150
totallen = 202610
totallen = 204070
totallen = 205530
totallen = 206990
totallen = 208450
totallen = 209910
totallen = 211370
totallen = 212830
totallen = 214290
totallen = 215750
totallen = 217210
totallen = 218670
totallen = 220130
totallen = 221590
totallen = 223050
totallen = 224510
totallen = 225970
totallen = 227430
totallen = 228890
totallen = 230350
totallen = 231810
totallen = 233270
totallen = 234730
totallen = 236190
totallen = 237650
totallen = 239110
totallen = 240570
totallen = 242030
totallen = 243490
totallen = 244950
totallen = 246410
totallen = 247870
totallen = 249330
totallen = 250790
totallen = 252250
totallen = 253710
totallen = 255170
totallen = 256630
totallen = 258090
totallen = 259550
totallen = 261010
totallen = 262470
totallen = 263930
totallen = 265390
totallen = 266850
totallen = 268310
totallen = 269770
totallen = 271230
totallen = 272690
totallen = 274150
totallen = 275610
totallen = 277070
totallen = 278530
totallen = 279990
totallen = 281450
totallen = 282910
totallen = 284370
totallen = 285830
totallen = 287290
totallen = 288750
totallen = 290210
totallen = 291670
totallen = 293130
totallen = 294590
totallen = 296050
totallen = 297510
totallen = 298970
totallen = 300430
totallen = 301890
totallen = 303350
totallen = 304810
totallen = 306270
totallen = 307730
totallen = 309190
totallen = 310650
totallen = 312110
totallen = 313570
totallen = 315030
totallen = 316490
totallen = 317950
totallen = 319410
totallen = 320870
totallen = 322330
totallen = 323790
totallen = 325250
totallen = 326710
totallen = 328170
totallen = 329630
totallen = 331090
totallen = 332550
totallen = 334010
totallen = 335470
totallen = 336930
totallen = 338390
totallen = 339850
totallen = 341310
totallen = 342770
totallen = 344230
totallen = 345690
totallen = 347150
totallen = 348610
totallen = 350070
totallen = 351530
totallen = 352990
totallen = 354450
totallen = 355910
totallen = 357370
totallen = 357444
upgrade file download finished.
flash_crc = 982677253
img_crc = 982677253
upgrade_check
reboot to use1
state: 5 -> 0 (0)
rm 0
pm close 7
del if0

现在问题就是CRC为什么会不一致呢?我用的NO OS版本,希望你们能尽快解决,现在我们的产品都无法远程升级,产品用在豪华别墅区,会严重影响用户体验度

Who is online

Users browsing this forum: No registered users and 5 guests