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.

How to redirect COM port over TCP/IP

Olga Weis Olga Weis Mar 5, 2024

There are many scenarios where you may use dedicated COM Port Redirector software for remote access to serial port devices. An example might be RS232 port redirection to a remote computer over the network when a direct connection between PCs is not possible.

When you need to use a serial device that supports the Telnet protocol (RFC 2217) but doesn’t have the device physically present near your PC, you can connect to it remotely after sharing it over the Internet or LAN with the help of a professional Serial Port Redirector app.

Want to know how you can forward COM port to TCP/IP? Below is a simple step-by-step guide.

Try Serial to Ethernet Connector
14-day free trial

How to redirect serial ports - server connection

As you already know, you can redirect serial ports to a remote PC using some dedicated third-party software. One of the most popular solutions that you can find on the market today is called COM Port Redirector (for Linux and Windows operating systems). This app allows connecting to any remote serial port with a device attached like it was your local COM interface and your local peripheral.

In order to redirect COM port over a network, you should take these simple steps:

On your local (server) computer:
1
Install and start COM Port Redirector app. Select Connection > New server connection in the main menu or click Server connection in the Home window.
 Choose New Server Connection
2
Choose a name for your connection.
3
Select the COM port that needs to be shared with remote client PCs.
4
In the network settings:

  • Specify the TCP port which will be used to listen for a client connection.
  • Make sure this port is allowed by your firewall and is not occupied by any other application.
  • Choose the protocol to redirect COM data. It can be either the Raw data transmission protocol or Telnet protocol with RFC 2217 extension.
5
Hit the Create button!
 Create Server Connection
6
Once you’ve done it, the serial port becomes available for remote client connections over the TCP/IP network.
Try Serial to Ethernet Connector
14-day free trial

Redirect COM port on a remote (client) computer:

1
Start the program and Select Connection > New client connection in the main menu.
2
Specify the name of the connection you create.
3
Select which of the local COM ports will be used for the connection.
4
Enable the Create as virtual port option to have a virtual COM port created in your system. This port will emulate the behavior of a real COM interface and will be used on the client end to exchange data with the remote server’s port.

If you decided to use a virtual serial port, we recommended that you enable the Strict baudrate emulation option to prevent potential data loss when communicating with a real serial interface.
5
Choose the data transmission protocol.
6
Type the computer name or IP address of the server you are going to connect to and the TCP port you’ve chosen when creating the Server connection.
7
Click Create!

That’s it! Now the client computer is connected to the server PC over a TCP/IP channel. This means whatever serial device you connect to the COM port shared on the server, it will appear on the client computer as though the peripheral were attached directly to that machine. So, the COM Port Redirector will add serial ports to your remote machine.

How to redirect COM port Linux

The easy way to set up serial port forwarding on Linux machines is with a Serial to Ethernet Connector. It’s a GUI solution that’s available in .deb and .rpm packages, easy to install, and usable right away. The app is fully cross-platform and can share ports from Windows to Linux and vice versa. It also works in a Citrix virtual environment without additional settings.

There is also a way to forward COM ports between two Linux machines by using free software that’s already available in the repository. It’s a bit more intricate. Start by installing ser2net on the receiving device:

apt install ser2net

Configure ser2net by adding this line to /etc/ser2net.conf. Specify the receiving port. Also, “/dev/ttyS0” can be replaced with any necessary serial port.

<receiver port>:raw:400:/dev/ttyS0:57600 8DATABITS NONE 1STOPBIT

Now, you can launch ser2net without arguments and get started on the sending computer. Install socat:

apt install socat

Create a directory to house the virtual device that will be linked to the receiver:

mkdir ~/dev/ttyV0

Run socat with the following arguments:

socat pty,link=$HOME/dev/ttyV0,waitslave tcp:<receiver IP address>:<receiver port>

The connection can be tested with minicom:

minicom $HOME/dev/ttyV0

After opening it, minicom will act like a console and send text to the remote device.

There are various ways to work with remote serial ports. One option is to map the COM port on a Linux machine and redirect it over a network using Serial to Ethernet Connector. As previously mentioned, Electronic Team's COM port redirector software can be used on both Windows and Linux without any issues while using it. So it is a better yet simpler option for daily usage.

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 + users
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
Also Available:

Serial to Ethernet Connector [Linux]

Requirements: Linux 32-bit or 64-bit
Version 8.0.822 (25 May, 2021) Download the trial version →