How to share serial port over Ethernet
This article is dedicated to serial ports: we’ll find out what serial ports are, what they are used for, and how they can be shared over network. We will consider software, as well as hardware solutions for Windows and Linux.
Shall we start?
- What is serial (COM) port?
- Share COM port over Ethernet – Windows
- Share COM port over Ethernet – Linux
- Hardware solutions
What is serial (COM) port?
There are basically two forms of data communication – serial and parallel, the latter being a relatively recent invention. Although parallel communication works much faster than serial, its use is not always practical, especially for long distances. Serial transmission is typically used between two computers or from a computer to an external device located some distance away. Parallel transmission either takes place within a computer system or to an external device located a close distance away.
A serial port is a serial communication physical interface through which data is transferred. Serial ports have been an indispensable part of computers for more than 20 years, and only recently USB connections have started replacing them. Serial ports are still used in applications such as industrial automation systems, scientific instruments, point of sale systems and some industrial and consumer products.
Serial ports are also known as COM ports, they are bi-directional. This means that devices connected to these ports can receive and transmit data simultaneously. Full-duplex communication, i.e. information can travel in both directions at the same time, is enabled by use of different pins.
To function properly serial ports rely on a special controller chip, the Universal Asynchronous Receiver/ Transmitter (UART). The chip takes the parallel output of the computer's system bus and transforms it into serial form for transmission through COM port. A buffer built in most UART chips enables caching data coming in from the system bus while the chip is processing data going out to the COM port.
Data buffered can be anything from 16 to 64 kilobytes. Majority of standard serial ports transfer data at 115 Kbps (kilobits per second), high speed serial ports, such as Enhanced Serial Port (ESP) and Super Enhanced Serial Port (Super ESP), can reach data transfer rates of 460 Kbps
What are serial ports for?
As we mentioned above, serial ports are used for various equipment and devices to communicate with computers and servers.
Here we are listing some of these devices:
- Mouse. Typically computers with no PS/2 or USB port make use of a serial port to connect to a mouse. Some special mice also connect to a serial port;
- Modem. Mostly older computers, although some find it easier to use modem via serial port even if their computers are equipped with a USB port.
- Network. This is what serial ports were originally used for – to connect computers and allow large files transfer between them.
- Printer. Older printers and plotters
- Telecommunication equipment. For debugging, watching the boot up messages, kernel upgrading using PPC boot, and especially for problems with Ethernet.
- Temperature measuring devices. They connect only via RS-232 ports.
- Diagnostic tools
- Credit card readers, etc.
Share COM port over Ethernet - Windows
In this section we will tell you how COM port can be shared over Ethernet on Windows. To do it the easiest way you will need an app called FlexiHub. Below we will tell you how to make use of it.
- First, download the app here and install it both on a computer whose serial port is to be shared and a computer that needs shared access to the port. Do not worry about version’s compatibility - FlexiHub supports all Windows versions.
- To use the app, you will need to create a FlexiHub account. Anticipating your question: you need an account to share COM over Ethernet. Not everyone in the network will be able to access it so it is more secure. Launch the app and find ‘Sign Up’ option in the top right corner. Click it to display Registration page. Fill it in and click ‘Create Account’. Choose the subscription.
- Now you have created an account and can sign into FlexiHub using your login credentials.
- In FlexiHub window you should see the device to be shared, Click ‘Share’ so that the other computer with FlexiHub installed can access to it.
Share COM port over Ethernet – Linux
To share COM device on Linux (Ubuntu, Fedora or CentOS) use Eltima’s Serial to Ethernet Connector.
Serial to Ethernet Connector is a professional solution that enables sharing serial over Ethernet – any number of serial ports, both physical and virtual. The computer a shared device is inserted into acts as a server. Other computers connect to the server as clients.
Step 1 – Install Serial to Ethernet Connector:
- Download archive of the latest version from web site, extract files
- Launch the installer script. Read the License Agreement displayed, tick ‘I agree checkbox and click ‘Next’.
- Serial to Ethernet Connector installation requires certain external programs. If you don’t have them on your computer, you will be prompted to install them. Once their installation is complete, click ‘Next’.
- The installation path is predefined. Although it is recommended not to change the default directories, you can still change it if required. Click ‘Next’ to continue.
- There are different ways to control the daemon – System V (or other compatible systems) daemon control style or manual. Choose one and click ‘Next’.
- Users who launch the installer are automatically added to evesec group, the latter have a complete control over Serial to Ethernet Connector using DBus.
- In order to install Serial to Ethernet Connector you need to have ‘sudo’ program on your computer. The user who launched the installer must be authorized to use ‘sudo’. To confirm the right to run the program with root privileges enter the password. If you have "NOPASSWD" attribute in /etc/sudoers file, uncheck "Use password" box. To start installation click ‘Install’.
- To finish installation click ‘Finish’.
- The daemon will be launched automatically. To verify if the daemon is running, execute the following command in Terminal
ps -e | grep evesecd.bin | grep -v grep
Step 2 – Share Serial Port:
- Create a connection and specify the following attributes:
- serial port name, in case of a virtual port it is a symbolic link name
- serial port type: real or virtual
- network side type
There are three access levels to properties and methods: no access, read-only access and full access that allows you to read and write. Once the connection is shared, you can change access level, if required.
Serial to Ethernet hardware solutions are referred to as Terminal Servers, Device Servers and Console Servers. Let us figure out together what Terminal and Console Servers are, read on.
These servers enable connecting devices with RS232, RS422 or RS485 serial interface to Ethernet LANs.
To check what their technical parameters are we will take as an example ConnectPort® LTS 8/16/32 by Digi International. This device handles wire and wireless connections simultaneously. It has Dual GB Ethernet ports for routing, an SD memory slot for data storage, a large LCD screen for easy configuration, monitoring and diagnostics. This server is equipped with 8, 16 or 32 serial ports, USB 2.0 ports for expandability, internal secure modem, and an XBee® interface for ZigBee communication.
Console servers allows smooth device-switching, authentication and encryption with easy access to remote locations. They are known to provide secure remote access to Unix Servers, Linux Servers, Windows Servers and any device on the network with a console port. We will see what parameters such servers have taking as an example IOLAN SCS8C DC 8-Port Secure Console Server 48v DC power by Perle.
The server’s built-in dual Ethernet and Redundant Path technology provides serial console port access, thus offering a good solution for managing data center and remote branch equipment. IOLAN range supports Next Generation IP (IPv6) thus ensuring investment protection. The equipment has 8, 16, 32 or 48 RS-232 serial port interfaces, PCI Slot for integrated out-of-band access. It supports Dual 10/100/1000 Ethernet and advanced AAA security and encryption to meet all data center compliance policies.
Your questions are welcome in the comments.