Send traffic from one serial port out to another serial port

Send traffic from one serial port out to another serial port

Post by Arimu » Fri, 12 Mar 2010 20:58:09



Hi,

We've got a system where we need to occasionally in effect link two
serial ports together on our system which is running linux.

Scenario

 (/dev/ttyS1)    <radio> --- rs232 -- [linux system] --- rs232 --
<terminal> (/dev/ttyS0)

Normally the terminal talks to the linux system which sends traffic if
needed to the radio. However for certain situations we need to make
sure any traffic on /dev/ttyS0 is sent straight out on /dev/ttyS1 and
vice-versa with no alterations etc.

On a stock distribution (debian) I can't see an easy way to accomplish
this short of using socat.

Anyone got any ideas?