
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
48
By default use ZLVircom to configure, if change the work mode to
“TCP Client” mode,
the port (local port) will be automatically changed to 0 (0 means randomly choose a
free port). In order to support the TCP Server mode, the computer software must
know the local port of the device, here need to specify a value as shown in figure 36.
The computer software can connect the 1024 port of 192.168.1.59 to communication,
and meanwhile the device will be as Client to connect the 1024 port of 192.168.1.3.
Should be noted that because the local port 1024 is occupied by Server, when as
Client the local port use
“local port +1”, as the origin port of the device seen in the
software of 192.168.1.3 is 1024+1=1025.
5.2.5 UDP mode
In UDP mode, the parameter configuration is shown in figure 37, left is the
configuration of serial device server in vircom, and right is the setting of
SocketDlgTest for network debugging tools. First the two must be both UDP work
modes. In addition, the red arrows indicate that the destination IP and port of
network tool must point to those of serial device server. The blue arrows indicate that
the destination IP of serial device server must be the IP address of computer which
the network tool in, and the destination port of serial device server must be the local
port of network debugging tool. These network parameters are configured to ensure
two-way UDP data communication.