Shanghai ZLAN Information Technology Co., Ltd
Tel: +86-17321037177
http://www.zlmcu.com
34
Figure 24 Both Client and Server
By default, when configured with ZLVircom, if the working mode is
changed to "TCP Client" mode, the port (that is, the local port)
automatically becomes 0 (0 means a random free port is selected). In
order to support the TCP Server mode, the computer software must know
the local port of the device, so a value needs to be specified. As shown in
figure 17, the computer software can now connect to port 1024 of
192.168.1.200 for communication, and the device will also connect to port
1024 of 192.168.1.189 as the Client. It should be noted that since the local
port 1024 is occupied by the Server, when the local port is used as the
Client, it is "port +1", that is, the software on 192.168.1.189 sees that the
incoming port of the device is 1024+1=1025.
5.2.5 UDP Mode
In UDP mode, the parameter configuration is shown in figure 25. The left
side is the configuration of the serial port server in ZLVircom, and the right
side is the setting of the network debugging tool SocketDlgTest. First, both
must be UDP working modes. In addition, as indicated by the red arrow,
the destination IP and destination port of the network tool must point to the
local IP and port of the serial server. As indicated by the blue arrow, the
destination IP of the serial port server must be the IP address of the
computer where the network tool is located, while the destination port of