Remotely shortening pins via cellular network or the internet.

Thread Starter

papajo_r

Joined Apr 5, 2021
8
Hello, I am remotely managing a computer (that doesnt support the good stuff like AMT etc) the issue is that sometimes the OS hangs and the PC freezes.

At this point using console commands is useless nothing will be done.

One needs to go to the physical location of the computer and hard shutdown it by holding the physical shutdown button for a few seconds or pressing the reset button.

So I thought of cellphones being used to triger bombs remotely by calling the cellphone it then sends an electrical charge and the bomp explodes.

I kinda wanna do the same thing but instead of sending an electrical charge I want just to short the motherboards poweron/off pins (2 pins) and/or the reset pins.

Like for example by sending an sms to the device e.g "1" for shortening the shutdown pins for a few seconds then do nothing for a few seconds then short again for a second (to boot again) and "2" for shortening the reset pins


I know basic sciences and I'm a PC tinkerer and soldered a few doohickies but I am in no way experienced or an engineer (I am able to execute verbose instructions though :p )

I dare to believe that this project is easy enough to be described in 10 lines of text or so (e.g what specific parts to buy etc) could you help me out because I dont know where to source the stuff needed nor am I sure what exactly I need (I mean I probably dont need a cellphone just a pcb with a sim tray and basic logic preinstalled to operate the simcard and then something like a relay or whatever to get triggered by my incoming messages and short the pins accordingly)

Could you pretty please guide me a little bit? :p thanks :)
 

Irving

Joined Jan 30, 2016
3,843
A possibly better option is to have a local 'watchdog' timer. This is a bit of hardware/software that runs at startup and operates in the background, continuously resetting a timer. If the PC hangs, then the timer 'times out' and restarts the PC. Alternately, an external box that 'talks' to an app on the PC over USB or wifi. If it starts getting no response, say after 3 attempts, it reboots the PC.

Windows 10 PCs have some existing built-in hardware/software to do this. Find out more from this link.

  • Monitors unattended applications and captures the application status
  • This utility can terminate and relaunch the application, when a targeted application becomes unresponsive
  • This utility can gracefully shutdown or restart the OS whenever it detects a target application failed x+ times - as specified by the user, since the last Windows 10 boot
  • This utility logs application monitoring activity to easily accessible log file
  • This utility can enable the Intel® Watchdog Timer driver to execute a hard system reset if a monitored application causes the system to become unresponsive
 

Thread Starter

papajo_r

Joined Apr 5, 2021
8
A possibly better option is to have a local 'watchdog' timer. This is a bit of hardware/software that runs at startup and operates in the background, continuously resetting a timer. If the PC hangs, then the timer 'times out' and restarts the PC. Alternately, an external box that 'talks' to an app on the PC over USB or wifi. If it starts getting no response, say after 3 attempts, it reboots the PC.

Windows 10 PCs have some existing built-in hardware/software to do this. Find out more from this link.

  • Monitors unattended applications and captures the application status
  • This utility can terminate and relaunch the application, when a targeted application becomes unresponsive
  • This utility can gracefully shutdown or restart the OS whenever it detects a target application failed x+ times - as specified by the user, since the last Windows 10 boot
  • This utility logs application monitoring activity to easily accessible log file
  • This utility can enable the Intel® Watchdog Timer driver to execute a hard system reset if a monitored application causes the system to become unresponsive
I use hiveOS to remote manage my mining rigs. (linux)

It has watchdog scripts enabled but they do nothing if the PC freezes e.g due to a failed overclock.

I have to go to the rig and manually shut it down or boot it up (yes sometimes a rig might "decide" to shut down but doesnt reboot :p )

It is a pain in the A because the rig is on an other block and I have to go outside my house unlock the door go to the rig reset it and return to my house....

This guy almost does exactly what I want and I can follow his instructions


