Wake on LAN Issues

BrADASS

Reputable
Jul 2, 2015
24
0
4,520
I have wake on lan working from both within my home network and outside when my computer is in sleep mode. But whenever the computer is shutdown it will not wake up from either within my home network or outside of it. I have a WOL function in my router, that when I log into it from inside or outside my network I am able to wake my computer from shutdown.
I am using the Wake on LAN/WAN app on android. I have an Asus RT-N12 router. I disabled the firewalls within the router.
 
Solution
The ARP must be setup in the router and that is the major problem since few if any factory firmware routers let you set the arp command. This is generally why you can not make it work on most routers.

Ralston18

Titan
Moderator
Sorry: I am not following the problem.

You state "But whenever the computer is shutdown it will not wake up from either within my home network or outside of it."

Then you state " I have a WOL function in my router, that when I log into it from inside or outside my network I am able to wake my computer from shutdown."

So you can wake the computer from shutdown....?

Would you please add some clarification regarding what is not working. Thanks.

 

BrADASS

Reputable
Jul 2, 2015
24
0
4,520
Sorry for the confusion. I am trying to get this working using the wake on lan/wan app on android (I have tried other apps and web interfacess too without success). The only way I have been able to wake the computer from a shutdown state is by logging into my router (both in home network and outside) and using the WOL function from there. When the computer is in sleep mode it works every way I try.
 

Ralston18

Titan
Moderator
So, whatever is sent by the Android to bring the computer out of sleep mode works just fine from inside and out.

Thus it narrows down to "why does the router's WOL function work (inside and outside) to bring the computer out of shutdown and why the Android app (inside and outside) does not bring the computer out of shutdown"?

Obviously the computer is shutdown but "alert" enough via ethernet card configuration etc. to respond to a wakeup from the router's WOL function. Meaning that the network card is apparently configured correctly (via Device Manager) to listen and to bring the computer out of shutdown when the proper packet is received.

You disabled the router firewalls so what the Android sends should get though to the router. What does the router do with that packet? It knows what to do with its own function generated WOL packet but what about the packet from the Android? Does it port forward that packet and to whom and how. As I understand it, the magic packet includes the MAC address of the computer to be brought out of shutdown

Even if the router knows where to send the Android's packet, is that packet correctly formatted to initiate a computer startup?

Anyway, my "thinking out loud" here sort of leads me to the conclusion that the Android app may not be correctly configured to bring the computer out of shutdown. If "wake up from sleep" is working then the Android at least has the correct information for that process and the router proceeds as expected as well.

What is being sent or perhaps not sent by the Android (and the other tried apps as well) with respect to telling the computer to start up is now the question.

Is there a network card configuration that restricts the network card to only listen to the router and not a wider set of devices; i.e., the Android & apps?

If I go into Device Manager and my network adapter, right-click, select properties I have tabs for Power Management and Advanced.

There is also an Event tab that tells me about events with respect to my network card. Do you see any entries regarding "awakenings" or "starts"?

Under Advanced I have a property = Wake on pattern match and three other WOL/shutdown related properties. Look at "WOL and Shutdown Link Speed".

Here are some explanations regarding the settings:

http://www.mysn.de/driver/Archiv/MB8/9270/Win7/05LAN/README/WIN7/English/AdvProperties.html

The only thing I can suggest at the moment is to look go through your network card's configuration to see if one of the property values is not what it should be or is expected to be.

And what is LAN/WAN app are you using on the Android? I cannot duplicate that part of the puzzle but I would like to see the documentation.
 
If it can WOL from sleep (s1/s3) and NO WOL from shutdown (s5), the problem has got to be on the machine/NIC you are trying to WOL.

