
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
44
communication software and integrating the analysis of the serial communication
protocol of the device. This method is more flexible and efficient than virtual serial port.
Corresponding to
⑥
and
⑦
in Table 6
.
In the section
“4.3 TCP Communication Test” there mainly describe how to do
communication when serial device server as TCP Server. Here we will describe how the
TCP Client, UDP mode and multi-TCP connection communicate with computer software.
And the computer software takes SocketTest (simulate user TCP/IP communication
software) for example.
ZLAN serial device server follow the standard TCP/IP protocol, any network terminal
comply with the protocol can communicate with the serial device server. ZLAN provides
network debugging tool (SocketDlgTest programs) to simulate the network terminal to
communicate with the serial device server.
To realize 2 network terminal (here as the network debugging tool and serial device
server) can do communication, the parameter configuration must be matched.
5.2.1 TCP Client Mode
Work mode in the TCP mode has two type: TCP server and TCP client, no matter
adopt what kind of mode, must one is the Server, the other is the Client, then Client
can access the Server, both for the Client or the Server is unable to realize
communication.
When serial device server is used as Client, there must be three corresponding
relationships, as shown in figure 32. 1) work mode corresponding: The Work Mode
of serial device server as Client Mode corresponding to the Server Mode of network
tools, 2) IP address corresponding: the destination IP of serial device server must be
the IP address of the computer which network tools in, 3) port corresponding: the
destination port of serial device server must be the local port of network tools. The
networking product will automatically connect the network tools after setting, and the
data can be sent and received after the connection is established.