The only issue is that he uses an RFID interface to trigger the Ardruino which is not usefull for me... there are ethernetshield for Ardruino if one could just explain to me how to hook it up in order to replace the RFID module of the video and do the same thing but via connecting to the ardruino over the internet it would be a gamechanger for me :p
 

Ya’akov

Joined Jan 27, 2019
9,069
If you want out of band, that is, you want to use the cellular network and not the Internet, or if you want both, then I would suggest you learn a little bit and get one of these (not necessarily from Amazon) https://www.amazon.com/LILYGO-T-Call-Wireless-Antenna-SIM800L/dp/B07VD41JLN/

It can be programmed in the Arduino IDE which is very simple. It supports both WiFi and GPRS and with only a little trouble you could connect it to wired Ethernet. The switching you need can be done easily either with a module or a circuit you build, and you could extend it to provide status information or other things.

It will require learning some but not very much.
 

djsfantasi

Joined Apr 11, 2010
9,156
I’ve done this before, in a couple of different ways. The first issue is that you’ll need internet access in both locations. Is this available?

Second, you’ll have to have a fixed IP address at each location. This is usually an expensive requirement. ISP’s don’t have a lot of fixed addresses to give out. They do provide them, but charge you dearly for them.

The solution to this issue is to sign up for a dynamic DNS service. Through a utility, it updates DNS with the current address the ISP has assigned to your equipment. The utility runs on your PC and I don’t know if there’s a microprocessor version. You could run it on your computer system, but if it hangs, there is the possibility that the IP address will change without DNS getting updated.

Another possibility is to sign up for a hosted web site. The microprocessor at the computer site would check the web site for commands to power and reset the computer.
 

Irving

Joined Jan 30, 2016
3,843
Assuming you have an internet connection at your remote location and Wi-Fi then just buy these, connect the COM & NO relay contacts to your reset switch header pins and power from a convenient USB port. The rest is just software... ;) :rolleyes:

 
Last edited:

Thread Starter

papajo_r

Joined Apr 5, 2021
8
Thanks guys, yes after googling a lot I decided to get an ESP32 to get the job done.

Assuming you have an internet connection at your remote location and Wi-Fi then just buy these, connect the COM & NO relay contacts to your reset switch header pins and power from a convenient USB port. The rest is just software... ;) :rolleyes:

I am thinking about getting an optocoupler thingy instead of relay for the sole reason that when a computer freezes then just clicking on the shutdown button most likely wont shut it down.

You have to hold on the shutdown button for a few seconds in order for it to "hard shut down"

With an optocoupler (I believe correct me if I am wrong) I can simulate that by programming its led to be on for X amount of time needed right?

If yes is this what I want (so an optocoupler as >>I the noob<< imagine it? so with a photoresistor on one side and a led on the other? ) https://www.ebay.de/itm/PC817-Ardui...542027?hash=item4225d4c2cb:g:oqIAAOSwPeJfcc4o

Also is this listing mentions that the signal output is between 3.6 and 24V how do I tune this? I need about 4-5 volts I believe for most motherboard power header switch pins

Also do I need to solder something between the photoresistor and the motherboard power switch pins? (e.g a resistor? ) or between the ESP32 and the photocoupler?
 

Irving

Joined Jan 30, 2016
3,843
You're over thinking the problem and the esp32 is a more complex beast for no benefit.

A relay output can be programmed to stay closed for a period of time just the same as a LED can be turned on, it's the same gpio from the mcu. The advantage of the relay is that it's a zero volts contact and doesn't care, in this scenario, about polarity, voltage or current. In this scenario it's more versatile and pretty much indestructible. An optoisolator will definitely care about all 3 and is much more likely to fry from incorrect connection. Optoisolator are for signal isolation, not switching. The relay is the safer and easier approach..

The advantage of the devices I linked to is that that is a self-contained solution, needing no other parts or wiring to make it go.

Whether you go the ESP8266 or the ESP32 there's a fair amount of software configuration to do, most of which is off the shelf for the ESP8266, less so for the ESP32.

