Working principle of serial port server

The working method of the serial port server is to pack the serial devices at both ends of the connection, and then pack the serial data into Ethernet data packets. rs232 to ethernet adapter The data is to create a connection between the serial interfaces of the two network connections. Before signaling between devices, the data is converted into TCP/IP packets that are sent over the network. The process is reversed at the receiving end, and the TCP/IP packets are converted back to serial signals. The use of packets allows your web application to stay alive without any configuration changes.

Serial server configuration

Equipment connection:

First connect the serial port of the serial server to the serial port of the device, connect the RJ45 interface of the serial server to the router (or directly connect to the PC), and then power on the serial server.

Configure serial port parameters:

The parameters of the serial server can be modified through the web page. When modifying parameters through web pages, the serial port server must be in the same subnet as the computer. Serial port parameters include: baud rate, data bits, stop bits, parity bits.

Configure network parameters:

The serial port server must have an IP, which can be configured as static or obtained through a DHCP server. Configure the working mode of the serial port networking server: including TCP SERVER mode (referring to the computer actively looking for the serial port networking server), TCP CLIENT mode (referring to the serial port networking server actively looking for the computer), UDP mode. The purpose of configuring network parameters is to allow the computer to successfully establish a connection with the networked server.

Enable virtual serial port:

Since the PC-side software of general users still opens the serial port to communicate with the device, at this time, a virtual serial port must be virtualized on the computer because the network is used instead. The virtual serial port modbus tcp gateway is responsible for establishing a connection with the serial port server and forwarding the data to the user who opened the virtual serial port. program. Run the user equipment communication program and open the virtual serial port. The user application can then communicate with the device.