【已解决】OTA升级失败

Wi-Fi 设备、Wi-Fi 低功耗设备、Wi-Fi BLE 双模设备、Ethernet设备、Ethernet+Wi-Fi设备等
Zzzl
Posts: 6

OTA升级失败,报错内容是[tuya_svc_upgrade.c:405] size error锛flash 4294967295, file 557920, diff_ota 0, ota type 2.

Attachments
微信图片_20230227094619.png

Tags:
愚者千虑必有一得
Posts: 426

Re: OTA升级失败

有完整的log么?看着是ota的类型和配置的ota包不匹配。

Zzzl
Posts: 6

Re: OTA升级失败

log如附件,类型在哪里配置哈?

Attachments
log.txt
(118.18 KiB) Downloaded 45 times
愚者千虑必有一得
Posts: 426

Re: OTA升级失败

你用的是eswin ecr6600的芯片,这个芯片ota的是差分的,但是看log你没有配差分ota。你可以看看你配置的ota,截图发一下。

企业微信截图_16774986686563.png
企业微信截图_16774987225198.png
企业微信截图_167749873654.png
愚者千虑必有一得
Posts: 426

Re: OTA升级失败

Zzzl
Posts: 6

Re: OTA升级失败

嗯呢,确实没有配置差分升级。sdk编译生成的UG固件好像是压缩的,是需要在sdk配置成差分模式么?上传output文件夹下哪个文件作为差分固件?

Attachments
微信截图_20230228161701.png
愚者千虑必有一得
Posts: 426

Re: OTA升级失败

Zzzl 2023年 Feb 28日 16:19

嗯呢,确实没有配置差分升级。sdk编译生成的UG固件好像是压缩的,是需要在sdk配置成差分模式么?上传output文件夹下哪个文件作为差分固件?

传那个UG的。UG的固件传升级固件的同时,也上传到用于差分的固件那个地方。

Zzzl
Posts: 6

Re: OTA升级失败

没成功,帮忙看下log和配置哈。

Attachments
微信截图_20230302095131.png
微信截图_20230302095111.png
微信截图_20230302095027.png
session_20230228.log
(206.27 KiB) Downloaded 51 times
愚者千虑必有一得
Posts: 426

Re: OTA升级失败

看着ota类型没问题了
[15:31:12:390][00:01:16.908][02-28 15:31:13 ty D][tuya_svc_upgrade.c:526] hmac:B13BC14F56C9A04250C01BC1F44F86C2D4ABCCFD909B0E01F9F81EEAD5A9F0BA, md5:bb286399e20b5dc778a711a1be189c90, ver:1.0.3,url:https://fireware-ttls.tuyacn.com:2443/s ... v_id:,tp:0, diff:1

不过文件下载失败了,我找云端同事问下
[15:31:13:120][00:01:17.611][02-28 15:31:14 ty D][iot_httpc.c:1976] begin to download file. total_len:558160 offset:0 url:https://fireware-ttls.tuyacn.com:2443/s ... 7569167219 hmacKey:20652deec1e78fc9 16
[15:31:13:126][00:01:17.633][02-28 15:31:14 ty D][iot_httpc.c:1985] try:0 offset:0 total_size:558160
[15:31:13:126][00:01:17.641][02-28 15:31:14 ty D][http_inf.c:226] Get File In Range Mode [0 558160]
[15:31:13:127][00:01:17.647][02-28 15:31:14 ty D][httpc.c:619] Connect: fireware-ttls.tuyacn.com Port: 2443 -->>
[15:31:13:157][00:01:17.658][02-28 15:31:14 ty D][uni_network.c:323] unw_gethostbyname fireware-ttls.tuyacn.com, prio 2
[15:31:13:158]
[15:31:13:175][00:01:17.687][02-28 15:31:14 ty D][uni_network.c:373] use system dns ip 42.192.30.234 for domain fireware-ttls.tuyacn.com
[15:31:13:175]
[15:31:13:176][00:01:17.697][02-28 15:31:14 ty D][uni_network.c:276] cache dns [fireware-ttls.tuyacn.com]<->[42.192.30.234]
[15:31:13:186][00:01:17.706][02-28 15:31:14 ty D][tcp_transporter.c:79] bind ip:c0a832cc port:0 ok
[15:31:13:227][00:01:17.751][02-28 15:31:14 ty D][tuya_tls.c:935] SECURITY_LEVEL:0, mode:0
[15:31:13:242][00:01:17.758][02-28 15:31:14 ty D][tuya_tls.c:944] TUYA_TLS Begin Connect fireware-ttls.tuyacn.com:2443
[15:31:13:262][00:01:17.766][02-28 15:31:14 ty D][tuya_tls.c:966] TUYA_TLS PSK Mode
[15:31:13:263][00:01:17.773][02-28 15:31:14 ty D][tuya_tls.c:1023] socket fd is set. set to inner send/recv to handshake
[15:31:13:429][00:01:17.943][02-28 15:31:14 ty D][tuya_tls.c:1079] handshake finish for fireware-ttls.tuyacn.com. set send/recv to user set
[15:31:13:459][00:01:17.954][02-28 15:31:14 ty D][tuya_tls.c:1085] TUYA_TLS Success Connect fireware-ttls.tuyacn.com:2443 Suit:TLS-PSK-WITH-AES-128-CBC-SHA256
[15:31:13:460][00:01:17.965][02-28 15:31:14 ty D][httpc.c:621] Connect: fireware-ttls.tuyacn.com Port: 2443 --<< ,r:0
[15:31:13:590][00:01:18.111][02-28 15:31:14 ty D][tuya_svc_upgrade.c:1068] percent 0 offset:0 total:558160 report:1
[15:31:13:591][00:01:18.119][02-28 15:31:14 ty D][tuya_svc_upgrade.c:1032] mqtt report download percent:0
[15:31:13:594][00:01:18.128][02-28 15:31:14 ty D][mqtt_client.c:1936] packet id: 5
[15:31:13:630][00:01:18.136]****************start OTA****************
[15:31:13:630][00:01:18.140]path_head_max_len = 1130496 , flash_max_len = 1884160 magic_ver = 0x4d4d4d
[15:31:13:630][00:01:18.148]max len...firm_pack_len:0x89000, max_len:0x114000
[15:31:13:630][00:01:18.154]path bin head magic_ver is error!
[15:31:13:632][00:01:18.156]check path bin head error!
[15:31:13:657][00:01:18.162][02-28 15:31:14 ty E][iot_httpc.c:1909] data handle err:-1
[15:31:13:679][00:01:18.167][02-28 15:31:14 ty D][iot_httpc.c:1932] This Time Download 0 Byte. Offset:0
[15:31:13:679][00:01:18.178][02-28 15:31:14 ty D][mqtt_client.c:1514] mqtt[m3.tuyacn.com] status:7
[15:31:13:679][00:01:18.186][02-28 15:31:14 ty E][iot_httpc.c:1935] download err this time -1

Zzzl
Posts: 6

Re: OTA升级失败

ok,麻烦了!

Post Reply