[SOLVED] Wake on lan via Amazon Alexa fix?

Gaogier

Reputable
Jan 4, 2021
102
0
4,580
Hello

first question how does wake on lan work, can it work when pc is off?

I have downloaded many iPhone apps but cant seem to get anything working and if I do, it only works once or twice and cant get it to work.
 
Solution
First thing to remember is there is no such thing as wake on WAN. Everything you see related to waking stuff up from device on the internet is a hack, and the vast majority of the instructions skip the fact that it will never work unless your router has the ability to set a static arp table entry. That is very rare feature. They want to get their clicks on their silly pages so they don't admit even if they know that it will not actually work.

Most the idiots that write these guides have no clue and do not test properly. If they did they would find out it has the problem you describe. It works at first because there is a ARP table entry cached for a period of time in the router. After about 15 minutes or so this is purged...
First thing to remember is there is no such thing as wake on WAN. Everything you see related to waking stuff up from device on the internet is a hack, and the vast majority of the instructions skip the fact that it will never work unless your router has the ability to set a static arp table entry. That is very rare feature. They want to get their clicks on their silly pages so they don't admit even if they know that it will not actually work.

Most the idiots that write these guides have no clue and do not test properly. If they did they would find out it has the problem you describe. It works at first because there is a ARP table entry cached for a period of time in the router. After about 15 minutes or so this is purged. Since the wake on lan machine does not respond to arps there is no way for the router to know where to send the data.

This is why real wake on lan sends a broadcast packet not a data packet to the mac address of the machine.

I don't know if alexa has the ability to send a actual wake on lan packet. I know asus routers you can remotely access the router from the internet and then tell it to send a real wake on lan packet on the internal lan.

Your problem may also be microsoft. They got involved and have a bunch of proprietary sleep things that some bios manufactures actually support. If it gets in the wrong mode it will not wake on these packets.

In general you can just use one of the many sleep states where the machine is just very slowed down. The power difference is very minor.

A much better way to accomplish this is to use the option in most bios that let will boot as soon as it sees power. You can then use one of the many fancy power plugs that you can access from even the internet to turn the machine on.
 
  • Like
Reactions: SamirD
Solution
Even when it works wake on lan tends to be strange. Some times you must send the packet multiple times.

More would be why do you feel you need to do this. Unless you have a very good reason the hassle involved with setting this up and keeping it working just is not worth it.

With all the modern power save options it has very little extra power savings that it did years ago. Although microsoft has made a huge mess of this topic with all their own proprietary forms of waking from sleep, just using one of the many suspend modes works just as well.

This is something that was used 20 years ago mostly for servers. Most servers now have special small management processors that allow very advanced access and they take about the same power as just a ethernet chip.
 
  • Like
Reactions: SamirD
Wol is very inconsistent on working, even when it does work. I have some thin clients that will 'fall asleep' and need to be woken up via a wol and it's a real pita to even do just that much--so much so that I turn off all power saving on those things.
 

Ralston18

Titan
Moderator
No disagreement with the preceding posts.

WOL is problematic.

And although I am not sure about your full situation with respect to environment and requirements you may be able to do something via Powershell.

If the WOL requirement is a serious need and frequently needed then there are options available.

https://powershell.one/code/11.html

Invoke-WakeOnLan cmdlet

Note the "one - liner" Sending Magic Packet

I am a beginner Powershell person and I have not (full disclosure) experimented with the cmdlet to determine if and how well it actually works.

Most likely easily tested to find out and perhaps work out any issues. Curious to see if the Invoke would work for the "thin clients" per @SamirD

(May be actually quite viable despite the above noted "mess" that Microsoft has made of such things.)

I did note several other links that likewise applied or used Powershell in some manner using scripts.

That could become cumbersome and even more complicated.
 
It is 16 times within the same packet....you in theory at least should only have to send 1 valid packet but it doesn't always work for some reason. The last time I looked at this years ago I used switch where I could capture the data being sent on the port. It seemed very random sometimes it would take just 1 packet and others it would take mulitple to get the machine to boot. Then again I may have been impatient, these old machines do not boot up even to the bios as fast as modern stuff.
 

Ralston18

Titan
Moderator
Try putting the wolcmd line in a 3x loop via a powershell script - could automate the process.

Maybe an array of some sort. Not familiar with wolcmd and very much a Powershell beginner.

Should be straightforward to experiment with and you would not need to touch or change the existing process.

Would like to tinker with it; however, 1) it has already been done, and 2) I already have too many such things on my list.... :)

Just google "Powershell WOL" etc.

Example:

https://www.pdq.com/blog/wake-on-lan-wol-magic-packet-powershell/

Very likely that things will need to be tweaked a bit for any specific network environment.