Page 1 of 1

【已关闭】ubuntu x86 平台运行 X86_64_TuyaOS-3.6.1demo 配网,初次正常,关机再运行mqtt校验失败

Posted: 2024年 Jul 10日 09:30
by 15221584146

现象
运行tuya wind下载的demo,mqtt连接失败,关键日志如下

WIFI[0] Get IP:
[01-01 00:00:44 ty N][tuya_svc_mqtt_client.c:836] connect to mqtt broker mqtts://m6.tuyacn.com:8886 port 8886
ens33 No such device

ens33: error fetching interface information: Device not found
ens33: error fetching interface information: Device not found
WIFI[0] Get IP:
[01-01 00:00:44 ty N][tuya_svc_mqtt_client.c:846] mqtt client ip:
[01-01 00:00:44 ty D][uni_network.c:230] unw_gethostbyname m6.tuyacn.com, prio 1
[01-01 00:00:44 ty D][uni_network.c:258] use system dns ip 121.5.96.27 for domain m6.tuyacn.com

[01-01 00:00:44 ty D][uni_network.c:185] cache dns [m6.tuyacn.com]<->[121.5.96.27]
[01-01 00:00:44 ty D][tcp_transporter.c:79] bind ip:ffffffff port:28855 ok
[01-01 00:00:44 ty D][tuya_tls.c:945] MAX SECURITY_LEVEL:1, TUYA SECURITY_LEVEL:1, mode:1
[01-01 00:00:44 ty D][tuya_tls.c:954] TUYA_TLS Begin Connect m6.tuyacn.com:8886
[01-01 00:00:44 ty D][tuya_tls.c:714] mbedtls authmode: MBEDTLS_SSL_VERIFY_REQUIRED
[01-01 00:00:44 ty D][tuya_tls.c:727] load tuya cert.
[01-01 00:00:44 ty D][tuya_cert_manager.c:213] p_url:m6.tuyacn.com:8886, rcs.urlx:h6.iot-dns.com
[01-01 00:00:44 ty D][tuya_cert_manager.c:236] tuya public url
[01-01 00:00:44 ty D][tuya_cert_manager.c:1099] parse crt <0> len <540> ret <0>
[01-01 00:00:44 ty D][tuya_tls.c:1036] socket fd is set. set to inner send/recv to handshake
[01-01 00:00:44 ty D][tuya_tls.c:687] mbedtls_cert_pkey_free.
[01-01 00:00:44 ty D][tuya_tls.c:1098] handshake finish for m6.tuyacn.com. set send/recv to user set
[01-01 00:00:44 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:00:44 ty N][tuya_svc_mqtt_client.c:883] setup mqtt transporter success
[01-01 00:00:44 ty N][tuya_svc_mqtt_client.c:177] [mqtts://m6.tuyacn.com:8886] mqtt state change 1 -> 2
[01-01 00:00:44 ty N][tuya_svc_mqtt_client.c:908] send mqtt connect success
[01-01 00:00:44 ty N][tuya_svc_mqtt_client.c:177] [mqtts://m6.tuyacn.com:8886] mqtt state change 2 -> 3
[01-01 00:00:44 ty E][tuya_svc_mqtt_client.c:928] host[mqtts://m6.tuyacn.com:8886] mqtt connect resp err:5
[01-01 00:00:44 ty D][tuya_svc_mqtt_direct.c:132] mqtt connect deny:9
[01-01 00:00:44 ty N][tuya_svc_mqtt_client.c:665] mqtt close
[01-01 00:00:44 ty D][tls_transporter.c:93] tls transporter close socket fd:9
[01-01 00:00:44 ty D][tcp_transporter.c:177] tcp transporter close socket fd:9
[01-01 00:00:44 ty D][tls_transporter.c:101] tls transporter close tls handler:0x77748c000e00
[01-01 00:00:44 ty D][tuya_tls.c:1180] TUYA_TLS Disconnect ENTER
[01-01 00:00:44 ty D][tuya_tls.c:1205] TUYA_TLS Disconnect Success
[01-01 00:00:44 ty D][tuya_tls.c:907] tuya_tls_connect_destroy.
[01-01 00:00:44 ty N][tuya_svc_mqtt_client.c:177] [mqtts://m6.tuyacn.com:8886] mqtt state change 3 -> 1
[01-01 00:00:44 ty D][tuya_svc_mqtt_direct.c:124] mqtt disconnected


Re: ubuntu x86 平台运行 X86_64_TuyaOS-3.6.1demo 配网,初次正常,关机再运行mqtt校验失败

Posted: 2024年 Jul 10日 09:52
by 郭老庄

ipc_sdk_run_var.qrcode_active_cb 赋值为NULL,再试试


Re: ubuntu x86 平台运行 X86_64_TuyaOS-3.6.1demo 配网,初次正常,关机再运行mqtt校验失败

Posted: 2024年 Jul 10日 10:27
by 15221584146

全局搜索就一个定义宏的地方,您说的给他赋空,在哪里操作呢?

截图参见附件的图片


Re: ubuntu x86 平台运行 X86_64_TuyaOS-3.6.1demo 配网,初次正常,关机再运行mqtt校验失败

Posted: 2024年 Jul 12日 09:15
by 郭老庄

如果你用了我们的demo,就在main.c文件,__TUYA_IPC_SDK_START函数,令ipc_sdk_run_var.qrcode_active_cb = NULL;