Page 1 of 1

偶尔报错Open session failed

Posted: 2024年 Mar 14日 14:52
by 18688714932

cbu模组,已经授权烧录,正常用app控制没问题,长时间不用app后再打开app使用,网关有大概率无法响应,报错Open session failed,请问如何解决,具体log如下:
[03-14 14:29:28 ty D][lr:0x77457] custom async cb op_ret: 0
[03-14 14:29:28 ty D][lr:0x77f57] pub finish:0
[03-14 14:29:28 ty D][lr:0x82851] schema[figve8] not updated since activated
[03-14 14:29:28 ty D][lr:0xadd6f] Post Data: {"subId":null,"t":1710397768}
[03-14 14:29:28 ty D][lr:0xaddaf] Post URL: https://a3.tuyacn.com/d.json?a=tuya.dev ... 8eaac9af2e
[03-14 14:29:28 ty D][lr:0xa5db7] Connect: a3.tuyacn.com Port: 443 -->>
[03-14 14:29:28 ty D][lr:0x7679d] unw_gethostbyname a3.tuyacn.com, prio 1
[03-14 14:29:28 ty D][lr:0x768c9] use dynamic dns ip:81.69.183.170 for domain:a3.tuyacn.com
[03-14 14:29:28 ty D][lr:0xb7101] bind ip:c0a8019f port:0 ok
[03-14 14:29:29 ty D][lr:0x76f35] MAX SECURITY_LEVEL:0, TUYA SECURITY_LEVEL:0, mode:0
[03-14 14:29:29 ty D][lr:0x76f4f] TUYA_TLS Begin Connect a3.tuyacn.com:443
[03-14 14:29:29 ty D][lr:0x76fbf] TUYA_TLS PSK Mode
[03-14 14:29:29 ty D][lr:0x77045] socket fd is set. set to inner send/recv to handshake
[03-14 14:29:30 ty D][lr:0x89ae5] set time by rtc
[03-14 14:29:34 ty D][lr:0x8c135] feed watchdog
[03-14 14:29:35 ty D][lr:0xa3ae3] fd:8, wk_stat = 2, type = 13
[03-14 14:29:35 ty D][lr:0xa3123] JSON string:{"data":{"dps":{"111":true}},"protocol":5,"t":1710397775}
[03-14 14:29:35 ty D][lr:0xa3195] Rev TP CMD. Send to User,Lan Ver 3.5
[03-14 14:29:37 ty E][lr:0x76ab3] select fail.0
[03-14 14:29:37 ty E][lr:0x7706f] mbedtls_ssl_handshake returned 0x64
[03-14 14:29:37 ty E][lr:0x770d5] TUYA_TLS faild Connect a3.tuyacn.com:443
[03-14 14:29:37 ty E][lr:0x7a81b] tls transporter connect err:-100
[03-14 14:29:37 ty D][lr:0x7a6e9] tls transporter close socket fd:7
[03-14 14:29:37 ty D][lr:0xb71a1] tcp transporter close socket fd:7
[03-14 14:29:37 ty D][lr:0x7a703] tls transporter close tls handler:0x4160a4
[03-14 14:29:37 ty D][lr:0x7723b] TUYA_TLS Disconnect ENTER
[03-14 14:29:37 ty D][lr:0x7728b] TUYA_TLS Disconnect Success
[03-14 14:29:37 ty D][lr:0xa5dd1] Connect: a3.tuyacn.com Port: 443 --<< ,r:-1
get rssi: -35
get rssi: -35
get rssi: -35
get rssi: -35
get rssi: -35
[03-14 14:29:37 ty D][lr:0x9d135] Get Rssi:-35
[03-14 14:29:37 ty D][lr:0x8b877] url:a3.tuyacn.com
[03-14 14:29:37 ty D][lr:0x8b88b] pstr:.tuyacn.com
[03-14 14:29:37 ty D][lr:0x7a6e9] tls transporter close socket fd:-1
[03-14 14:29:37 ty D][lr:0x7a715] tls transporter already closed
[03-14 14:29:37 ty D][lr:0x76ec7] tuya_tls_connect_destroy.
[03-14 14:29:37 ty D][lr:0x76579] save dns info now prio 0
[03-14 14:29:37 ty D][lr:0x76755] lower_dns_cache_priority:0
[03-14 14:29:37 ty E][lr:0xc2049] Open session failed: https://a3.tuyacn.com/d.json?a=tuya.dev ... 8eaac9af2e (-1)
[03-14 14:29:38 ty E][lr:0xadde3] Post Data Return Fail.-2050
[03-14 14:29:38 ty E][tuya_svc_upgrade.c:882] ret:-2050
[03-14 14:29:38 ty D][lr:0x81a87] silent get firmware fail
[03-14 14:29:38 ty D][lr:0x81431] next detect timer: 21600s
[03-14 14:29:38 ty E][lr:0xc1dcb] uf_open netcfg_log err 8
[03-14 14:29:38 ty D][lr:0x8b493] [8][59]:{"ts":1710397777,"dt":8,"tp":2,"u":1,"du":9,"tm":0,"r":-35}
[03-14 14:29:38 ty D][lr:0x8b351] index:2 offset:1024, 0, 2048, -4
[03-14 14:29:38 ty D][lr:0x8b4f9] read file ok at offset:2048
[03-14 14:29:38 ty D][lr:0x8b513] available slot index:13, part index: 2, part offset:2048
[03-14 14:29:38 ty D][lr:0x8b179] before file_size:3072, after file_size:3072
[03-14 14:29:38 ty E][lr:0x8b56d] data update ret:0
[03-14 14:29:38 ty D][lr:0x7940b] packet id: 5
[03-14 14:29:45 ty N][lr:0x78149] qos1 package timeout, cnt:0 msg_id:4
[03-14 14:29:45 ty N][lr:0x781b9] reset mid 5
[03-14 14:29:45 ty E][lr:0xa9b15] dp_report err:-2318
result: -2318[03-14 14:29:45 ty D][lr:0xa9aad] rept chan:3
[03-14 14:29:45 ty E][lr:0xa7c4d] DP ID:111 Verify Fail:1 0 0
[03-14 14:29:45 ty D][lr:0xa814f] obj dp rept filtered:111
[03-14 14:29:45 ty D][lr:0xa81d3] no vaild dp to rept
[03-14 14:29:45 ty D][lr:0xa9adb] dp compose null, ret:-3585


Re: 偶尔报错Open session failed

Posted: 2024年 Mar 14日 15:04
by 18688714932

sdk版本3.8.5


Re: 偶尔报错Open session failed

Posted: 2024年 Mar 14日 15:10
by 一线长天

请再次确认下SDK版本?根据提供的日志查看设备使用的SDK版本是:tuyaos-iot_3.9.0_bk7231n_wifi-ble-com_1.3.5
另外,能否提供完整的日志,即从上电开始,到长时间不用出现控制失效的场景。


Re: 偶尔报错Open session failed

Posted: 2024年 Mar 14日 15:13
by 18688714932

这种问题不是一直出现,只能偶尔逮到几次,我刚才升级到了3.9.0版本,看下有没有改善


Re: 偶尔报错Open session failed

Posted: 2024年 Mar 14日 15:20
by 18688714932

从上电开始的log


Re: 偶尔报错Open session failed

Posted: 2024年 Mar 15日 09:29
by 一线长天
企业微信截图_17104658695972.png

日志里看,本次网络访问时,数据接收超时了(5s)。
问题与APP是否长时间不使用没有关系,仅是设备端网络异常。
需要排查下设备连接的路由器是否设备连接过多?路由器外网连接的稳定性?可以尝试更换路由器再挂测下