【已解决】[SDK开发]运行demo程序无法连接到涂鸦云
我使用的SDK版本是sdk_6.1.1-beta.83,开发方式选择的是SDK独立开发方式。按照文档,使用extract_standalone_sdk.sh脚本提取出来sdk的库文件和头文件之后,在software/sdk_6.1.1-beta.83目录下执行make命令,会生成demo可执行文件。我将demo文件以及修改过pid/uuid/authkey配置的tuya_device_cfg.json拷贝到运行环境的同一个目录下,并期望使用./demo -c ./ -m 2 -t AYD8z6FqmP1xxx 的方式运行demo程序并连接到涂鸦云平台,可是等了一会后,没有在涂鸦智能app上看到对应的设备连接。以下是程序的部分运行日志。
日志:
WIFI[0] Get IP:
[01-01 00:00:47 ty E][tuya_svc_lan.c:1069] sendto Fail: len:258 ret:-1,errno:-18 port:6667
[01-01 00:00:47 ty D][svc_netcfg_qrcode.c:127] start config
[01-01 00:00:47 ty D][tuya_svc_mqtt_direct.c:264] start direct mqtt
[01-01 00:00:47 ty D][uni_network.c:312] set_dns_cache_priority:1
[01-01 00:00:47 ty D][simplekv.c:1248] delete key:tls_ca_cnt isFuzzy:0
[01-01 00:00:47 ty D][simplekv.c:1254] cnt:5 delete bit arr len:1
[01-01 00:00:47 ty D][simplekv.c:1287] key:tls_ca_cnt not find
[01-01 00:00:47 ty D][simplekv.c:1248] delete key:tls_ca isFuzzy:1
[01-01 00:00:47 ty D][simplekv.c:1254] cnt:5 delete bit arr len:1
[01-01 00:00:47 ty D][simplekv.c:1287] key:tls_ca not find
[01-01 00:00:47 ty D][simplekv.c:1128] read key:tls_ca_cnt isFuzzy:0 skipCnt:0
[01-01 00:00:47 ty D][simplekv.c:1156] no key find
[01-01 00:00:47 ty D][simplekv.c:1198] __read_kv_raw fail. -3
[01-01 00:00:47 ty D][simplekv.c:1236] __read_kv_with_decode fail. -3
[01-01 00:00:47 ty D][tuya_cert_manager.c:463] load tls_ca_cnt fail. no ca in local db
[01-01 00:00:47 ty D][iot_httpc.c:1367] http_iot_dns_get_cloud_url start
[01-01 00:00:47 ty D][iot_httpc.c:1412] http_dns region , send: {"env":"pro","config":[{"key":"httpUrl","need_ca":false},{"key":"mqttUrl","need_ca":false},{"key":"httpsPSKUrl","need_ca":false},{"key":"mqttsPSK3Url","need_ca":false},{"key":"httpsStdUrl","need_ca":true},{"key":"mqttsStdUrl","need_ca":true},{"key":"ghostUrl","need_ca":true}]}
[01-01 00:00:47 ty D][tuya_register_center.c:434] rcs.urlx:h6.iot-dns.com
[01-01 00:00:47 ty D][iot_httpc.c:1416] get url config:https://h6.iot-dns.com/v1/url_config
sh: iwconfig: not found
ifconfig: ens33: error fetching interface information: Device not found
sh: iwconfig: not found
ifconfig: ens33: error fetching interface information: Device not found
WIFI[0] Get IP:
[01-01 00:00:48 ty D][httpc.c:620] Connect: h6.iot-dns.com Port: 443 -->>
[01-01 00:00:48 ty D][uni_network.c:230] unw_gethostbyname h6.iot-dns.com, prio 1
gethostbyname_r error: NULL
[01-01 00:00:48 ty E][uni_network.c:253] fail to gethostbyname -100
[01-01 00:00:48 ty D][uni_network.c:285] lower_dns_cache_priority:0
[01-01 00:00:48 ty E][tcp_transporter.c:41] DNS parser host h6.iot-dns.com failed -5
[01-01 00:00:48 ty E][tls_transporter.c:53] tcp transporter connect failed,ret:-0x7102
[01-01 00:00:48 ty D][httpc.c:622] Connect: h6.iot-dns.com Port: 443 --<< ,r:-28930
[01-01 00:00:48 ty D][tls_transporter.c:93] tls transporter close socket fd:-1
[01-01 00:00:48 ty D][tls_transporter.c:98] tls transporter already closed
[01-01 00:00:48 ty D][tuya_tls.c:907] tuya_tls_connect_destroy.
[01-01 00:00:48 ty E][http_inf.c:59] Open session failed: https://h6.iot-dns.com/v1/url_config (-28930)
[01-01 00:00:48 ty E][iot_httpc.c:1425] fail to get cloud url -2050
[01-01 00:00:48 ty D][uni_network.c:312] set_dns_cache_priority:1
[01-01 00:00:48 ty E][tuya_svc_mqtt_direct.c:270] ret:-2050
[01-01 00:00:48 ty E][svc_netcfg_qrcode.c:130] ret:-2050
[01-01 00:00:48 ty E][svc_netcfg_qrcode.c:144] start config failed
ifconfig: ens33: error fetching interface information: Device not found
ifconfig: ens33: error fetching interface information: Device not found
WIFI[0] Get IP:
sh: iwconfig: not found
ifconfig: ens33: error fetching interface information: Device not found
ifconfig: ens33: error fetching interface information: Device not found
WIFI[0] Get IP:
name_list NULL
sh: iwconfig: not found
ifconfig: ens33: error fetching interface information: Device not found
ifconfig: ens33: error fetching interface information: Device not found
WIFI[0] Get IP:
[01-01 00:00:48 ty E][tuya_svc_lan.c:1069] sendto Fail: len:258 ret:-1,errno:-18 port:6667
sh: iwconfig: not found
ifconfig: ens33: error fetching interface information: Device not found
ifconfig: ens33: error fetching interface information: Device not found
WIFI[0] Get IP:
sh: iwconfig: not found
ifconfig: ens33: error fetching interface information: Device not found
ifconfig: ens33: error fetching interface information: Device not found
WIFI[0] Get IP:
name_list NULL
sh: iwconfig: not found
ifconfig: ens33: error fetching interface information: Device not found
ifconfig: ens33: error fetching interface information: Device not found
WIFI[0] Get IP:
[01-01 00:00:49 ty E][tuya_svc_lan.c:1069] sendto Fail: len:258 ret:-1,errno:-18 port:6667
sh: iwconfig: not found
ifconfig: ens33: error fetching interface information: Device not found
ifconfig: ens33: error fetching interface information: Device not found
WIFI[0] Get IP:
sh: iwconfig: not found
ifconfig: ens33: error fetching interface information: Device not found
ifconfig: ens33: error fetching interface information: Device not found
WIFI[0] Get IP:
name_list NULL
sh: iwconfig: not found
ifconfig: ens33: error fetching interface information: Device not found
ifconfig: ens33: error fetching interface information: Device not found
WIFI[0] Get IP:
[01-01 00:00:50 ty E][tuya_svc_lan.c:1069] sendto Fail: len:258 ret:-1,errno:-18 port:6667
sh: iwconfig: not found
ifconfig: ens33: error fetching interface information: Device not found
ifconfig: ens33: error fetching interface information: Device not found
WIFI[0] Get IP:
sh: iwconfig: not found
ifconfig: ens33: error fetching interface information: Device not found
C[signal_handle, 59] get signal(2) name(demo)