OpenWrt Forum Archive

Topic: Remote serial port on OpenWrt

The content of this topic has been archived on 9 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Is it possible to use the serial port on a WRT54G running OpenWrt as though it was a serial port on my Windows XP machine?  i.e. Can I address the serial port on my Wrt as Com3 on my WinXp box?  How about telnet into a specific port on the WRT and have it rerouted to the serial port?

Here is what I am trying to do...
I have a LCD/Keypad device from www.crystalfontz.com (CFA-635-Serial to be exact).  I would like to plug it into a WRT router somewhere in my house and have the software to control it running on my Windows server in the basement.  I have written the software I am using so I can control and make changes on that end.  I just need some way to pass data in/out of the serial port on the WRT from my windows box.

Any ideas?

-Brad

(Last edited by metoo2057 on 3 Apr 2006, 21:58)

you need a linux daemon that forwards tcp connections on a specific port directly to the serial port.
It could be quite easy with inetd or xinetd. don't remember...

on windows you simply open a socket open a tcp connection, and write into it as if it was a com port

On Windows:

telnet (router) (ip)

On the Router:

nc -l -p (port) | /dev/tts/0

smile - helped set this up for a friend of mine who used it to drive a robot with his mind. He had a whole crazy setup with an EEG which would read brain waves of tense muscles or relaxed muscles; which, in MindPong (!) would be "up" or "down", for sentence writing "1" or "0" in a 31-charachter alphabet, or on the mind control platform, "forward" or "right" (no reverse... ).

The big problem we came across was having this run as a startup script. Only way we found in the frantic hours before he had to leave was to edit /etc/init.d/rcS and remove the output pipe to logger.

Enjoy,

- Yasha

The discussion might have continued from here.