Go Down

Topic: Linksys + dd-wrt + arduino (Read 13667 times) previous topic - next topic



I´m tinkering with a linksys router with dd-wrt. I´ve just fitted a serial port and it´s connected with Arduino (there´s a lot of info in internet).

I´m using a telnet connection to send commands like:
echo S1F > /dev/cua/1
echo S0F > /dev/cua/1

My Arduino receives it and turn on (S1F)/off (S0F) a led.
Ok, no problem... It´s working and I can turn on/off the led using WIFI connection.

I haven´t knowledge about linux....
How I can receive data from rs232 to the router´s shell?
Now, I know how to send from router to rs232 but I would like to know the opposite direction (from rs232 to router´s shell).

Thank-u!!   ;)

Igor R.


Hi again,

I´ve found the solution....http://www.herbert-dingfelder.de/WRT54GL_add_on/WRT54GL_add_on.html

I´ve to open two connection, one to send and other to receive with cat < /dev/cua/1



Hi Igor, I'd be interested if you could keep this thread updated, I'm currently looking for a suitable (e.g. FREE :D) router to use for DD-wrt/openwrt.  

You should be able to toggle the LEDs like you can with arduino pins which means they can be used for GPIO (search ddwrt/openwrt for GPIO), this makes it useful for adding sensors/ breakout boards directly to the router, so makes the system very flexible, 266Mhz means it should be able to handle some higher quality audio projects with it handling the processing and teh arduino handling the interfaces.

I like the idea of an arduino as a quick and easy breakout board for an Arm device for some reason :D


Oct 17, 2009, 10:43 am Last Edit: Oct 17, 2009, 10:57 am by igorreal Reason: 1
Hi Reggie,

Now, I´m able to communicate using telnet arduino with Linksys router.
My router is Linksys WRT54GL v1.1 with DD-WRT.
I bought this routers to use as WDS repeaters and universal repeaters. But now, I´m tinkering with this.

I´ve to use two telnet´s connection:
- first to send data: echo whatyouwantintoserialport > /dev/cua/1
- second to receive data from serial to port to the shell: cat < /dev/cua/1

I´m been looking into internet and there´re many project which use linksys as web server, php, ....

http://ahorcandoeltiempo.blogspot.com/search/label/Arduino [Spanish]

Now, it would be interesting to learn how to make your own scripts inside the router....



I've got a homehub version 1.5 and a voyager 2091, I think both are targets, for either dd-wrt or open-wrt, I just want a small portable expandle unit with everything onboard already.

I'm not so interested in it functioning as a router so much but more to be able to process data for the things an arduino can't quite manage.  for instance it would be great to use an arduino as the controller for a nice tactile control surface while the 'router' box handles some audio processing, or the arduino handles incoming sensor data while the 'router' handles GPS and map display.  

As the dd-wrt/open-wrt boxes tend to have serial, GPIO (so you can implement software versions of all your favourite IC protocols, spi,12c, 2wire), ethernet, wirelss and USB in they are obviously an ideal platform for building 'stuff'.


They cost money, plain and simple :)  I'm looking at this from the cheap point of view as well :)  Although 80 GPIO lines is very appealing.  At the moment I'm 'discovering' all the different boards, I want something cheap to dev on first then move onto something 'built for purpose' when I know more about exactly what I want to do with it.


Nov 07, 2009, 11:11 am Last Edit: Nov 08, 2009, 03:39 am by igorreal Reason: 1

As I don´t want go into linux´s scripts in depth, but I want to have wifi access into my aduino board,I´ve done an Excel sheet with telnet connection.
I can control Arduino via serial port.
You can follow an easy example (typical switch led on/off): http://real2electronics.blogspot.com/2009/10/linksys-arduino.html
Now I can use the power of excel to graph, math channels, VBA,... in "real time".

It´s in spanish, but google translate works quite good....


Igor R.


Hi again,

I´ve added a new example (Graph with data acquired from Arduino and sent via Wifi):


Kind Regards,

Igor R


Hi Igor,

Would you know how to get the data sent by a proximity sensor?

My setup is controlling the arduino wirelessly through my linksys router using visual basic 6.0 ( in your case, excell)

Check my thread: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1292040169/4#4

Hope for your support :-[


Dec 13, 2010, 11:00 am Last Edit: Dec 13, 2010, 11:21 am by igorreal Reason: 1
Hi Erac,

I didn't use a C program inside the router.

I did it much easier. I'm connecting to the router using telnet. When you are connected, i.e. WIFI, you can use typical UNIX commands, as:
echo "string_to_send" > /dev/cua/1
cat < /dev/cua/1

I did a "protocol" inside Arduino to respond to my serial commands, an easy example :
S0E or S1E where,
char S -> Start byte
char 0 or 1 -> is led OFF or led ON
char F -> End byte

You can do the same to ask for an analog signal or whatever....  ;)
Also you are receiving the "answer".

Something to start, you could open 2 shell (two console connection against the router):
- First shell --> cat < /dev/cua/1
- Second shell -> you can send your "orders" using echo "string_to_send" > /dev/cua/1


I'm sorry, it's in spanish.
The feedback "ENCENDIDO" means SWITCH ON and "APAGADO" switch off.
You can find the code in http://real2electronics.blogspot.com/2009/10/linksys-arduino.html

Summarazing, I'm using the router as a telnet <=> serial port gateway. I'm connecting to the router using telnet ActiveX client. When I've connected (2 connections, one to receive and one to send), I'm "polling" serial commands to my Arduino or your Arduino could send all the time and you can get the data.

For expample=> http://real2electronics.blogspot.com/2009/12/linkduino-software-para-telemetria.html

I'm plotting using Zedgraph and the telnet  connection using Minimalistic ( the soft was done in C# (.NET) ):
? Minimalistic Telnet: http://www.codeproject.com/KB/IP/MinimalisticTelnet.aspx
? ZedGraph: http://zedgraph.org/wiki/index.php?title=Main_Page

I have other examples using a PHP server inside the router ( DD WRT + OPTWARE), but in my opinion this is the easiest method I've found. It depends if you want to use the router to process or only as a "shield"....

I hope this helps....



Thanks Igor, appreciated it. I'll study your way and I'll keep you posted for any progress

Thanks again


Hello Igor,

My router firmware is white russian; do I have to change it to DD WRT?

I tried the echo "string_to_send" > /dev/cua/1 and cat < /dev/cua/1 , but it didn't work.



Dec 15, 2010, 03:15 pm Last Edit: Dec 15, 2010, 03:15 pm by igorreal Reason: 1
Maybe the serial ports is  /dev/tts/1 in your device??


Thanks! it already worked my problem now is how to transfer the sensor feedback from the console to visual basic or excell

Go Up