How to create Virtual COM connection on Linux (using TCP)?

Introhart

New Member
Credits
29
So, I have a Server and a Host.
Server machine runs on Windows 7. It has program, that creates some data and sends it to port 1001 using ser2net util.

The host is running Linux (Debian 10). It has a program, that runs in Wine. The program must receive data from Server. So, I need to create a virtual COM port, that will receive data from server with ip 10.10.30.30 port 1001 Then I'll push that data to program in Wine.

So, question: How to create serial data port on Linux, that will establish connection with another pc using tcp?
I was trying to use socat:
like that:

socat pty,link=/dev/comV0,raw tcp:10.10.30.30:1001

and like that:

socat pty,link=/dev/comV0,raw,waitslave tcp:10.10.30.30:1001

But in this case I get an error: the port is already busy. And the connection is dropped the next moment.
And what shall I do to solve that problem???
 


Introhart

New Member
Credits
29
Do you have ser2net installed also have you tried putty
I tried use ser2net, but it just connect a host's virtual serial port with host's tcp port. I can't establish connection between host's virtual COM and server's TCP port using ser2net...

Or I make a mistake?
 

Staff online

Members online


Latest posts

Top