Data Sheet
RS232/485 TO ETH User Manual
5/22/19 www.waveshare.com/wiki 9 / 21
2.2. SOCKET FUNCTIONS
RS232/485 TO ETH supports dual sockets mode. Socket A supports TCP Server, TCP Client, UDP
Server, UDP Client and HTTP Client. Socket B supports TCP Client and UDP Client.
2.2.1. TCP CLIENT
Figure 4 TCP Client
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 server.
According to the TCP protocol, TCP Client has connection/disconnection status differences to
ensure reliable data transmission.
TCP Client mode supports Keep-Alive function: After establishing connection, RS232/485 TO
ETH will send Keep-Alive package in every 15 second to check TCP connection and RS232/485 TO
ETH will disconnect and reconnect to server if any connection exception occurs. TCP Client mode
also supports baud rate synchronization, USR Cloud and Modbus gateway.
RS232/485 TO ETH works in TCP Client mode needs connect to TCP Server and needs set the
parameter: Remote IP/Port. RS232/485 TO ETH 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.
2.2.2. TCP SERVER
Figure 5 TCP Server