Author

Topic: Possible? Write a DD-WRT script to short two pins momentarily, to reset PC (Read 4640 times)

member
Activity: 72
Merit: 10
You can use this comands on the wrt54gs to change the status of the
security led:



root@DD-WRT:~# gpio enable 5 #(SECURITY LED - off - green)
root@DD-WRT:~# gpio disable 5 #(SECURITY LED - on - green)
root@DD-WRT:~# gpio disable 3 #(SECURITY LED - on - amber)
root@DD-WRT:~# gpio enable 3 #(SECURITY LED - off - amber)

just a little soldering install a relay in the router and connect it 2 your reset

Science
jr. member
Activity: 364
Merit: 1
get a USB ddwrt router and using IRDA or bluetooth to activeate something that could short the motherboard pins. Don't ask me how but I do know theres an infrared transmitter program i believe you can use through ssh.
hero member
Activity: 518
Merit: 500
Quote
Automation; it would be cool the get home and from your android device "touch" a button that will open your gate, give you illumination, turn on your TV or radio on your favorite station and power up your system, just to find yourself wasting time in front of the PC 30 seconds later..

I dont want to have to touch any button! I want bluetooth or NFC to unlock the front door for me.

I never understood that. Just about every car built in the last decade has at least remote control central locking, and I have yet to see a private house front door that opens with anything other than a key. Seriously.. think about it.  5+ years ago I had a keyless go system in my car so I didnt even have to press a button to open the doors. Just be close to it. Why isnt that a standard feature on houses ?
legendary
Activity: 1260
Merit: 1000
Drunk Posts
Get yourselves one of these,

http://www.microchipdirect.com/productsearch.aspx?Keywords=DM320004

It has ~100 GPIO pins that you can program to do anything you want, and can be used to host a little web control panel. You need to know a little C code, but theres a bunch of demo code and its mostly copy/paste.
sr. member
Activity: 415
Merit: 250
Money is the root of all evil.
I love all the DIY ideas, but just so you know, you can buy devices that do this. Something like this:
http://www.digidave.co.uk/jshop/product.php?xProd=211



I saw that one and many similar devices, but where's the joy in that Smiley ?
Those devices are always about 100$ too expensive, as I'm not building a datacenter.
If I was to run a professional mining operation, or whatever professional of course I would install some professional power controller.
I do maintain a network where i have few racked servers, along with some intelligent/ip managed Rittal power strips, this one exactly http://www.rittal-corp.com/products/product_details.cfm?n1Id=2&n2Id=46&n3Id=153&cId=&pn=9970752 . This are great, but too expensive and an overkill for my needs right now.

Automation; it would be cool the get home and from your android device "touch" a button that will open your gate, give you illumination, turn on your TV or radio on your favorite station and power up your system, just to find yourself wasting time in front of the PC 30 seconds later..
full member
Activity: 189
Merit: 100
I love all the DIY ideas, but just so you know, you can buy devices that do this. Something like this:
http://www.digidave.co.uk/jshop/product.php?xProd=211



I saw that one and many similar devices, but where's the joy in that Smiley ?
Those devices are always about 100$ too expensive, as I'm not building a datacenter.
If I was to run a professional mining operation, or whatever professional of course I would install some professional power controller.
I do maintain a network where i have few racked servers, along with some intelligent/ip managed Rittal power strips, this one exactly http://www.rittal-corp.com/products/product_details.cfm?n1Id=2&n2Id=46&n3Id=153&cId=&pn=9970752 . This are great, but too expensive and an overkill for my needs right now.
hero member
Activity: 518
Merit: 500
I love all the DIY ideas, but just so you know, you can buy devices that do this. Something like this:
http://www.digidave.co.uk/jshop/product.php?xProd=211

full member
Activity: 189
Merit: 100
I read a story about someone who set up a computer to eject its cd rom drive whenever another computer stopped responding to pings. The drive was aimed so that when it ejected it hit the reboot button on the computer that was freezing.

Smiley I did this too...

I've got the idea when I saw something similar on hackaday, they've used the same cdrom eject trick to open an electronic door door...even more epic IMHO Smiley...

I have a small form factor desktop which is acting as a supervisor for my other pc army. It had a dusty 3.5" floppy drive taking up space. Not anymore.
I've took a piece of wood plank, and formatted it to the floppy size, but a tad longer, drilled the bolt holes, adding two more holes in front so i can bolt another piece of wood, where i've attached a spare reset button that i've scrapped from a old pc chasis, showed the contraption into now free floppy drive bay, and connected the reset button using some cat5 cable and connector to the reset pins on the main board. The piece of wood holding the reset button is positioned in front of a cd tray, so when it opens, it presses the reset button, the mainboard gets it's reset signal and reboots. I can remove the reset button and the piece of wood holding the reset button, if I have a need for a cd, but who's using cd's anymore?
legendary
Activity: 1134
Merit: 1005
I read a story about someone who set up a computer to eject its cd rom drive whenever another computer stopped responding to pings. The drive was aimed so that when it ejected it hit the reboot button on the computer that was freezing.