With respect, what you said in your last post leads me to believe your experience of these things and your understanding of voltage/current is somewhat basic.

Do you want a steep learning curve that may take several goes to get right or a shallower one that gets the job done? I'm all for diving in with little knowledge, I do it all the time, but I have 40 years of electronics, mechanical and software engineering experience to fall back on, what's your excuse? ;)
 
Last edited:

Ya’akov

Joined Jan 27, 2019
9,069
Thanks guys, yes after googling a lot I decided to get an ESP32 to get the job done.



I am thinking about getting an optocoupler thingy instead of relay for the sole reason that when a computer freezes then just clicking on the shutdown button most likely wont shut it down.

You have to hold on the shutdown button for a few seconds in order for it to "hard shut down"

With an optocoupler (I believe correct me if I am wrong) I can simulate that by programming its led to be on for X amount of time needed right?

If yes is this what I want (so an optocoupler as >>I the noob<< imagine it? so with a photoresistor on one side and a led on the other? ) https://www.ebay.de/itm/PC817-Ardui...542027?hash=item4225d4c2cb:g:oqIAAOSwPeJfcc4o

Also is this listing mentions that the signal output is between 3.6 and 24V how do I tune this? I need about 4-5 volts I believe for most motherboard power header switch pins

Also do I need to solder something between the photoresistor and the motherboard power switch pins? (e.g a resistor? ) or between the ESP32 and the photocoupler?
Are you planning to use the ESP32 board with the SIM800L?
 

Thread Starter

papajo_r

Joined Apr 5, 2021
8
You're over thinking the problem and the esp32 is a more complex beast for no benefit.

A relay output can be programmed to stay closed for a period of time just the same as a LED can be turned on, it's the same gpio from the mcu. The advantage of the relay is that it's a zero volts contact and doesn't care, in this scenario, about polarity, voltage or current. In this scenario it's more versatile and pretty much indestructible. An optoisolator will definitely care about all 3 and is much more likely to fry from incorrect connection. Optoisolator are for signal isolation, not switching. The relay is the safer and easier approach..

The advantage of the devices I linked to is that that is a self-contained solution, needing no other parts or wiring to make it go.

Whether you go the ESP8266 or the ESP32 there's a fair amount of software configuration to do, most of which is off the shelf for the ESP8266, less so for the ESP32.

With respect, what you said in your last post leads me to believe your experience of these things and your understanding of voltage/current is somewhat basic.

Do you want a steep learning curve that may take several goes to get right or a shallower one that gets the job done? I'm all for diving in with little knowledge, I do it all the time, but I have 40 years of electronics, mechanical and software engineering experience to fall back on, what's your excuse? ;)
Well what a device is able to and what I can do with it is a whole other story I mean I didnt even know a relay could be programmed that way :p

Then why did I think of an optocoupler?

well 2 reasons

Reason 1

I saw this video which doesnt involve an optocoupler but it shows how to keep on leds by sending a signal so I assumed following the info and links under the link description I would virtually need to change almost nothing other than the timings of the signal



Reason 2 you said that an opto cares about all 3 (volts amps and polarity) but I (sine I am a noob) thought that I connect the photosensitive resitor with the motherboard pins and it would be safe since 1 pin is ground and the other pin is a 5 volts one and the photoresistor of the opto would just have infinite resistance when its deactivated (by the absence of light/LED) and just close the circuit of the two pins if it receives light...

So whatever happens wont be any different as if using a simple pc case power button and also whatever happens (e.g a thunder strikes the house and fries the mobo) wont transfer to the ESP32 since it would stop just by frying (potentially) the photoresistor side of the optocoupler and vise versa (if my ESP32 gets fried by a thunder through the power supply I connect to it, the damage would stop at the LED of the optocoupler not transfering to the PC)


Having said that all that I ordered for now is

