OpenWrt Forum Archive

Topic: wrt + linksys router hacked to turn ac power on/off to reboot a PC

The content of this topic has been archived on 29 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hello, I have been running WRT on a few Linksys routers for a while now and absolutely love the work this community has put into the firmware.

I had a question though and wondered if anyone had noted a way to do the following.

I currently have a Olimex AVR I/O Controller (http://www.sparkfun.com/commerce/produc … cts_id=766) board recently and set it up to where I could send the onboard microcontroller a signal to turn off and turn on an AC outlet. It works great and I currently have it running to an embedded Linux card so I can login via SSH and switch a few servers on and off. Problem is I need my embedded Linux card for other projects so I figure what better way than to consolidate.

Here is my question, are there pins inside Linksys routers where I could grab a general digital I/O signal (GPIO? basically Low/High pin + GND) to send to my current setup so that I can eliminate the embedded Linux card and allow server power resets via a button in the WRT site?

Maybe an output from a led ?
You can use a ready-made solid state relay (low current input) or use a transistor to amplify the signal.

I was thinking about that too. I already have a setup running on an Arduino with a relay to switch a PC on and off. I'm wondering how the environment (WRT) might control your idea with the LED.

Obviously, I'm looking for a simple push button in the web config to make it happen. I've actually just pulled a WRT45G apart to see what might be available. I'm even willing to kill a LAN port or two if it makes sense.

(Last edited by thekidd on 15 Apr 2008, 16:34)

Have you thought about just wiring a signal relay to emulate a reset switch?

I'm sorry, how would that work. I'm a bit dumb when it comes to this. Been programming for a bit but just got into the hardware stuff.

star882 wrote:

Have you thought about just wiring a signal relay to emulate a reset switch?

That's a good idea. So, what star882 is getting at is instead of controlling an AC line-level relay (dangerous, more expensive), you could directly control the reset button on the PC instead.

In other words, instead of setting up a relay to momentarily break the AC power connection to reset the server, you could use a relay (or similar solid state device) to momentarily connect the mobo pins which the reset button connects to.

Makes since to me. My biggest problem though would be how to pull the relay or whatever high and low to switch it. Is it actually possible in the WRT code to control LEDs on the Linksys board?

See I already have a design to do this with a Linux controller board but I would like to cut out the middle man and hook up the relay directly to the linksys router and use WRT code to turn on/off/reset the server.

Is this possible in the code? If so, where might I look? Kinda lost in the source at the moment.

Nevermind, I spoke too soon and realized people have already been busy doing this. Guess I need to pull my Linksys router apart and figure out where I can rob a few GPIO pins. I'll keep this post going as I learn more.

The discussion might have continued from here.