Using TPlink WR703N router for Arduino

I'm planning to add WIFI capability to Arduino UNO using TPLink WR703N router instead of a WIFI shield, here is my requirement:

Use an Andriod phone to remotely control (via WIFI) two continuously rotating servos (basically a remote-controlled car with two servos) I've got an TPLink WR703N router with DD-WRT installed and configured as 'Client' mode.

Wondering how to connect the router to Arduino ? Can i use a USB/TTL device ? And which particular device should i buy, and which PINs to connect to UNO ?

And on the software side, do i need an Android app to send command to router and then to UNO

Your help is much appreciated. Ken

hikotec: I'm planning to add WIFI capability to Arduino UNO using TPLink WR703N router instead of a WIFI shield, here is my requirement:

Use an Andriod phone to remotely control (via WIFI) two continuously rotating servos (basically a remote-controlled car with two servos) I've got an TPLink WR703N router with DD-WRT installed and configured as 'Client' mode.

Wondering how to connect the router to Arduino ? Can i use a USB/TTL device ? And which particular device should i buy, and which PINs to connect to UNO ?

And on the software side, do i need an Android app to send command to router and then to UNO

Your help is much appreciated. Ken

Ken,

OK break it down into pieces

1) Yes you need a web server running on the TP Link router - assuming you have already flashed it with OpenWRT then you have one and can create a new page which can be used for running your Arduino control app

2) You would buy one of these from EBAY

http://www.ebay.com.au/itm/5V-3-3V-Output-USB-To-RS232-TTL-PL2303HX-Auto-Converter-Module-Converter-Adapter-/360497980321?pt=AU_Car_Parts_Accessories&hash=item53ef5aa3a1&_uhb=1

This will give you a RX/TX pair at 5V out of the TPLink (and also a 5v and gnd if you want to power the Arduino from the TPLink) (although if you are running servos etc you would already have power i would imagine) - the RX/TX pair will go to corresponding pins on your Arduino - either the hardware serial pins or other pins using softserial library

3) You need to write a sketch on the arduino that will wait for input from the Serial port which will be commands you send from your TPLink webpage

You would cater for the start stop commands you were looking for as well as a status type command that could be sent to the Arduino asking for current servo positions etc.

To get all this happening

1) Order the EBAY part 2) Post up your current sketch for controlling the servos 3) Look at the easiest way to write a Linux app to run on the TPLink to take commands from the Webpage and send them out the serial port. I would suggest Python would be your easiest. You may want to do some research on the web about Arduino and Linux serial interfacing - a good source of examples are with the Raspberry Pi

Craig

http://www.lucadentella.it/en/2012/12/09/enc28j60-e-arduino-11/?utm_source=rss&utm_medium=rss&utm_campaign=enc28j60-e-arduino-11

takes about 10 seconds, switch it to client mode, connect Ethernet cable, off you go.

cjdelphi: http://www.lucadentella.it/en/2012/12/09/enc28j60-e-arduino-11/?utm_source=rss&utm_medium=rss&utm_campaign=enc28j60-e-arduino-11

takes about 10 seconds, switch it to client mode, connect Ethernet cable, off you go.

Nope not quite - he does not want an ethernet shield and furthermore if you put the router in client mode you can not then get it to serve up pages (and hence there is nothing for his Android phone to access) - but your idea is a good one.

If he was to do this he could purchase an ethernet shield and just run a standard web server on the Arduino - essentially using the TPLink as a wireless bridge

Craig

Thanks for the information, just ordered the adaptor. I just noticed that my DD-WRT router firmware (v24 sp2 std) does not support jffs, which is required for storing web pages. Any ideas what other options i have ? Do i have to reflash the firmware to mini, or can web pages be created on other partitions and how ?

hikotec: Thanks for the information, just ordered the adaptor. I just noticed that my DD-WRT router firmware (v24 sp2 std) does not support jffs, which is required for storing web pages. Any ideas what other options i have ? Do i have to reflash the firmware to mini, or can web pages be created on other partitions and how ?

Get rid of DD-WRT which is a bit of a nightmare and instead use OpenWRT. One thing you can do is attach a powered USB hub and then attach a small USB key (say 4GB) and easily extend the root filesystem onto that

Craig

hey, i am doing a based on this but unfortunately i am having a trouble with. does anyone know how to link the arduino and tp-link307n. i have already the openwrt bit but then i having problem putting a webpage and link the arduino .. can you anyone tell me step by step with code please .

thank you

See https://gist.github.com/probonopd/9594775 for running the Arduino Yun (Linino) software on the WR703N. So far, I succeeded with the Arduino Uno and the Arduino Mega, and can use them like a Yun when connected to the WR703N. Right now it is a bit hackish but with some fiddling I got it to work.