Epicness really..
really epic
sr. member
Activity: 418
Merit: 253
I read a story about someone who set up a computer to eject its cd rom drive whenever another computer stopped responding to pings. The drive was aimed so that when it ejected it hit the reboot button on the computer that was freezing.

Epicness really..
member
Activity: 77
Merit: 10
I read a story about someone who set up a computer to eject its cd rom drive whenever another computer stopped responding to pings. The drive was aimed so that when it ejected it hit the reboot button on the computer that was freezing.
sr. member
Activity: 322
Merit: 251
Have you tried a different BIOS version?

What about Wake on LAN?  Does that work on you're motherboard?  That's what I use and DD-WRT has it built in.  That will definitely allow you to turn your rig back on after an outage.
Cool. I never figured out WOL, cause the last few times I tried it never work. But that was not using dd-wrt though. Will try.
Might have to upgrade the BIOS, but i doubt it ever gets addressed, as 99% of people don't use that function at all.
But thanks though. The only problem left now is if it ever gets a hard lockup... then i am screwed.

WOL functionality is paramount to kiosk type system deployments. It's very commonly used.
hero member
Activity: 518
Merit: 500
whether you can solve this or not depends on your router. some of them have GPIO pins that can be triggered using the proc/gpio interface.
Others can control their status LEDs(or they already are triggered by a gpio), which allows you to abuse those contacts as "switches" for power and reset, at the cost of losing the status led functionality.

However, a simple BC880 transistor(0.15€) hooked to the two LED pins will allow you to short the Reset/power lines.

This ofc is indeed easily scriptable. however as long as you can ssh into your pc from the outside, you wont need a script, because triggering an LED/GPIO is just a oneliner. an alias will do that trick.
full member
Activity: 210
Merit: 100
I had this same issue when I first got setup.  I would have lockups where the computer is technically on but unresponsive.  It would take a physical shutdown to clear it up.  So I made an arduino resetter hooked to transistors which shorted the pins on the power/reset switch, then I wrote a GUI that was intended to run on a "monitor" machine that was not mining.  The GUI had buttons to reset/power down with an indicator that changed when the power was on/off.  Then I could just log into Teamviewer and do the physical reset.

By the time I got it all done I didn't need it anymore.  I got all my heat/overclock issues stabilized and it never needs shutting down.  Aside from one power outage my miners have been running 3-4 months solid.  I decided it was not worth the small amount of hashrate increase if I had to go reset the thing all the time. 

I run 5x Sapphire 5830's in one machine for around 1.5Gh/s.
legendary
Activity: 1134
Merit: 1005
Have you tried a different BIOS version?

What about Wake on LAN?  Does that work on you're motherboard?  That's what I use and DD-WRT has it built in.  That will definitely allow you to turn your rig back on after an outage.
Cool. I never figured out WOL, cause the last few times I tried it never work. But that was not using dd-wrt though. Will try.
Might have to upgrade the BIOS, but i doubt it ever gets addressed, as 99% of people don't use that function at all.
But thanks though. The only problem left now is if it ever gets a hard lockup... then i am screwed.
sr. member
Activity: 406
Merit: 250
Have you tried a different BIOS version?

First you said it hard freezes, now it's outages.  two entirely different problems.  If it's hard freezing, it's not stable.

Why wouldn't wake on lan work if it's a complete power outage?  The computer would be off no?
legendary
Activity: 1134
Merit: 1005
That is just an extender for the buttons and power LED from the motherboard to let's say another room (ie; you don't have to walk your lazy but from one room to another just to reboot it or shut it down or see the power LED).  It works end-to-end off a cat5 cable.  That is in no way intended to plug into a networking device.

Interesting concept, but how would a router physically short two pins?  

I think the ideal solution is to stabilize you're rig. I like you're creativity though.
By sending out signal on two pins at once, making the mobo think it is shorted. I have no idea how much current is needed.
I didn't come up with the idea, someone else on this forum did.
well, the rigs are stable, but power outages are out of my control.
I have one of the mobos where the "state after power loss" don't work as expected. Really sucks.
sr. member
Activity: 406
Merit: 250
That is just an extender for the buttons and power LED from the motherboard to let's say another room (ie; you don't have to walk your lazy but from one room to another just to reboot it or shut it down or see the power LED).  It works end-to-end off a cat5 cable.  That is in no way intended to plug into a networking device.

Interesting concept, but how would a router physically short two pins?  

I think the ideal solution is to stabilize you're rig. I like you're creativity though.
legendary
Activity: 1134
Merit: 1005
Problem: How to remotely reset a PC after it hard freezes. Wake on LAN wouldn't work, as the PC is still ON. You can't SSH into it because the PC is hung.

http://cablesaurus.com/index.php?main_page=product_info&cPath=15&products_id=43&zenid=d4is8uqptar3lu4p2eqisiqu83
This item allows one to connect a Cat5 cable to the power and reset switch. The cat5 cable is only used to relay the signal when a user presses the power or reset button on the other end.

If we connect the cat5 cable to a DD-WRT router and write a script to short two pins of the cat5 cable momentarily, we can remotely reboot the PC.

Is this even possible? If yes, would someone be interested in writing a script? I am willing to donate some money.
Jump to: