· Zen HuiFer · Tutorial · 1 min read
TCP/IP Access Device
This article details how to use the TCP/IP protocol to access devices in the Go IoT development platform, including access processes, authentication methods, and data transmission examples, helping developers quickly get started and achieve efficient device access.
Access Process
- Assuming you are now using a Linux system, you can try using the following command to establish communication with the TCP service
nc -v 127.0.0.1 3332
- The authentication method is to enter
uid:${device id}:{username}:{password}
, the test example is as follows.
Connection to 127.0.0.1 port 3332 [tcp/mcs-mailsvr] succeeded!
uid:1:admin:admin
成功识别设备编码.
Note that the username and password cannot contain
:
- After the connection is completed, the user can perform TCP/IP communication. If you are using the
nc
command, you only need to directly enter the relevant content and press Enter to complete the message sending. Here is an example of data sending
Connection to 127.0.0.1 port 3332 [tcp/mcs-mailsvr] succeeded!
uid:1:admin:admin
成功识别设备编码.
1
数据已处理.
2
数据已处理.
3
数据已处理.
4
数据已处理.
5
数据已处理.