Cookie
Electronic Team, Inc. uses cookies to personalize your experience on our website. By continuing to use this site, you agree to our cookie policy. Click here to learn more.

COM Port Redirector for Linux and Windows - extended guide 2024

Olga Weis Olga Weis

It’s not rare that users of serial port equipment face the need to share it with remote customers or coworkers over a network. As is known, the dedicated software application, Serial to Ethernet Connector, is designed to redirect Linux serial ports to Windows and vice versa in the easiest way possible. If you would like to know how to create reliable cross-platform connections between Linux and Windows and share serial ports for fast and secure remote access, below is a complete guide with simple step-by-step instructions.

The problem of cross-platform access to remote serial ports.

Let's imagine that you have a serial printer (or any other specialized COM port device) that is physically connected to a serial port residing on your office Linux computer. This device needs to be accessed from a remote machine located in another room or office. If you have two Linux machines, you should have no problem creating communication with the remote peripheral using the command-line options of Serial to Ethernet Connector (SEC). But did you know that it’s also possible to use the software as a COM port redirector Linux Windows and the other way around? Here’s how you can do this.

Scenario 1. Connecting from a Windows client to a Linux server.

To make it clear, by a “server machine” we mean a computer to which the device you want to share is attached directly. Whereas a “client computer” means a machine from which you are going to connect to a shared device remotely.

Before you start, it’s important to make sure that both the client and server computers are connected to the same local network.

a) Create a server connection on Linux.

As an example, we will share a serial port named “/dev/tty60” on Ubuntu 20,04,2 via a TCP port 5000. The IP address of our Linux machine is 192.168.24.43.

Follow the steps below to provide remote access to the real serial port that has the printer physically attached.

Step 1. Download Serial to Ethernet Connector and install it on your Linux computer.

Note: On Linux, it currently works only as a command-line utility.

Step 2. Create a “server” connection by using the following command:

evesecli add --real /dev/tty60 server --local 5000

where:

--real - COM port type (real/virtual);

/dev/tty60 - COM port (connection) name;

server - connection type;

--local 5000 - name of the TCP port that will be used for the network connection.

Note: By default, the connection will use the RAW data transfer protocol.

Step 3. Activate the connection by executing:

evesecli start /dev/tty60

Step 4. Check the connection status:

evesecli list -s
statut de connexion

As we can see, the real serial port “/dev/tty60” is shared and can be accessed via the TCP port 5000.

Once you connect to the shared port from a remote computer, you will be able to check the detailed info about the connection by using the command:

evesecli list -s
infos sur la connexion

b) Connect from Windows as a client.

Now let’s create a client connection to the remote serial port on Linux from a Windows machine.

Step 1. Download Serial to Ethernet Connector and install it on your Windows PC.

Step 2. Start the app and create a “client” connection.

client de connexion

To do this, click Client connection in the main window of the app.

Step 3 (Optional). Specify the client connection name.

Step 4. Check the box Create as virtual port and select the port name.

Note: To connect from the Windows client to Linux, a virtual serial port should be created on the Windows PC.

Step 5. Select the Raw data transmission protocol.

Step 6. Specify the IP address of the server computer (192.168.24.43) and the TCP port (5000) to connect to.

Step 7. Click Create.

créer un nouveau client

This is it! Now the remote serial printer is successfully connected to the Windows PC via a virtual COM port (COM 1) and can be accessed and operated like it was plugged directly into the Windows machine.

Whether you create a virtual COM port on Linux or Windows, it appears in the system fully emulating the behavior of a real serial interface.

créer un port COM virtuel

Scenario 2. Connecting from a Linux client to a Windows server.

Now, let’s consider a situation in which your serial printer is plugged into a Windows PC and needs to be accessed remotely from a Linux machine.

3.1. Share the COM port on the Windows server:

Step 1. Download and install Serial to Ethernet Connector for Windows.

Step 2. Start the software and select Server connection in the window that will appear.

Connexion au serveur

Step 3. Configure the server connection settings:

  • (optionally) Specify the connection name;
  • Select the real COM port you would like to share. (The port to which the serial printer is attached).

Note: When setting up a server connection, you should leave the box Create as virtual port unchecked.

  • Specify a TCP port to use for the connection to your network.
  • Select the data transfer protocol.

Step 4. Click Create.

Créer une nouvelle connexion au serveur

Once created, you can check the connection details by selecting this connection on the left side:

ServeurCOM 1

As you can see, we have an active server connection named “Server COM1”. The shared real port COM1 is open and is listening for incoming connection via a TCP port 5000.

TCP port 5000

3.2 Now that everything is set up on the Windows PC, we can create a client connection to the shared printer from a remote Linux computer.

To do this, follow these simple steps:

Step 1. On the Linux machine, download and install the command-line utility Serial to Ethernet Connector.

Step 2. Create a client connection by using the command:

evesecli add --virt /tmp/virt0 client --remote 192.168.24.66:5000

Where:

/tmp/virt0 client - COM port (connection) name;

192.168.24.66 - the IP address of the server computer you are connecting to;

5000 - the name of the TCP port specified on the server side.

Note: In order to connect to the remote real COM port over the network, you should create a virtual serial interface on the client side.

On Linux, the virtual COM port settings should match the Windows real port settings.

Step 3. Activate the connection by executing:

evesecli start /tmp/virt0

Step 4. Check the client connection status:

evesecli list -s
liste evesecli

Important: for the correct operation of Serial to Ethernet Connector on both Linux and Windows sides, you should create an exception for the app in the firewall settings.

small logo Serial to Ethernet Connector
#1 at Serial Port Software
Serial to Ethernet Connector
Access remote serial port over IP Network for Windows
4.7 rank based on 243 reviews
Get a download link for your desktop
Submit your email address to get a link for quick download on your desktop and get started!
or