Arduino Uno Forward Serial to Telnet With ser2net on Netgear WGT634u Running OpenWrt

Posted by Max Power | Posted in Arduino, Netgear WGT634u | Posted on 29-11-2011-05-2008

1

This is how I used a WGT634u running OpenWrt Backfire to forward the serial port with the Arduino Uno to a telnet port.  This could be used as a cheap alternative to an ethernet shield or connecting the USB to your computer.  I was able to send commands to my Arduino via telnet over wireless network with the WGT634u in client mode.

Setup

Install ser2net:

opkg update
opkg install ser2net

Start ser2net:

ser2net -C "8082:raw:600:/dev/ttyACM0:9600 NONE 1STOPBIT 8DATABITS -XONXOFF -LOCAL -RTSCTS"

Now you should be able to communicate with your Arduino on port 8082.  Open up a telnet window and connect to your router.

Start on Boot

Next I will show you how to set it up so that ser2net will run on boot.

Edit the conf file:

vi /etc/ser2net.conf

Comment everything out and add this line at the bottom:

8082:raw:600:/dev/ttyACM0:9600 NONE 1STOPBIT 8DATABITS -XONXOFF -LOCAL -RTSCTS

Edit the startup file:

#!/bin/sh /etc/rc.common
START=10
STOP=15
start(){
ser2net
}
stop(){
killall ser2net
}

Enable the service:

/etc/init.d/ser2net enable

Comments posted (1)

is that last instruction correct? should it not be just be ”
/etc/init.d/ser2net start” ?

Write a comment