How I got my Linksys WRT54G to Broadcast WOL Packets to my LAN
In my particular set up I have a cable modem, piping internet to a VOIP router piping internet to a wireless Linksys WRT54G router piping internet to my machine.
I wanted to be able to turn on my computer at home without having to call my dear wife and ask her to march downstairs and fire it up. Here are the steps that I performed to make it work:
- Prep the NIC Card: Start>Control Panel>Network Connections>Local Area Connection>Properties>Configure> Then looked around for Wake Up, Wake On LAN, settings under the advanced tab and made sure that everything was enabled for magic packets.
Then I went into the power management tab and unchecked the "Allow the computer to turn off this device to save power" checkbox. - Prep the Motherboard: While my computer is booting I see the Dell logo and some text about how to get into settings or BIOS (typically F2 or F10 or F something). Once I was inside the BIOS I looked around for settings in regard to Wake on LAN sometimes abbreviated WOL. I made sure that WOL was enabled.

- Prep the Routers: This is where it gets interesting. Linksys doesn't natively support forwarding ports to the broadcast IP of 255 (you get some JavaScript error "IP value is out of range [0 - 254]"), so to get around it you can try one of two methods (they both worked for me):
1) I used firefox and DOM Inspector to change the value of the IP for port forwarding thereby circumventing the Javasacript validation. You have to have DOMI installed in Firefox, then inspect the page with the port forwarding for applications and gaming, then right-click the value in DOMI, choose edit, and set it to 255. After that is complete just save the settings.
2) I also tried saving the html page and modifying the form manually. This also worked like a charm. You need to remember to change the action property of the form to prepend the url of the router. If your router was 192.168.1.1 then your form tag might be <form name="portRange" action="http://192.168.1.1/PortRange.tri" method="post"> assuming PortRange.tri was what you orginally found in the form. You also need to change the value of the IP you're forwarding to be 255. This is what my HTML looked like when I was done:
<input class="num" onblur="check_valid_value(this,0,254,errmsg.err34,this.defaultValue,lanip,networkip,broadcastip)" maxlength="3" size="3" value="255" name="ip1">
On the VOIP router I just forwarded the port I decided to use as the Linksys WRT54G which forwards to the broadcast on my LAN.
Wait, what UDP port am I forwarding you ask? It doesn't really matter. Typically WOL is on 7 or 9 but as long as you pick a port that isn't being used by another application (in other words pick something really high) then you're probably just fine. - Test the setup: So, to test the Wake on LAN settings I used this WOL monitor and wrote my own application for sending packets. Why would I write my own packet sender? Because I couldn't find one out there that didn't apply the subnet mask to the IP and broadcast the message. With my setup I wanted the packet to go directly to my VOIP router, so I built my own WOL application. It's pretty simple:

If you're having a hard time getting WOL to work for you, then try this forum to get your particular issue sorted out.
Disclaimer: The views expressed in this blog entry are provided "as-is" with no guarantee expressed or implied. If tweaking this stuff bricks your box or your router I'm not responsible. Any sites I've linked to are not to be construed as an endorsement and I cannot be held responsible for anything that goes on within other internet sites and their products or forums.
7 comments:
Hi there,
Thanks for posting this, it was just the solution i was looking for. I was struggling to get my WRT54GS to WoL but now it works perfectly!
Although i must admit that I could not get the most crucial step to work.. step 3.. at first anyway! I did try with the DOMI method, but it couldn't seem to get it to work and I did not quite understand the HTML method.
Instead I loaded the page in firefox, disabled Java, entered 255, restarted Java and clicked 'Save Settings'.
Thanks for your help!
Chaz
Chaz~
Good thinking! I hadn't really thought about changing that setting *while* the page was loaded. Glad to hear that it worked out for you, isn't it ridiculous that they don't have an administrative override for this functionality?
Yes it is frustrating, I did toy with the idea of upgrading the firmware with a custom version - but I thought it was too risky!
One thing I forgot to add is that you need to click 'outside' the text box after entering '255' as this is when the java script would normally kick in.
I wanted to thank you for this little tutorial and ESPECIALLY for the WoL app that you wrote. This info and the app I needed to get Wake on Wan working. I actually ended up using a different work around for the broadcast forwarding:
left the router subnet at the default 255.255.255.0.
created a port forward to 192.168.1.31 on port 9 udp and saved the settings.
returned to the router subnet setup and changed it to 255.255.255.224 and saved the settings.
Now that the forward was set previously, it didn't run the verification for accepted ips to forward(192.168.1.31 is broadcast on the first 255.255.255.224 subnet).
fired up your WoL app and viola!
I've tried almost everything I found here and there but nothing seems to work for me.
WoL works perfectly if I invoke it with a computer on the same LAN, however it doesn't work over the internet.
Both methods for imputing *.*.*.255 as my broadcast address failed. I decided to change my subnet to *.*.*.128 which means my broadcast address should br *.*.*.127. Still no luck.
I have a "Magic Packet Monitor" and it doesn't register a packet sent over the internet. It works perfectly on the LAN itself.
I'm running Firmware Version: 1.01.08 on a Linksys WAG200G.
Any ideas guys?
Thanks in advance!
I've used my own app to wol in the past written in c# with code taken from:
http://www.codeproject.com/KB/IP/cswol.aspx
and it has worked fine until VOIP go into the picture.
Your app works great when I turn off broadcast. Would you be willing to share your code? Or perhaps tell me how you've turn off broadcast in your app.
I tried remming SetClientToBrodcastMode but that didn't work.
Well, I build the packet myself and send it. That way I don't have to bother with any of the higher-level programming getting in the way.
Post a Comment