【已解决】【TuyaOS SDK】RV1109 Linux 运行sdk_6.1.1-beta.52 demo 连不上服务器
在sdk_6.1.1-beta.52 make 出demo程序后,放在RV1109 Linux 机器执行。./demo -c tuya -m 2 -t AYPVEWzz0omLW8
一直循环打印显示 连接mqtts://m6.tuyacn.com:8886 失败。是因为 授权码不正确导致的? 还是其他原因? 详细错误见附件
[01-01 00:01:39 ty N][tuya_svc_mqtt_client.c:836] connect to mqtt broker mqtts://m6.tuyacn.com:8886 port 8886
tkl_wired_get_ip 317: ifname=eth0
[01-01 00:01:39 ty N][tuya_svc_mqtt_client.c:846] mqtt client ip:192.168.248.173
[01-01 00:01:39 ty D][uni_network.c:230] unw_gethostbyname m6.tuyacn.com, prio 1
[01-01 00:01:39 ty D][uni_network.c:258] use system dns ip 121.5.96.27 for domain m6.tuyacn.com
[01-01 00:01:39 ty D][uni_network.c:185] cache dns [m6.tuyacn.com]<->[121.5.96.27]
[01-01 00:01:39 ty D][tcp_transporter.c:79] bind ip:c0a8f8ad port:27342 ok
[01-01 00:01:39 ty D][tuya_tls.c:945] MAX SECURITY_LEVEL:1, TUYA SECURITY_LEVEL:1, mode:1
[01-01 00:01:39 ty D][tuya_tls.c:954] TUYA_TLS Begin Connect m6.tuyacn.com:8886
[01-01 00:01:39 ty D][tuya_tls.c:714] mbedtls authmode: MBEDTLS_SSL_VERIFY_REQUIRED
[01-01 00:01:39 ty D][tuya_tls.c:727] load tuya cert.
[01-01 00:01:39 ty D][tuya_cert_manager.c:213] p_url:m6.tuyacn.com:8886, rcs.urlx:h6.iot-dns.com
[01-01 00:01:39 ty D][tuya_cert_manager.c:236] tuya public url
[01-01 00:01:39 ty D][tuya_cert_manager.c:1099] parse crt <0> len <540> ret <0>
[01-01 00:01:39 ty D][tuya_tls.c:1036] socket fd is set. set to inner send/recv to handshake
[01-01 00:01:39 ty D][tuya_tls.c:687] mbedtls_cert_pkey_free.
[01-01 00:01:39 ty D][tuya_tls.c:1098] handshake finish for m6.tuyacn.com. set send/recv to user set
[01-01 00:01:39 ty D][tuya_tls.c:1104] TUYA_TLS Success Connect m6.tuyacn.com:8886 Suit:TLS-ECDHE-ECDSA-WITH-AES-128-GCM-SHA256
[01-01 00:01:39 ty N][tuya_svc_mqtt_client.c:883] setup mqtt transporter success
[01-01 00:01:39 ty N][tuya_svc_mqtt_client.c:177] [mqtts://m6.tuyacn.com:8886] mqtt state change 1 -> 2
[01-01 00:01:39 ty N][tuya_svc_mqtt_client.c:908] send mqtt connect success
[01-01 00:01:39 ty N][tuya_svc_mqtt_client.c:177] [mqtts://m6.tuyacn.com:8886] mqtt state change 2 -> 3
[01-01 00:01:39 ty E][tuya_svc_mqtt_client.c:928] host[mqtts://m6.tuyacn.com:8886] mqtt connect resp err:5
[01-01 00:01:39 ty D][tuya_svc_mqtt_direct.c:132] mqtt connect deny:16
[01-01 00:01:39 ty N][svc_netcfg_qrcode.c:89] direct mqtt disconnected
[01-01 00:01:39 ty N][tuya_svc_mqtt_client.c:665] mqtt close
[01-01 00:01:39 ty D][tls_transporter.c:93] tls transporter close socket fd:9
[01-01 00:01:39 ty D][tcp_transporter.c:177] tcp transporter close socket fd:9
[01-01 00:01:39 ty D][tls_transporter.c:101] tls transporter close tls handler:0xa37009b8
[01-01 00:01:39 ty D][tuya_tls.c:1180] TUYA_TLS Disconnect ENTER
[01-01 00:01:39 ty D][tuya_tls.c:1205] TUYA_TLS Disconnect Success
[01-01 00:01:39 ty D][tuya_tls.c:907] tuya_tls_connect_destroy.
[01-01 00:01:39 ty N][tuya_svc_mqtt_client.c:177] [mqtts://m6.tuyacn.com:8886] mqtt state change 3 -> 1
[01-01 00:01:39 ty D][tuya_svc_mqtt_direct.c:124] mqtt disconnected
[01-01 00:01:39 ty N][svc_netcfg_qrcode.c:89] direct mqtt disconnected
[01-01 00:01:39 ty D][tuya_svc_mqtt_client.c:717] mqtt fail_cnt:16, sleeptime:10941 ms