TCP Server Mode and TCP Client Mode Manual

This manual is to introduce TCP Server mode and TCP Client mode.

 

1.Introduction
1.1.TCP Server mode
Module works in TCP Server mode will liste n network connections and build network connections, commonly be used for communication with TCP clients on a LAN. According to the TCP protocol, TCP Server has connection/disconnection status differences to ensure reliable data transmission.
TCP Server mode supports Keep Alive function. Module works in TCP Server mode will listen local port which user set and build connection after receiving connection request. Serial data will be sent to all TCP Client devices which connect to module simultaneously.
Data transmission diagram as follow:
 
TCP Server mode
tcp server mode
 
1.2.TCP Client mode
TCP Client provides Client connections for TCP network services. TCP Client device will connect to server to
realize data transmission between the serial port device and ser ver. According to the TCP protocol, TCP Client has
connection/disconnection status differences to ensure reliable data transmission.TCP Client mode supports
Keep Alive function.
Module works in TCP Client mode needs connect to TCP Server and needs set the
parameter: Remote IP/Port.
module works in TCP Client won t accept other connection request except target server and will access server
with random local port if configuring local port to 0.
Data transmission diagram as follow:
TCPclient mode
 
2.Configuration and test
We take serial device server USR TCP232-410S as an example to configure and test. We configure 410S by Web Server and test data
transmission by software USR TCP232 Test V1.3.exe.
 
2.1.TCP Server mode
When user configures modu
le to work in TCP Server mode, user needs to configure parameters as follows:
⚫ Work mode
⚫ Local port
Configure 410S by Web Server as follow (410S connects to same router as PC which tests data transmission, and to communicate with PC, 410S IP has been changed to 192.168.5.200 to in same network segment as PC):
 
 TCP Server mode configuration
TCP Server mode configuration.png
 
Test data transmission by USR TCP232 Test V1.3.exe as follow:
Figure 5 TCP Server mode data transmission
 
tcp server mode data transmission
 
2.2.TCP Client mode
When user configures module to wo
rk in TCP Client mode, user needs to configure parameters as follows:
⚫ Work mode
⚫ Remote IP
⚫ Remote port
Configure 410S by Web Server as follow:
Figure 6 TCP Client mode configuration
tcp client mode configuration
Remote Server Addr is TCP Server address(Here is PCs IP: 192.168.5.18).
Test data transmission by USR TCP232 Test V1.3.exe as follow:
 
TCP Client mode data transmission
tcp client mode data transmission