【已解决】君正T31ZL/ZX SDK,支持4G模组

IPC/NVR/可视门铃等具备多媒体能力的设备,扫地机/AGV等机器人设备


selimily
Posts: 24

感谢,编译以已解决

另外

1)我用了4G模组,把USB虚拟成了网卡,已打通网络【USB网卡已经有IP,可以ping通百度】,如下SDK选哪个合适?
wifi_ble_fs
wifi_fs
wifi_wire_ble_fs
wifi_wire_fs
wire_fs

2)是否有样例支持扫描TUYA app的二维码,获得token,且嵌入IPC_5.x


Tags:
User avatar
起个中文名
Posts: 152

Re: 君正T31ZL/ZX SDK,支持4G模组

1、选择wire_fs
2、建议使用开源库,例如libzbar。

selimily
Posts: 24

Re: 君正T31ZL/ZX SDK,支持4G模组

[01-01 18:12:48 TUYA E][tuya_devos_activate.c:527] network unavailable
ioctl error
ioctl error
ioctl error
[01-01 18:12:49 TUYA E][tuya_devos_activate.c:527] network unavailable
[01-01 18:12:50 TUYA D][mqtt_client.c:982] serverIP 2030395559 port:8883
[01-01 18:12:50 TUYA D][mqtt_client.c:1007] mqtt over TLS is enabled. Host:m2.tuyacn.com Port:8883
[01-01 18:12:50 TUYA D][tuya_tls.c:1274] ----enable_cert:1,DEFAULT_LOAD_CERT:1
[01-01 18:12:50 TUYA D][tuya_tls.c:1317] TUYA_TLS Begin Connect m2.tuyacn.com:8883 CustomNet:TRUE Enable_Cert:TRUE Default:TRUE
[01-01 18:12:50 TUYA D][tuya_tls.c:1390] load tuya cert.
[01-01 18:12:50 TUYA D][tuya_tls.c:1395] parse crt <0> len <2002> ret <0>
[01-01 18:12:50 TUYA D][tuya_iot_com_api.c:259] tuya public url
[01-01 18:12:50 TUYA D][tuya_tls.c:1505] socket fd is set. set to inner send/recv to handshake
[01-01 18:12:50 TUYA D][tuya_tls.c:1550] handshake finish for m2.tuyacn.com. set send/recv to user set
[01-01 18:12:50 TUYA D][tuya_tls.c:1565] TUYA_TLS Success Connect m2.tuyacn.com:8883 CustomNet:TRUE Suit:TLS-ECDHE-RSA-WITH-AES-128-CBC-SHA256
[01-01 18:12:50 TUYA N][mqtt_client.c:1523] mqtt create success, begin to connect
[01-01 18:12:50 TUYA D][tuya_devos_health.c:30] feed watchdog
ioctl error
[01-01 18:12:50 TUYA E][tuya_devos_netlink.c:1116] get ip fail:-1
[01-01 18:12:50 TUYA E][mqtt_client.c:1078] mqtt connect resp err:5
[01-01 18:12:50 TUYA D][direct_connect_tuya.c:207] mqtt connect deny:5
[01-01 18:12:50 TUYA E][mqtt_client.c:1655] mq_logic_conn_proc err:-2313
[01-01 18:12:50 TUYA N][mqtt_client.c:1695] mqtt close
[01-01 18:12:50 TUYA N][mqtt_client.c:834] close mqtt -->>
[01-01 18:12:50 TUYA D][mqtt_client.c:846] shutdown fd enabled
[01-01 18:12:50 TUYA D][tuya_tls.c:1645] TUYA_TLS Disconnect ENTER
[01-01 18:12:50 TUYA D][tuya_tls.c:1700] TUYA_TLS Disconnect Success
[01-01 18:12:50 TUYA N][mqtt_client.c:879] close mqtt <<--
[01-01 18:12:50 TUYA D][mqtt_client.c:1712] mqtt fail_cnt:5, sleeptime:10685 ms
ioctl error

确认网络是通的-可以ping通百度

扫描涂鸦app-添加设备的二维码生成token
利用token启动程序 ./tuya_ipc_demo -m 3 -p xx -u xx -a xx -r "./" -t "token值”

帮忙看下如上报错,感谢

Attachments
Screenshot from 2023-12-25 21-39-51.png
selimily
Posts: 24

Re: 君正T31ZL/ZX SDK,支持4G模组

ifconfig -a
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

wwan0 Link encap:Ethernet HWaddr 9E:2F:1D:CF:52:61
inet addr:10.50.184.130 Mask:255.255.255.252
UP RUNNING NOARP MTU:1500 Metric:1
RX packets:462 errors:0 dropped:0 overruns:0 frame:0
TX packets:499 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:117848 (115.0 KiB) TX bytes:46052 (44.9 KiB)
网络如上

User avatar
起个中文名
Posts: 152

Re: 君正T31ZL/ZX SDK,支持4G模组

demo里面tuya_ipc_wired_demo.c,请根据自己的系统情况适配一下。
另外,建议你先去阅读下本板块置顶帖里面的对接文档,可以让你节省很多时间

selimily
Posts: 24

Re: 君正T31ZL/ZX SDK,支持4G模组

非常感谢,已解决,demo样例正常

selimily
Posts: 24

Re: 【已解决】君正T31ZL/ZX SDK,支持4G模组

追加一个问题

采用样例将读文件,修改为抓取摄像头的实时流

由于流为30帧每秒,导致占用了资源,无法建立mqtt连接,无法实时显示摄像头的视频流

请问,该如何操作? 感谢

User avatar
起个中文名
Posts: 152

Re: 【已解决】君正T31ZL/ZX SDK,支持4G模组

建议新问题单独发帖。
建立mqtt只需要建立一个tcp连接,并进行若干交互,对系统资源要求不是很高。建议新问题中提供下更详细的线索。

Post Reply