A similar thread which I cannot find at the moment I suggested make sure the RJ45 LEDs are lit during shutdown (means it's powered and ready kick into action) and to make sure there isn't a BIOS setting that enable this.


If none of this work, you may just wanna sleep that box. Are you aware sleep mode ACPI S3 draws about the same amount of power as shutdown ACPI S5? I measured it. Is empirical.
 

BrADASS

Reputable
Jul 2, 2015
24
0
4,520
Ralsron18, you have summarized problem exactly. I checked all my "advanced" WOL settings under my driver settings and they are all enabled and link speed is set to not slow down. The events tab doesn't say much even after I started my computer thru the router the last event it told me about was yesterday. The app I am using is "wol wake on lan wan". Basically what it comes down to is what does my router send to wake it and what does the app send.

jsmithepa, the rj45 lights shut off in sleep mode but it still works. And I can wake up my computer from s5 when I go thru my router wol function.
 

Ralston18

Titan
Moderator
What are the results of "powercfg /a" from the command prompt (no quotes)?

Also take a look at this link:

http://www.codeproject.com/Articles/11469/Wake-On-LAN-WOL

About halfway down is a comment about 192.168.1.255 (broadcast address ) that must be forwarded.

What address does the Android app use ? Anyway to tell?

Basically the direction I am going is to find the magic packet that your system is looking for, that the Android app is using the correct packet, and sending it via the proper broadcast IP. And that the router is not still somehow blocking it. Wakes up from sleep okay so therefore I think the packet itself is the issue.

Maybe the link will help you identify some other relevant information.
 

BrADASS

Reputable
Jul 2, 2015
24
0
4,520
Yes, that is the app I am using.
Here is what I am thinking. I found this quote here http://www.wolcenter.com/faq.php
"MAC Addresses are not routable, in other words it is not possible to send network datas over the Internet using a MAC Address as the destination. Therefore, to send a magic packet over the Internet it must be embedded in an UDP packet sent to the IP address of the LAN gateway/router. Up to the router to extract the magic packet from the UDP packet and then broadcast it on it's LAN leg. Unfortunately not all routers will support this feature."
So, I think when it is in sleep mode the router does not need the MAC address of the computer for WOL to work. The packet goes to the router and via port forwarding it forwards the packet to the correct destination local IP address of the computer. Then when the computer is shutdown it loses the local IP address.
So, I think that the router doesn't forward the mac address info sent from the app to the computer.

Do you think that makes sense? Not sure exactly how to solve this problem if this is what is happening
 

BrADASS

Reputable
Jul 2, 2015
24
0
4,520
Sorry I didn't answer any of your questions. I only send 1 packet (I have tried more, but it doesn't change anything and isn't required). I don't send it as a broadcast (but I have tried it as one). When you send it as a broadcast with subnet 255.255.255.0 it will send it thru 192.168.1.255 (that is my understanding anyway).
 
There are all kinds of issues make wake on "WAN" work since it is not a actual thing. Wake on lan sends to the broadcast mac address and contains the mac to wake inside this packet.

Very technically it should not contain a IP header which makes wake on wan impossible...other than when the router has a app running on it. Many ethernet chips do though ignore the headers and allow the magic packet to be anyplace inside but there is not standard it varies a lot.

The major issue you have is you can not send to the broadcast IP from a remote location. This is intentionally disabled because it is then trivial to run denial of service attacks against every machine on your lan with a small amount of traffic. So the router will either prevent the configuration or it will not actually send data to the broadcast mac address.

The next issue you have is that the ARP will time out of the router so you can not use the actual machines IP address.

The common way to make this work..and it does not always....is to define some dummy ip in your range. Then put in a static ARP entry to the broadcast mac ie FFFFFF:FFFFFF . You then port map the external to this dummy ip.

Now the application must actually put the correct MAC address inside the packet, some of them think they can use IP addresses which only works until the ARP times out. If you do not have to manually key in the machines mac you know the app is doing tricky stuff that likely will not work in a WAN type of design.

Another issue with this is microsoft has gotten involved and defined their own sleep/wake stuff. Some bios makers have incorporated some of these feature and it causes massive confusion.
 

Ralston18

Titan
Moderator
Then, as I follow it:

1) Set up dummy ip within router's DHCP address range, e.g.: 192.168.1.123 (Can or should that "dummy" be reserved for the mac of the target computer?)

2) Use arp -s in command mode to create an entry like this

192.168.1.123 ff-ff-ff-ff-ff-ff static

3) Set up the Android to send ffffffffffffmacaddressx16 packet where macaddress is the computer to be brought out of shutdown.

4) Android to send that packet to home IP (public).

5) Router is set to forward requests from Android to 192.168.1.123 (Not sure about the port per se.)

6) The packet is broadcast (ff-ff-ff-ff-ff-ff-ff)and the target computer receives and recognizes its mac x16 inside the packet and, hopefully, wakes up.

No way to directly test or drill into details. Just trying to get the process into place. Thanks.