Sometimes connectivity problems go away by power cycling a router. It’s a simple but inconvenient solution to a problem that shouldn’t exist, but that didn’t stop [Mike Diamond] from automating it for a few bucks in parts. The three-dollar router rebooter may be a simple device with only one job, but it’s well documented and worth a look.
The device is an ESP8266 board configured to try to reach Google periodically via the local wireless network. If Google cannot be reached, the board assumes a reboot is needed and disconnects the 12 V power supply from the router by using a relay. Then, after a delay, power is re-connected and all of one’s problems are over until the next time it happens. [Mike] used a relay module that has built-in screw terminals and a socket for the ESP8266-01, so it looks like the whole device can be put together without soldering a thing.
While the code for making this happen may sound trivial, [Mike] nevertheless delves into documenting it. It makes a great example of how to implement a simple event-driven finite state machine in a way that’s clear and concise. By structuring the code so that there is a finite number of specific states the device can be in (router power on, router power off, and testing connection) and by defining exactly how and when the device switches between those states, operation and troubleshooting becomes a much more manageable job. Another great example is this IoT Garage Door Opener project. If you’re programming devices that interface to physical things, these techniques are definitely good practice.
Some low-end or older routers might get you a decent WiFi network in your house or apartment, but often these cheaply made devices are plagued with subtle software problems that cause the router itself to become unresponsive after a few days of operating. One solution is to just power cycle the router by hand whenever the Internet disappears, but a better solution is to build something that does that for you.
[Charlie] had this problem as the de facto IT person in his family, and didn’t want to keep getting bothered for such a simple problem. His solution involves a relay, an ESP8266, and a Wemos D1 mini. The device connects to the Internet through the router and occasionally sends out pings to another address. If it can’t ping the address successfully after a certain time period, the device power cycles the router by activating the relay.
Since this isn’t the newest idea out there, there are many ways to solve this problem if you are constantly annoyed by router issues, whether from your own router or from friends and family who treat you as their personal IT department. One solution doesn’t involve any extra hardware at all as long as you have a computer near your router/modem already, and others solve this problem when it happens to the modem rather than the router.
Continue reading “Router Rebooter Eliminates Hassles”
You may not have ever thought about it, but the far-too-often-used keyboard combination of Control + Alt + Delete had to have been brought into existence by some random coder at some point in technological history. But wait, it wasn’t just a random coder. The keystroke combo is attributed to [David Bradley]. He was one of the original designers of the IBM Personal Computer. You can even hear his own recount of the story in the video after the break.
He came up with the idea after growing weary of waiting for the Power-On Self Test (POST) routine to finish during each reboot of his software testing regiment. We remember the old days of slow hardware and can understand his frustration at the lost time. He decided to throw in a shortcut that allowed the software to reboot without power cycling the hardware. The original implementation used CTRL-ALT-ESC, but was later changed so that one frustrated keyboard mash couldn’t accidentally reboot the system.
Continue reading “The Origin Of CTRL-ALT-DELETE”
[Cory Wright] shares a tip on how to reboot a system with a failed hard drive remotely. The magic SysRq key is a linux kernel feature that lets you perform a number of interesting operations. If you’re working on a remote system where the disk has failed, you won’t have access to the reboot or shutdown commands. You can issue keystrokes to the magic SysRq device in /proc though, so you can send a hard reboot directly to the kernel with no disk access required.
The Wikipedia entry includes a handy tip on how to properly restart a otherwise frozen machine. It should save you from having to fsck the next time around.
[photo: Joshua Davis]