[CentOS] TCP port to TTY/Serial Port?

Fri Dec 20 15:13:45 UTC 2013
Joseph Spenner <joseph85750 at yahoo.com>

  I'm trying to configure my system such that I have a TCP port listening which will send all data it receives to a serial port.

ie:   tcp/2112  -->  /dev/ttyS0

My goal would be to be able to:

Use netcat to create the listen and redirect to a serial port:
  $ nc -l 2112 > /dev/ttyS0

Then in another window, run minicom at /dev/ttyS0

Then in a 3rd window,
  $ telnet localhost 2112
 "Type things, hello world"

But, I can never get the text to show up in the minicom window.

I read different variations on the netcat command, including:

$ nc -l 2112 <> /dev/ttyS0
$ nc -l 2112 > /dev/ttyS0 < /dev/ttyS0

But none seem to do the trick.

Anyone have any ideas on what I'm missing here?

Any help would be great.


If life gives you lemons, keep them-- because hey.. free lemons.

"~heart~ Sticker"  fixer:  http://microflush.org/stuff/stickers/heartFix.html