tuya / tuya-open-sdk-for-device

Tuya open source IoT development framework for device
https://github.com/tuya/tuya-open-sdk-for-device
Other
30 stars 13 forks source link

mqtt connect fail #1

Closed BOBBOM closed 8 months ago

BOBBOM commented 8 months ago

when i excute demo, here are the error log

[02-01 09:47:05 ty E][mqtt_client_wrapper.c:228] mqtt connect err: Connection not authorized(11) [02-01 09:47:05 ty D][tls_transporter.c:94] tls transporter close socket fd:7 [02-01 09:47:05 ty D][tcp_transporter.c:175] tcp transporter close socket fd:7 [02-01 09:47:05 ty D][tls_transporter.c:102] tls transporter close tls handler:0x7fd3a7add5e8 [02-01 09:47:05 ty D][tuya_tls.c:685] TUYA_TLS Disconnect ENTER [02-01 09:47:05 ty D][tuya_tls.c:710] TUYA_TLS Disconnect Success [02-01 09:47:05 ty E][mqtt_service.c:406] MQTT connect fail:3 [02-01 09:47:05 ty E][mqtt_bind.c:107] tuya mqtt connect fail:-34, retry.. [02-01 09:47:07 ty I][mqtt_service.c:394] clientid:acon_uuidxxxxxxxxxxxxxxxx [02-01 09:47:07 ty I][mqtt_service.c:395] username:acon_uuidxxxxxxxxxxxxxxxx|pv=2.3 [02-01 09:47:07 ty D][mqtt_service.c:396] password:8346f0e4d2e9d2e4 [02-01 09:47:07 ty I][mqtt_service.c:397] topic_in:d/ai/uuidxxxxxxxxxxxxxxxx [02-01 09:47:07 ty I][mqtt_service.c:398] topic_out: [02-01 09:47:07 ty I][mqtt_service.c:399] tuya_mqtt_start... [02-01 09:47:07 ty D][tcp_transporter.c:77] bind ip:00000000 port:0 ok q[02-01 09:47:07 ty D][tuya_tls.c:488] TUYA_TLS Begin Connect m2.tuyacn.com:8883 [02-01 09:47:07 ty D][tuya_tls.c:300] mbedtls authmode: MBEDTLS_SSL_VERIFY_REQUIRED [02-01 09:47:07 ty D][tuya_tls.c:313] load root ca cert.

mhtcc520 commented 8 months ago

Hi,

[02-01 09:47:07 ty I][mqtt_service.c:394] clientid:acon_uuidxxxxxxxxxxxxxxxx [02-01 09:47:07 ty I][mqtt_service.c:395] username:acon_uuidxxxxxxxxxxxxxxxx|pv=2.3

The log shown the config of the demo is invalid, please update the UUID&AUTHKEY which located in examples/switch_demo/src/tuya_config.h. For detail please refer to : quick start with TuyaOS