RT-N66U Arduino control of WiFi

Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Broadcom SoC based Hardware
Author Message
Twister360
DD-WRT Novice


Joined: 16 Oct 2009
Posts: 1

PostPosted: Tue May 26, 2015 6:30    Post subject: RT-N66U Arduino control of WiFi Reply with quote
Hi all!

I'm working on a project to improve health in the office environment. The most straight forward way to improve health is by moving a bit every 20 minutes. As a way to boost my creative process, I want to get an idea of the influence of WiFi on work habits. I used an Arduino to enable and disable a small router from time to time. (This router is now bricked, doesn't matter though)

The Arduino code controls a light that communicates that it's about to turn off WiFi. It also controls a relay that turns off the router. As these two are connected in the code (When the relay is triggered, the lights change, etc), I prefer the Arduino to do both things.

I am going to test the 'Take away Wifi setup' with some of my fellow students, so I bought an RT-N66u so it can handle quite a load. Since it's way more expensive, I want to keep it in one piece and preferably control wifi through software. Additional benefits of not powering off the router is that I can keep running bandwidth analysis to see any behavioral changes.

At home, I managed to get my arduino serial running on a WDR3600 usb port and see it through SSH. However, I have no clue how to actually use that serial to do anything on the Router.

Can you folks point me in the right direction?

For example:
- is it possible to send a command that triggers a script?
- Can I do it over SSH and USB Serial?
- Maybe Telnet with an arduino ethernet shield?

TL:DR:
I want to control the RT-N66U WiFi radio with an Arduino that controls external LEDs and the Router, whilst keeping the router in one piece.

P.S. If it's possible by opening up the router, that's fine too, I just want to be sure.

Thank you!

Router: ASUS RT-N66U B1
F/W: DD-WRT v24-sp2 (02/04/15) big - build 26138M

Arduino UNO (or Duemilanove if needed)


The first "Router Lamp"
[img]https://lh5.googleusercontent.com/e_48NNEtvEg0ERjIfegL45hrCxO7oFUtAflWIGkUcTsI6_7901VqEVuwiIX5DmRkiteoedfsy0cRNEbg-Jk8uA=w2536-h1201-rw[/img]

The first router with the RT-N66U
[img]https://lh3.googleusercontent.com/Of_wjDv-2yhwl8i4u_LPESJ1lij7WTY7FEesaljQLjZ5xy55uCOBbpxYs02i-eBr13exAFHxXsH5cPMViBtVzA=w2536-h1201-rw[/img]
Sponsor
js1662
DD-WRT Guru


Joined: 23 Jul 2014
Posts: 1237
Location: BC, CA

PostPosted: Tue May 26, 2015 9:59    Post subject: Reply with quote
If you can Telnet / SSH and login from Arduino to the router, you can use the following commands to turn the radio on and off:

wl radio on
wl radio off

See this wiki for all the wl commands for your reference: http://www.dd-wrt.com/wiki/index.php/Wl_command
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum