howto read from serial port?

Alan Cox alan at
Mon Jun 20 17:05:07 UTC 2011

On Mon, 20 Jun 2011 08:45:02 -0700
Mike Wright <mike.wright at> wrote:

> Hi all,
> This sure feels like a blast from the past :)
> I'm trying to figure out how to use com ports to communicate between two 
> fedora boxes.
> I've figured out how to set the flow rate (stty /dev/ttyS0 115200) and 
> to send data:  I have an 80k text file that I "cat textfile > 
> /dev/ttyS0" and by measuring the TX pin I see the voltage change from 
> -11.34v to +4.4v for about 10 seconds.  Seems to be working.
> The problem comes on the other end of the wire.  The receiving machine 
> is connected by a "null modem" cable.  It seems that standard 
> redirection should work but I can't figure out the proper shell syntax.
> Input should listen to /dev/ttyS0 and whenever something is received be 
> sent to /dev/stdout

cat /dev/ttyS0

More information about the users mailing list