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).
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
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, ....
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'.
And.... what about http://netus.acmesystems.it/doku.php?id=products:foxboardg20 ?
Maybe this could help you:
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.
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....
I´ve added a new example (Graph with data acquired from Arduino and sent via Wifi):
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 :-[
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
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.
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
You can download an example excel from my blog http://real2electronics.blogspot.com/2009/10/linksys-arduino.html
My router firmware is White Russian 0.9 ( open WRT) , and my problem now is[glow] I can't access Telnet[/glow] so I can transfer the sensor feedback to visual basic..
Any suggestions? Or Will I have to change my firmware to dd-wrt?
would this work if lets say i would like to upload a sketch to a remotely located arduino?
I suppuse that you can activate to load telnet service again when the router starts..... I'm not a linux expert, but I can't believe that you can't activate it...
(here you can see how the telnet service is disable)
If you don't have telnet, I imagine that you have ssh, which it's more safe. I've never checked if there are free ActiveX ssh clients.....
Do you know the code in Visual Basic 6.0 or Excell that will get the data via SSH? When I try Winsock the access is denied, maybe because it gets data via telnet? which is problematic for my firmware
Look at this method..... it´s nice. You can download ser2net
And use a virtual serial port:
I've not seen this disassembled but it is Arm based and 99 dollars.