1、What is a serial device server
2、The role of serial device server
3、Functional characteristics of serial device server
4、Application of serial device server
5、Selection and purchase of serial device server
6、Selection of serial device server of PUSR
7、Working Modes of Serial Device Server
8、How to connect the serial device server
9、Considerations for configuring the serial device server
1、What is a serial device server
The Serial device server is a data conversion interface converter used for TCP/IP communication between RS232/485/422. It provides bidirectional data transmission transparent to RS232/485/422 serial ports and terminal TCP/IP networks, providing serial port-to-network conversion functions and RS232/485/422 transmission network solutions. It allows serial devices to join the network now.
Through the serial device server, users can remotely access and manage serial devices over a network to achieve remote communication and control of serial ports. This is very useful for application scenarios that require remote monitoring, management or control of serial devices. For example, the console of remote servers or network devices usually uses serial port connections. Through a serial device server, administrators can remotely access and operate these devices without direct physical access.
The serial device server usually provides multiple connection methods, including Telnet, SSH, Web pages, and so on. Users can connect to the serial device server through these methods and access and control the serial port devices through it. Some serial device servers also support companion management software, which can provide more convenient and easy-to-use management interfaces and functions.
2、The role of serial device server
The role of the serial device server is to connect a serial port device to the network, so that remote computers can access and control it through the network. It enables remote access and control of serial devices, provides convenient remote management and maintenance functions, reduces physical wiring work, and enhances the functionality and security of applications through data collection and monitoring. The following are the main functions of serial device server:
2.1Remote access and control:
The serial device server allows users to remotely access and control serial devices over the network without direct physical access. This is very useful for serial devices located in remote locations or difficult-to-reach environments, such as servers, network equipment, industrial automation equipment and so on.
2.2Remote management and maintenance:
Through the serial device server, administrators can manage and maintain serial devices without leaving their offices or remote locations. Administrators can monitor the status of devices at any time, configure or troubleshoot them, and remotely perform various serial port operations such as sending commands and receiving data.
2.3Reduced physical wiring:The serial device server allows the connection of serial devices and remote computers through a network, avoiding complex physical wiring work. This is especially useful when the distance is long or there are obstacles to pass through. At the same time, it also simplifies the process of equipment installation and maintenance.
2.4Data collection and monitoring:The serial device server can collect data on the serial port devices in real time, and transmit it to remote computers or cloud platforms. This is very important for application scenarios that require real-time monitoring, recording and analysis of serial device data such as environmental monitoring and industrial automation.
2.5Enhanced security:Through the serial device server, administrators can control and restrict access to serial devices, ensuring that only authorized users have access to and control over the devices. In addition, serial device servers usually support encryption and authentication mechanisms to enhance the security of data transmission.
3、Functional characteristics of serial device server
The serial device server has the functional features of remote access and control, multi-serial port support, protocol conversion, data transmission and forwarding, security guarantee, remote configuration and management, real-time monitoring and alarming, making the management and control of serial devices more convenient, flexible and secure.
3.1Remote access and control: The serial device server allows users to remotely access and control serial devices over the network without direct physical access. Users can connect to the serial device server via network and communicate with and control the serial port devices using various communication protocols and methods.
3.2Multiple serial ports support:Serial device servers usually have multiple serial port interfaces, supporting the simultaneous connection of multiple serial devices. This allows users to manage and control multiple serial devices simultaneously, improving work efficiency.
3.3Multiple connection methods:The serial device server provides multiple connection methods, including Telnet, SSH, and Web pages. Users can choose the connection method that suits their needs, making it convenient to use and manage.
3.4Protocol conversion:The serial device server usually supports multiple serial communication protocols (such as RS232, RS485, and RS422) and can convert between different protocols. This allows different types of serial devices to be managed and controlled uniformly through the serial device server.
3.5Data transmission and forwarding:The serial device server can realize the data transmission and forwarding functions. It can collect data from serial devices in real time and transmit it to remote computers or cloud platforms. At the same time, it can also forward data from remote computers to serial devices. The serial port caching function can cache and store the data received by the port for subsequent reading, processing or transmission. Avoid data loss and improve the stability and reliability of communication.
3.6 Timeout restart:If the serial device server does not receive data from the serial device or maintain a connection for an extended period of time, it will automatically perform a restart operation to restore communication. The timeout restart function can avoid the situation where the system is not responding or stuck for a long time due to communication anomalies.
3.7Security guarantee:The serial device server can avoid the overhead of connection disconnection and re-establishment in idle state through heartbeat packet mechanism, improving communication efficiency. The registration package function ensures that only authenticated and registered clients can communicate with the server, improving system security and controllability. Administrators can set access permissions to ensure that only authorized users can access and control serial devices, thereby ensuring system security.
3.8Remote configuration and management:Through the serial device server, users can remotely configure and manage the parameters and settings of serial devices such as baud rate, data bits, parity bit etc. By integrating the serial device server with the cloud platform, more powerful remote management and control capabilities can be achieved, improving the availability and management efficiency of serial devices. Administrators can remotely manage devices as needed at any time, without the need for on-site operations.
3.9Real-time monitoring and alarm:The serial device server can monitor the status of serial devices in real time and trigger alarms based on set conditions. Administrators can obtain timely status information of the equipment, facilitating rapid response and handling of abnormal situations.
4、Application of serial device server
The serial device server has a wide range of applications in many fields such as remote management, industrial automation, remote equipment management, remote monitoring, POS systems, remote terminal connections and Internet of Things (IoT) applications. It provides users with a convenient, flexible and secure solution for remote access and control of serial devices.
Serial device servers are widely used in various fields and scenarios. Here are some common application examples:
4.1 serial device server is widely used in remote management
●Remote server management:serial device servers are often used for remote management of servers and network devices, such as connecting to the console of a server through a serial port. Administrators can remotely access and control the server through the serial device server, perform operations such as power-on, power-off, restart, etc., and view and process logs and error messages on the server.
● Remote device management: serial device server can be used to manage and control various remote hardware devices, such as power equipment, communication equipment, smart home devices, etc. It can provide remote access and control functions, allowing users to remotely manage the working status, configuration, troubleshooting, etc. of these devices through the network.
● Remote monitoring and data collection: The serial device server can collect real-time data from the serial devices, and transmit it to remote computers or cloud platforms. This is very useful in applications such as monitoring systems, environmental monitoring, data collection and recording. Users can remotely monitor and record real-time data from serial devices, analyze it, and generate reports.
● Remote terminal connection: Through the serial device server, users can achieve remote terminal connections and remotely access and control target devices. This is very useful in scenarios such as remote technical support, distance education and cross-regional cooperation.
4.2 Industrial automation applications
The field of industrial automation includes equipment monitoring, sensor tracking, robot operation, data acquisition, control systems and security. The serial device server can realize remote access and control of serial devices, monitor machine status and production processes. In addition, the serial device server can also convert data into network data for centralized management and storage so as to facilitate data analysis and processing.
4.3 Smart home solution
The serial device server can realize remote access and control of smart home devices, such as TVs, air conditioners, water heaters, etc. This method can facilitate users to manage and control home devices anytime and anywhere, thereby improving the convenience and comfort of family life.
4.4 Industrial weighing solutions
In the unattended industrial weighing field, the weighing management equipment can achieve transmission and remote management of monitoring weight data by connecting with serial device server. After the weighing sensor and industrial control host computer in the weighing field are connected to the serial device server, a TCP connection is established through the latter's serial port-to-Ethernet function to achieve long-distance data transmission with fast speed and stable signal. Data statistics management can be completed using a local area network computer.
4.5 Smart Transportation Solutions
The serial device server is connected to the terminal signal lights or control cabinets through RS232/485 serial ports on one end, and connects to Ethernet through network ports on the other end. It converts the RS232/485 serial port into a TCP/IP network interface, and converts the packaged serial data into network data through an IP channel, upgrading the original traffic signals to TCP/IP signals, easily enabling remote control of devices.
4.6 Remote monitoring solution for sewage treatment
The serial device server connects to the data acquisition equipment of the sewage treatment plant through a serial port, and converts the transit data into network data for transmission to the PC terminal. It can realize remote monitoring and management of production and operation data in sewage treatment plants, bringing convenience to the operation managers.
4.7 Remote monitoring solution for power system
In the centralized installation area of electricity meters for data reading and power grid quality detection, through serial device server and power monitoring equipment connection, power monitoring personnel can remotely monitor the operation status of electric energy meters, respond to abnormal power consumption in a timely manner, and achieve information sharing platformization.
The application scenarios of serial device server are very extensive, and it plays a very important role in industrial automation, network management, smart home and other fields. Through its remote access and control, data transmission and conversion functions, it can improve work efficiency, save costs, enhance security, and adapt to different application scenarios and network environments.
5、Selection and purchase of serial device server
Choose the appropriate serial device server according to specific needs and budget. You can conduct information inquiry and comparison on the official website of suppliers, professional electronic equipment stores and other channels to obtain more specific product information, make selection and purchase. When purchasing a serial device server, you can consider the following aspects:
5.1 Application Environment
If you plan to use the serial device server in outdoor scenarios, complex and even extreme working environments will pose significant challenges to its normal operation. For example, intelligent transportation solutions are basically installed on highways or roads. In extreme weather conditions such as temperature and humidity, the working temperature and humidity range of serial device servers, hardware protection performance, and other indicators should be considered with priority.
5.2 Product quality
Stability: Stability is the core factor of quality for serial device server. In many industrial sites, the fluctuation range of power supply voltage is large. This situation can easily damage equipment and cause economic losses. Therefore, a serial device server with features such as wide-voltage support, reverse polarity protection for power supplies, and electrostatic shielding would be an optimal choice. For industrial application scenarios such as data collection, the stability of data transmission is very important. Problems such as delayed data acquisition and data loss can occur, so it is best to choose a serial device server equipped with an optimized TCP/IP protocol stack that has mature technology, stable reliability, and fast bidirectional transparent data transmission when purchasing.
● Security: Communication security in data transmission involves issues such as privacy and confidentiality, which are self-evidently important. A good network security system can greatly reduce security problems such as leaks during enterprise operations. Excellent serial device servers usually use IoT communication gateways with encryption algorithms for communication, double-layer watchdogs and other keep-alive mechanisms to achieve multiple protections.
● Convenience:The configuration of serial device server is difficult for non-professionals, so it's better to choose products that are easy to configure. The currently prominent serial device server can perform protocol conversion within the server, and users do not need to be concerned with specific details. They can simply set up a web page inside the server or use setting software for permanent settings.
5.3 Interface selection
Generally, the serial device server has several specifications of RS232/485/422. When purchasing, you only need to check the specific interface required for your project and choose a serial-to-Ethernet converter with different serial port numbers.
Using the above three criteria can help you determine which serial device server is really needed. The serial device server of PUSR has the advantages of mature technology, stability and reliability. It supports watchdog circuit protection, ESD electrostatic protection, power supply anti-reverse connection, wide voltage range and other functions. It supports multiple working modes such as TCP Server, TCP Client, UDP Client, UDP Server and httpsD Client. It is widely used in industrial projects such as data acquisition and remote control, with high cost performance. With the product concept of "simple, reliable and reasonable price", it is exported to more than 30 countries and has been unanimously recognized by customers.
调用N520的视频https://youtu.be/27NJbfWtGZE
USR-TCP232-410s【调用410s】
USR-TCP232-410s is an ultimate serial converter connect to RS232/RS485 based equipment across an ethernet network enable you to replace serial dial-up modem connection.
To realize two-way transparent transmission between COM and TCP/IP,manage COM on remote device over network.
To communicate to multiple serial devices at the same time across a LAN or WAN network.
USR-N5X0【调用N540 520 510 580】
The USR-N5X0 Series are network-based serial device servers that connect RS-232/422/485 serial devices, such as PLC, meters, sensors, weigh scale, barcode scanner, card reader and serial printer directly to a TCP/IP network. Data coming from the Ethernet port is sent to the designated RS-232/RS-422/RS-485 port, and data received from RS-232/RS-422/RS-485 port is sent to the Ethernet port, allowing bi-directional communication.
In the computer-aided manufacturing or industrial automation areas, field devices can directly connect to an Ethernet network via the USR-N5X0 modbus gateway. In normal PCs or laptops, a virtual COM port can be created using our virtual COM software to fetch serial data from USR-N5X0 remotely over Ethernet. This extends the traditional COM ports of a PC,with access over a TCP/IP network. Through networking, you can control and monitor remote serial devices over the LAN or even over the Internet.
USR-TCP232-30x【调用30246】
USR-TCP232-302, USR-TCP232-304 and USR-TCP232-306 are cost-effective serial to Ethernet converter. They adopt Cortex-M0 solution, which has a main frequency up to 48MHz, providing fast transmission speed. Equipped with RS232/RS485/RS422 serial port and 10/100M Ethernet port, those products can connect to variety of serial devices to achieve transparent transmission via simple configuration to save manpower and shorten the development cycle. These products are widely used in smart traffic, unattended Weighing, manufacturing industry etc.
Serial Device Servers come in various serial port levels such as RS232/RS485/RS422, with RS485 being the most commonly chosen for single Serial Device Servers. For special operational requirements, there may be a need to switch between RS232/RS485/RS422 serial ports. These Serial Device Servers typically operate in the following modes: TCP Server, TCP Client, UDP Client, UDP Server, and HTTPD Client.
The TCP Client mode provides client connections for TCP network services. It actively initiates connection requests to the server and establishes a connection for the exchange of serial port data and server data. According to TCP protocol specifications, TCP Client distinguishes between connection and disconnection, ensuring reliable data exchange. This mode is commonly used for data interaction between devices and servers, making it the most frequently employed networking communication method.
This mode features automatic detection of connection abnormalities. Once a connection is established, KeepAlive packets are sent at intervals of approximately 15 seconds to probe the connection's vitality. If the connection is abnormally interrupted, it will be immediately detected, prompting the Serial Device Server to disconnect and reconnect.
When the Serial Device Server attempts to connect to a server in TCP Client mode with a local port set to 0, it initiates connections using a random port each time.
This mode supports user-configurable synchronous baud rate functionality, transparent cloud transmission, and short connection capabilities.
Within the same local area network (LAN), if the Serial Device Server is set to a static IP, ensure that its IP and gateway are within the same subnet, and correctly configure the gateway IP. Failure to do so will result in communication failure.
Note: KeepAlive functionality, synchronous baud rate configuration, and transparent cloud transmission are key features of this mode.
TCP Server is a TCP server. In the TCP Server mode, the serial device server listens on its local port. When a connection request arrives, it accepts and establishes a connection for data communication. Upon receiving data from the serial device server's serial port, it simultaneously sends the data to all client devices connected to the serial device server. Similarly, in the TCP Server mode, there is also a KeepAlive function used to monitor the integrity of connections in real time.
It is usually used for communication with TCP clients in local area networks. It is suitable for scenarios where there are no servers in the local area network and multiple computers or mobile phones request data from the server. Like TCP Client, there is a difference between connection and disconnection to ensure reliable data exchange.
This mode supports the function of synchronous baud rate (RFC2217) with human control.
When the serial device server is used as a TCP Server, it can accept up to 16 Client connections (the number of connections can be customized). The local port number is fixed and cannot be set to 0.
This working mode is subordinate to the UDP protocol.
UDP Client is a connectionless transport protocol that provides simple, unreliable information transfer services for transactions. There is no need to establish or disconnect connections, and only the IP address and port are required to send data to the other party. It is usually used in data transmission scenarios where there are no requirements for packet loss rate, the packets are small and sent frequently, and the data needs to be transmitted to a specified IP address.
In UDP Client mode, the serial device server only communicates with the target port of the target IP. If the data does not come from this channel, it will not be received by the serial device server.
In this mode, if the target address is set to 255.255.255.255, it can achieve the effect of UDP broadcast across the entire network segment; and can also receive broadcast data; The firmware of 4015 and later versions supports broadcasts within the network segment, such as xxx.xxx.xxx.255 broadcast mode.
8.4 UDP Server Mode
UDP Server refers to a server that does not verify the source IP address on top of ordinary UDP. Upon receiving each UDP packet, it changes the destination IP and port number to match the data's source IP and port number. When sending data, it sends it to the most recently communicated IP and port number.
This mode is usually used in data transmission scenarios where multiple network devices need to communicate with the module and do not want to use TCP due to its fast speed and frequency.
8.5 Httpd Client
In this mode, the user's terminal device can send request data to a specified HTTP server through the serial device server. The serial device server then receives the data from the HTTP server, parses it and sends the results to the serial port device.
Users do not need to pay attention to the data conversion process between serial port data and network packets, and can simply set parameters to achieve a request from the serial device for HTTP server data.
The specific working diagram and setting example of Httpd Client mode are shown below
9、How to connect the serial device server
The serial device server provides the function of converting a serial port into a network interface, which can convert RS-232/485/422 serial ports into TCP/IP network interfaces to achieve bidirectional transparent transmission of data between RS-232/485/422 serial ports and TCP/IP network interfaces. This allows serial devices to immediately have TCP/IP network interface functionality, connect to the network for data communication, and greatly expand the communication distance of serial devices. What are the connection methods for serial device server?
9.1 Direct connection mode
The so-called direct connection is to directly connect the network cable port on the computer with the Ethernet port on the serial device server. This networking method has simple wiring and can achieve long-distance transmission, which enables the realization of longer distance transmission. It is because the distance from the computer to the serial device server increases. The production of network cables is the same as that for general Internet access.
Through the virtual serial port management software, the serial ports on the serial device server are mapped to COM3 and COM4. You can operate them as normal serial ports. For the serial device server, if its TTL serial port is added with MAX485 chip to become RS422 or RS485, it can also be mapped as COM3 and COM4. Therefore, for the host computer, no matter what serial port mode the serial device server outputs in, its operation method is the same as that of the COM1 and COM2 ports on the computer itself, greatly simplifying the programming workload of the host computer.
However, the true advantage and value of the serial device server are not manifested in the application of direct connection methods. Connecting devices to Ethernet networks is an important purpose of it.
9.2 Ethernet connection mode
Connect the serial device to Ethernet through a serial device server. The wiring method is very simple, just connect the serial device server to a router or switch and set its IP address. By default, XUNWEI brand products obtain their IP addresses dynamically through DHCP. This allows the serial device server to become a node on the Ethernet network, allowing devices connected to it to connect to the Ethernet network.
Using this networking method, different types of serial ports can be used with various devices. (such as TTL, RS232, RS485 and RS422) are connected to the Ethernet network for heterogeneous networking.
This networking method can connect the equipment of an entire company to a network. During the networking process, in addition to using switches and routers for expansion, industrial Ethernet switches can also be used to expand different types of serial device servers, enabling flexible networking of devices. Workers can monitor devices with varying permissions and levels, from company leaders, chief engineers, technical directors to ordinary operators within their own permissions. This enables sharing of network resources and centralized management of all systems, building a platform for network manufacturing technology.
10、Considerations for configuring the serial device server
The serial device server is used to achieve bidirectional transparent conversion between serial ports and network data. Generally, different serial device servers such as RS485, RS232 and RS422 are selected according to the project interface. At the same time, it is also possible to select a server with different numbers of serial ports. For users who are unsure how to set up the serial device server and find reading instructions too cumbersome, a simple connection process is required.
Before setting up the serial device server, test the serial port device through a computer.
①. Connect the serial port of the serial device server to a computer through a serial cable (or USB-to-serial converter);
②. Connect the serial device server and computer's network port through a network cable;
③. After connecting the power supply, check whether it works normally.
It should be noted that it is best to use matching accessories for connecting wires and power supplies.
If the test equipment can work normally, connect the serial port of the serial device server to the network and download the corresponding setting software from the official website for use. For example, the default parameters set for serial device server USR-TCP232-410s are as follows.
When setting up the serial device server, there are several points to note:
①. Because the USR-TCP232 serial device server does not support cross network segment communication, it is necessary to ensure that the IP of both the computer and the module in the serial device server are on the same network segment when setting up;
② In order to reduce signal interference, it is best to turn off the firewall and antivirus software of the computer when setting up a serial device server;
To maintain the uniqueness of network IP, it is necessary to block other gateways on the computer and only keep the unique gateway connected between the computer and serial device server
④ Before using the serial device server, it is necessary to know whether the serial port device that the serial device server will connect to is a normal serial port or a Modbus RTU protocol serial port. It should be noted that some industrial-grade (M4 series) serial device servers support the Modbus protocol, while low-cost (M0 series) ones do not
Before establishing the TCP server and TCP client modes, it is necessary to understand the usage logic of connecting target IP, local IP, remote port, and local port.