2

I am using Arch linux and I need to create virtual serial port on it. I tried everything but it seems doesnt work. All I want is to connect that virtual port to another virtual port over TCP and after that to use it in my python application to communicate with python application to other side. Is that posible? Please help me.

Thanx

Milan
  • 71
  • 1
  • 7
  • Quick clarification. You *require* a serial port and and cannot use a socket port? If you can use sockets, see http://docs.python.org/library/socket.html – Ross Rogers Jan 22 '10 at 18:11
  • Seems awfully similar to http://stackoverflow.com/questions/52187/virtual-serial-port-for-linux – Jason Orendorff Jan 22 '10 at 18:41

1 Answers1

3

socat command is solution.

First you need to install socat:

pacman -S socat

Just insert this in console, but first you should be login as root:

socat PTY,link=/dev/ttyVirtualS0,echo=0 PTY,link=/dev/ttyVirtualS1,echo=0

and now we have two virtual serial ports which are virtualy connected:

/dev/ttyVirtualS0 <-------> /dev/ttyVirtualS1

Milan
  • 71
  • 1
  • 7