Wake-on-Lan
Pages: 1 2
Alan Adams (2486) 1149 posts |
Has anyone created a RISC OS WOL tool that I could use to wake up a remotely sited NAS? (on the same LAN, but a different building.) I’m asking before trying to do it myself. Edit: Should have googled first. Now found Dave Higton’s program. |
Paolo Fabio Zaino (28) 1882 posts |
Hi Alan, Do you have GCC or DDE, if none I’ll pre-compile it for you. (works best if compiled with GCC, DDE had some issues with their ported libraries IIRC). P.S. |
Martin Avison (27) 1494 posts |
Yes – I have been using !Wakeup to start my Synology NAS for years, and it works very well – especially as I usually run it from an Organizer Task alarm. |
Paolo Fabio Zaino (28) 1882 posts |
@ Martin If Dave’s one is proven to be working then I suggest to use that one. I’ll still upload my sources in the github repo, so everyone who wants to improve my code or test it can play with it and we’ll have shared sources that are always better than just binary, given we are all ageing here XD |
Dave Higton (1515) 3526 posts |
Mine works for machines whose Ethernet interfaces respond to “magic packets”. Just remember never to remove mains from the machine. It fooled me for ages when I was testing it… The OS needs to run in order to set the interface up to respond. Removing mains makes it forget until the OS runs again. So soft power down only! |
Steve Pampling (1551) 8170 posts |
Same subnet, or routed subnets?
Most NICs it’s a saved setting in the card. Common as muck Intel stuff certainly, Cisco and HP too. |
Alan Adams (2486) 1149 posts |
In my case, it’s a Synology NAS set to hibernate then power down. The power supply is external, and will remain on. I’ll see what happens if I power that down, then on again. I expect WOL will still work, but needs testing. There’s no subnets – just a wire between buildings. I’ve still to investigate how to wake it up from Windows. It takes around 90 seconds so I need a way for the Windows bit to wait for a response. |
Martin Avison (27) 1494 posts |
I use mc-wol by MatCode from Win10 – is is only 6kb, but it is only command line, but works fine for my use from a desktop shortcut. |
Alan Adams (2486) 1149 posts |
Thanks. There are a number of options. The tricky bit is more about issuing that command then waiting until the NAS has powered up, which is in the order of 90 seconds. I could tackle that by scheduling two jobs a few minutes apart, or delve into the depths of PowerShell, whuch seems to have something resembling wait commands. The aim is to have this kick off automatically, and it’s the same aim for RISC OS too. That’s closer to working right now. |
Steve Pampling (1551) 8170 posts |
Same ground and electrical phase in both?
Various scripting utilities around for that. AutoIT has stuff to look at window content and react to that. |
Dave Higton (1515) 3526 posts |
The machine room where I used to work had the machines split between three phases, with red, yellow and blue tape marking the areas; there were strict instructions not to connect anything between machines on different phases. This conveniently ignored the fact that all the machines were connected to Ethernet switches regardless of phase. There really isn’t a problem interconnecting machines on different phases with Ethernet cables. The simple requirement is that all the machines have a good connection to earth. There is no point whatsoever in argiung about different earths – the previous sentence gives the full specification. Ethernet interfaces are all insulated by transformers unless power over Ethernet is involved, and computers don’t normally supply or consume PoE. |
Alan Adams (2486) 1149 posts |
It is a common supply, i.e. from the same incoming board. It’s a (just) detached garage. We also had fun at work, when we first installed 10base2 cable – remember those? The site had two substations. When we got strange errors I disconnected the cable at one end and put a multimeter between the earth of the cable and the connector. 50VAC. We now had the ammunition to get permission to install optical fibre. Incidentally tests on the NAS show that if it powers itself down, then the mains is disconnected and reconnected, it responds to WOL. If on the other hand I power it down using the button, after mains power is restored it doesn’t respond to WOL. So it does what I want in respect of power cuts. |
Steve Pampling (1551) 8170 posts |
One comment – Victorian hospital buildings1, with electrical supply with spikes that destroy UPS units. 1 We have more than one decent size site. The service territory seems to be growing too |
Steve Pampling (1551) 8170 posts |
WoL, power scheduling and auto restart (after power interruption) are interlinked. |
Dave Higton (1515) 3526 posts |
Spikes that destroy power supplies of any kind are nothing to do with earth connection, unless the earth connection is completely missing, in which case your overriding consideration should be the safety of all your staff. I’ve seen power supplies destroyed as a result of a loose neutral connection in a three phase box, which resulted in our neutral voltage being significantly different from zero, depending on what was being consumed from the other two phases, so what should have been supplied to us as 240 volts was often a lot more. Other than that, if there are heavy loads being disconnected abruptly, there can be brief spikes. Stuff that is designed to modern EMC specifications should be immune. Maybe you’ve got old equipment, or stuff that claims to be conformant with standards but isn’t really. (Our building security system suffered several PSU failures on brown-outs. That was elementary bad design.) Or maybe your mains system has some fault such as a loose neutral as I described above. There is mains monitoring equipment out there for purchase or rental – it might help you diagnose what’s wrong. |
Dave Higton (1515) 3526 posts |
One end, at least, wasn’t earthed. |
Dave Higton (1515) 3526 posts |
Something else to consider is that your earth connection isn’t supplied to you from the substation – it’s entirely local to your premises. In the old days of lead or copper water pipes, they were a gift in that they were large areas of metal in contact with the earth, and you could easily make a good electrical connection to the rising main. If the pipe has been replaced with plastic, you could have lost the earth connection. |
Steve Fryatt (216) 2105 posts |
That’s only true for TT systems, which I wouldn’t expect to feature in a – presumably urban – hospital building. The more common arrangement (in the UK, at least) used1 to be to have a separate Earth conductor (usually the cable shield) back to the earth point at the substation (TN-S). These days, the approach used is to connect the Earth to the Neutral conductor at the service head (TN-C-S) and to ensure that Neutral, which is the metal sheath of modern “coaxial” supply cables, is earthed at regular intervals on its way back to the substation – which gives TN-C-S its other name of Protective Multiple Earthing (or PME). Whilst bonding water and gas pipes to Earth is done, it’s usually for the opposite reason: to ensure that if the Earth conductor within the property becomes live for some reason (perhaps a broken Neutral on a TN-C-S system between the service head and the first protective earth point), then all exposed metalwork in the building is held at the same potential. It’s this which makes installing car chargers on TN-C-S supplies so much fun, as you’re not allowed to connect the exposed metalwork outside the building to the TN-C-S Earth connection inside because it’s not possible to guarantee that everything within reach of the car is equipotentially bonded. The potentially bigger concerns with running a cabled LAN to an external building are ensuring that you’re not inadvertently exporting an Earth connection from inside the property to somewhere that BS7671 says it shouldn’t be (see above), or providing an easy route for lighting strikes into the property. 1 Many decades ago. |
Chris Hall (132) 3554 posts |
Something else to consider is that your earth connection isn’t supplied to you from the substation There are many cases where it is. Sometimes bonded to the neutral, which means PME is required inside the premises. Lots of electrical equipment is now double insulated (two concentric squares) and does not require an earth. If you have equipment without the two concentric squares and it has no earth, then cut the plug off. Quite often the property will have a earth stake which is also connected. It used to be the incoming water main (never the gas main) but that worked less well with plastic pipes. |
Steve Pampling (1551) 8170 posts |
You can spend time and check what is supposed to be there and have it checked to prove it’s there. I just work on the safer basis that doing the interconnect with fibre eliminates the question. |
Steve Fryatt (216) 2105 posts |
Outside, surely? The “multiple” in PME refers to the multiple places that the Neutral is earthed between the property and the substation, so as to limit the number of locations where a Neutral break could make the property’s Earth live at line potential. |
Chris Hall (132) 3554 posts |
No. (Well it is true what you say, but also inside.) If the neutral is bonded to the earth then anything inside the premises that might find its own way to earth, metal sinks, etc. must be bonded to the neutral otherwise under fault conditions the neutral might go to a few kV but the actual earth won’t. Or vice versa. AIUI. It protects against you touching the metal sink and (e.g.) the casing of an electrical appliance. |
Steve Fryatt (216) 2105 posts |
No. In a PME/TN-C-S system, exposed metalwork, pipes, sinks and so on are bonded to Earth, not Neutral. The Earth, in turn, is derived from the Neutral in one location and one location only: the supplier cut-out, on the supply side of the meter and consumer unit. Aside from anything else, doing otherwise will make the use of RCDs and RCCBs a little tricky. |
Chris Hall (132) 3554 posts |
Earth, neutral are bonded together at one point, on the supply side of the consumer unit. That’s what you bond to. Also tricky if you get the neutrals mixed up. |
Paolo Fabio Zaino (28) 1882 posts |
For everyone interested, https://github.com/RISC-OS-Community/WakeOnLAN It’s the initial commit, but GCC on RISC OS 5 seems to be able to compile it fine. Instructions provided on the read me. This tool works either via command line or via Desktop. Any test would be very much appreciated, thanks! |
Pages: 1 2