1) ESP32
2) A breadboard set that includes a power supply module that can receive and supply 3 to 5V, cables for pins, some leds, various capacitors and some various resistors

Now if I go for the relay option how do I program it?

Or should I go to the optocoupler version instead?
 

Tonyr1084

Joined Sep 24, 2015
7,852
If you need to power down the device then power it back up again from anywhere in the world you could look into THIS to see if it would work for you. You use your cell phone with an app. Not sure your computer would start when power is restored, or if you would need to enter a password once it restarts, and I'm not sure if you can enter a password remotely. But it's worth investigating I think. And I don't know if the app comes with a monthly charge. If so - and if it's not too expensive then you may have a solution to your issue.
 

Thread Starter

papajo_r

Joined Apr 5, 2021
8
If you need to power down the device then power it back up again from anywhere in the world you could look into THIS to see if it would work for you. You use your cell phone with an app. Not sure your computer would start when power is restored, or if you would need to enter a password once it restarts, and I'm not sure if you can enter a password remotely. But it's worth investigating I think. And I don't know if the app comes with a monthly charge. If so - and if it's not too expensive then you may have a solution to your issue.
I thought about it but I had two issues with it.

1) the rig consumes like over 2000watts and I wasnt sure if this plug can handle that or if something dies over time
2) The rig works with two PSUs so there is an issue if I use it only on the main one (the one that power among anything else the motherboard) then the GPUs that are fed by the 2n PSU would still be powered on which I dont know if it would introduce any problems

but it is the easiest to use out of the box so a nice suggestion (as long as you can find the option in your mobo to reboot after power loss) thanks.
 

Ya’akov

Joined Jan 27, 2019
9,069
Well what a device is able to and what I can do with it is a whole other story I mean I didnt even know a relay could be programmed that way :p

Then why did I think of an optocoupler?

well 2 reasons

Reason 1

I saw this video which doesnt involve an optocoupler but it shows how to keep on leds by sending a signal so I assumed following the info and links under the link description I would virtually need to change almost nothing other than the timings of the signal



Reason 2 you said that an opto cares about all 3 (volts amps and polarity) but I (sine I am a noob) thought that I connect the photosensitive resitor with the motherboard pins and it would be safe since 1 pin is ground and the other pin is a 5 volts one and the photoresistor of the opto would just have infinite resistance when its deactivated (by the absence of light/LED) and just close the circuit of the two pins if it receives light...

So whatever happens wont be any different as if using a simple pc case power button and also whatever happens (e.g a thunder strikes the house and fries the mobo) wont transfer to the ESP32 since it would stop just by frying (potentially) the photoresistor side of the optocoupler and vise versa (if my ESP32 gets fried by a thunder through the power supply I connect to it, the damage would stop at the LED of the optocoupler not transfering to the PC)


Having said that all that I ordered for now is

1) ESP32
2) A breadboard set that includes a power supply module that can receive and supply 3 to 5V, cables for pins, some leds, various capacitors and some various resistors

Now if I go for the relay option how do I program it?

Or should I go to the optocoupler version instead?
The really is simple, and with one of the example sketches that does a web server you can use an http request to turn it on and off. The real can be connected via a transistor to a GPIO pin. It's easy and you will get plenty of help here.
 

Thread Starter

papajo_r

Joined Apr 5, 2021
8
The really is simple, and with one of the example sketches that does a web server you can use an http request to turn it on and off. The real can be connected via a transistor to a GPIO pin. It's easy and you will get plenty of help here.
Yea I am not worried about that I am a "power user" so to speak, port forwarding, server creation and so on and so forth won't be an issue.

I am a noob in soldering electronics that's my main concern.

If you take a look at the replies I gave above to some other people that suggested my delame is on how exactly to put together the hardware it self.

Like e.g using a opto coupler or a relay ?

do I need other passive components between the esp32 and the opto or the relay?

I also am not sure about the coding I hope that the tutorial in the video I posted above has code that will work with the opto coupler at least.
 
Top