Connecting serial interfaces over IP
The RS-232/422/485 serial interfaces are still very popular in the industry: they connect diagnostic ports, sensors, barcode scanners and RFID tags, etc. However, serial interfaces have their limitations. Sometimes it becomes necessary to access such an interface via an IP network, or, for example, to have access to one RS-232 device from several remote computers at the same time, or to combine several remote objects into one RS-485 bus.
The serial interface server converts serial physical protocols to IP packets, and allows you to programmatically manage them - connect a remote virtual COM port to a computer via a network as if it were physically connected, and transparently connect several devices in P2P mode, without using computers.
In this article, we will analyze the Advantech EKI-1524 serial interface server , which has four serial ports, each of which supports RS-232/422/485 protocols, and two LAN ports.

The EKI-1524 serial interface server has four DB9 ports and two LAN ports.
Key features of the EKI-1524 :

The EKI-1500 Series Serial Server Series features a wide range of devices for a variety of applications. From servers with one serial port: EKI-1511X to servers with 16 ports, for mounting in a server rack, such as EKI-1526N .

Additionally presented are models with a high level of security for operation in extreme conditions, and galvanic isolation of ports, for protection against high voltages: EKI-1522I , EKI-1524I , and others.

All models support the connection of two power supplies. Switching between power supplies occurs without rebooting the device. The power failure indication relay closes if there is no voltage on one of the lines.
The serial interface server allows you to access remote devices via TCP / IP so that for application software it will look like the devices are connected to a physical COM port.

The principle of operation of the virtual COM port over Ethernet.
For this, the Linux kernel module and a program for exchanging data with the serial interface server are used on the client side. As a result, for the user, such a connection looks like a physical port (device / dev / ttyADV0 ).
Advantech currently releases virtual COM port drivers for Linux only. Assembly instructions for the VCOM 2.0 kernel module on Ubuntu .
There are also binary driver packages for different distributions: Linux Pseudo TTY
In the web interface, you can configure the settings in this mode:

Advanced settings. You can manually set timeouts, etc.:

Serial interface settings. In this menu, you can also change the main protocol (RS-232/422/485) for each port.

An open RFC 2217 COM port forwarding protocol is also available , which is an extended command for the Telnet protocol. In this mode, the device accepts incoming TCP connections, in the settings you can specify the port for incoming connections.

For complex cases when several devices cannot be connected directly, you can use two terminal servers in transparent bridge mode. Thus, you can connect remote devices using TCP / IP as a transport.

Connecting two remote devices via serial protocol via TCP / IP transport.
Thus, you can programmatically switch devices between each other, connect remote buses via RS-485 and do much more, using all the advantages of IP networks, including radio bridges, virtual private networks (VPNs) etc. Transmitted data between two servers can be additionally protected from interception by using encryption at the transport level.
The device allows you to configure event notifications using Email and SNMP Trap. The MIB file for configuring the SNMP server is available for each device.

Events for notifications can be configured manually.

In the web interface, you can set the address of the remote Syslog server for logging. Client connection events, authentication errors, LAN and serial port status, etc. are logged.

The initial configuration of the serial interface server can be done through the EKI Device Configuration Utility . In this case, the utility works through ARP packets and does not require setting the corresponding IP address on the network interface. This means that you can set any IP address for the device without losing access.

Serial interface servers allow you to bypass the restrictions imposed by physical protocols and easily scale connections. P2P mode allows you to connect legacy devices using the Internet as a transport, while doing without servers.
How machines communicate - MQTT protocol
How machines communicate - Modbus protocol
ADAM-3600 - multifunctional industrial controller
The serial interface server converts serial physical protocols to IP packets, and allows you to programmatically manage them - connect a remote virtual COM port to a computer via a network as if it were physically connected, and transparently connect several devices in P2P mode, without using computers.
In this article, we will analyze the Advantech EKI-1524 serial interface server , which has four serial ports, each of which supports RS-232/422/485 protocols, and two LAN ports.

The EKI-1524 serial interface server has four DB9 ports and two LAN ports.
Key features of the EKI-1524 :
- Virtual COM port - allows you to programmatically emulate the virtual COM port of a remote device on a Linux system.
- Connecting multiple clients at the same time - in server mode, you can use one serial port for several devices at the same time.
- Work in P2P mode - simultaneous work in client and server mode allows you to combine several EKI-1524 directly, without using servers and computers.
Specifications

The EKI-1500 Series Serial Server Series features a wide range of devices for a variety of applications. From servers with one serial port: EKI-1511X to servers with 16 ports, for mounting in a server rack, such as EKI-1526N .

Additionally presented are models with a high level of security for operation in extreme conditions, and galvanic isolation of ports, for protection against high voltages: EKI-1522I , EKI-1524I , and others.

All models support the connection of two power supplies. Switching between power supplies occurs without rebooting the device. The power failure indication relay closes if there is no voltage on one of the lines.
Virtual COM port
The serial interface server allows you to access remote devices via TCP / IP so that for application software it will look like the devices are connected to a physical COM port.

The principle of operation of the virtual COM port over Ethernet.
For this, the Linux kernel module and a program for exchanging data with the serial interface server are used on the client side. As a result, for the user, such a connection looks like a physical port (device / dev / ttyADV0 ).
Advantech currently releases virtual COM port drivers for Linux only. Assembly instructions for the VCOM 2.0 kernel module on Ubuntu .
There are also binary driver packages for different distributions: Linux Pseudo TTY
In the web interface, you can configure the settings in this mode:

Advanced settings. You can manually set timeouts, etc.:

Serial interface settings. In this menu, you can also change the main protocol (RS-232/422/485) for each port.

RFC 2217 Mode
An open RFC 2217 COM port forwarding protocol is also available , which is an extended command for the Telnet protocol. In this mode, the device accepts incoming TCP connections, in the settings you can specify the port for incoming connections.

P2P mode
For complex cases when several devices cannot be connected directly, you can use two terminal servers in transparent bridge mode. Thus, you can connect remote devices using TCP / IP as a transport.

Connecting two remote devices via serial protocol via TCP / IP transport.
Thus, you can programmatically switch devices between each other, connect remote buses via RS-485 and do much more, using all the advantages of IP networks, including radio bridges, virtual private networks (VPNs) etc. Transmitted data between two servers can be additionally protected from interception by using encryption at the transport level.
Event Notifications
The device allows you to configure event notifications using Email and SNMP Trap. The MIB file for configuring the SNMP server is available for each device.

Events for notifications can be configured manually.

Syslog Logging
In the web interface, you can set the address of the remote Syslog server for logging. Client connection events, authentication errors, LAN and serial port status, etc. are logged.

Initial setup
The initial configuration of the serial interface server can be done through the EKI Device Configuration Utility . In this case, the utility works through ARP packets and does not require setting the corresponding IP address on the network interface. This means that you can set any IP address for the device without losing access.

Conclusion
Serial interface servers allow you to bypass the restrictions imposed by physical protocols and easily scale connections. P2P mode allows you to connect legacy devices using the Internet as a transport, while doing without servers.
References
How machines communicate - MQTT protocol
How machines communicate - Modbus protocol
ADAM-3600 - multifunctional industrial controller