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
or
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).
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
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, ....
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.
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): Tinkering with Electronics...: LINKDUINO: Linksys + Arduino + Excel-Telnet
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 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
or
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
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.
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"....
My router firmware is White Russian 0.9 ( open WRT) , and my problem now is I can't access Telnet so I can transfer the sensor feedback to visual basic..
Any suggestions? Or Will I have to change my firmware to dd-wrt?
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