OpenWrt Forum Archive

Topic: Serial port

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

WRT54G3G  so only one serial port.

I want to use it for remote monitoring / control of RS232 equipment over internet,

I can't find a single list off all the places you need to turn off / comment out use of console.
I can't have ANY of this stuff
http://www.wattystuff.net/tiki/tiki-ind … nsole+Boot
messing up the machine the serial port connected to every time there is a reboot (maybe due to power cut).

Unattended locations.

(Last edited by wot4g on 5 Nov 2007, 13:26)

Ok..

I have installed setserial, stty, ser2net

I disabled console in inittab (but still have the 115k boot messages)
and put stty command for 1200baud.

from the LAN I can telnet to the serial port that has ser2net daemon running on it, connected at 1200. Tx & Rx works.
I can't connect from Internet, I presume if I forward the ser2net port from firewall to router LAN IP?

I have a 2nd router. But what commands should I run on it to have the 2 serial ports acting as a raw 1200baud serial cable to connect two RS232 ports at different locations?

stty /dev/tts/0 speed 1200 raw -echo

Server:
ser2net -u

ser2net.conf has 4005:raw:600: etc ...


Client
cat /dev/tts/0 | nc 192.168.0.5 4005 > /dev/tts/0

A cron run script once a minute reruns the command above if the network connection has dropped.

busybox doesn't have stty so:

//to Install stty

cd /bin
wget http://tobe.mine.nu/software/openwrt/stty.tgz
tar zxf stty.tgz
rm stty.tgz
chmod 775 stty
ln -s /lib/libc.so.0  /lib/libgcc_s.so.1

I encountered two issues with ser2net with kamikaze 7.09.

1 - after I telnet to the special port, the letters I type on the console and the lines I received from the serial port
     are printed twice, always. Are there any settings I need to turn on/off

2 - The telnet connection to the serial device via ser2net drops within second or two when it it idle...why...


thanks,

Echo settings wrong

I'm now using ser2net with OpenWRT and it works great.  On the Windows PC instead of com0com I am using Perle TruePort (free download) and it's totally seamless, very clean, with auto-reconnect, etc.  Just make sure you set it to "Lite Mode" in the configuration and use the "raw" type in ser2net.

The discussion might have continued from here.