hardware / software / social hacks

Aug 4, 2007

f.i.c.s. - Fonera Internet Controlled Switch

I got my first FON router for free a couple of months ago.
First thing i did was flash dd-wrt firmware on it. Since FONera router has gpio pins i decided to use one of those pins to control AC loads or turn a switch ON/OFF remotely.
There's a similar/better way of controlling AC loads - check out dd-wrt wiki. However, i only had one NPN transistor some resistors and leds.
So i decided to build a small circuit that will turn a switch ON and OFF thru the Router's Web Interface. Now i can turn anything ON/OFF from anywhere in the world.....


-NPN transistor (2N3055) - $2.29
-One 10k Resistor - 99 cents
-One 1k Resistor - 99 cents
-1 LED


after burning down the transistor and receiving death threads from other users i decided to build a new/SAFER circuit using a solid state relay :) .... Thanks for the feedback guys/girls.
Stay tuned. (this time i wont 'Drink and Solder')


- Log on to your router (ex: http:
- Go to Administration > Management
- JFFS2 Enable

- Go to 'Services'
- Enable SSH

- Go to Administration > Commands
- type:

echo 1 > /proc/gpio/3_dir
rmdir /tmp/www; ln -s /jffs/www /tmp

- Click 'Save Startup'

- Now log on to your router using ssh

ssh root@

-then type:

cd /jffs
mkdir www
cd www
chmod +x

-then go to

-Now you can control the switch simply by clickin ON or OFF from your favorite browser (i use my cell phone to activate the switch thru the web interface). Since my linux kung-fu skills are not developed yet, it took me some time to get familiar with .sh scripts.

Image of the web interface.

On the video above you can see circuit and the router. the circuit is connected to a multimeter to detect short circuit. You can hear a *beep* when i turn the switch on from the web interface. Also, when i run from the web interface you can hear 10 *beeps* (the switch turns on/off 10 times). The red LED indicated the status of the switch (on or off). to display the status of the switch on the web interface i wrote a small loop inside each .sh script.


-Hook it up to your car's door switch and open your car with your wifi enabled cellphone.

-If you have Remote Start System installed on your car you can hook up the remote control of the system to your f.i.c.s. (fonera internet controlled switch) and turn ON/OFF your car from the internet

-Open your house/garage door.

-Turn ON/OFF your POOL PUMP.

-Restart additional routers with f.i.c.s.


- OpenWrt
- Steve's Bourne / Bash shell scripting tutorial

NOTICE: I am not associated with the company/product(s) mentioned in this post. BEFORE YOU TRY THIS YOU MUST KNOW WHAT YOU'RE DOING....if you get electrocuted, executed, kidnapped, burn your house down dont blame it on me....

Enjoy :)

since im not very good in programming shell scripts can someone write a Shell script where the user will be able to schedule the f.i.c.s. to go ON/OFF at certain times thru the web interface.

Blog Archive