1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Wake-On-LAN addon to tofu11

Discussion in 'HyperWRT Firmware' started by iamqwerty, Dec 7, 2005.

  1. iamqwerty

    iamqwerty Network Guru Member

    Hi everybody,

    I've build an addon to the HyperWRT-tofu11 which enables WOL from webgui.

    You can download firmware here: Tofu11+qwerty

    With wol you can power on your computer from the internet, which may be useful when using the Remote Desktop Connection program in windows (or when using similar programs). You can either type wol from a shell or use the wol.asp page included.

    As long this is not included in tofu's firmware, I will make this tweak available. Please let me know if it is working on your WRT54G.

    I'm using v2.2

    - qwerty
     
  2. cgondo

    cgondo Network Guru Member

    just a quick question. WOL does not work on WLAN PCI card do they?
     
  3. iamqwerty

    iamqwerty Network Guru Member

    No - wol will only work with a network cable.

    To see if wol is supported on your computers, you can download a program which transmit the magic packet:

    Dos utility

    Linux utility

    My laptop will only accept a wol-call if it is connected to the powersupply and a network cable is attached to the router.
     
  4. rljo

    rljo Network Guru Member

    Would it be difficult to build this add-on for Thibor's firmware, so it could be used on the GS?

    Gosh, I would sure appreciate it (or some guidance on how to do it myself.)

    Thanks,
    Bob
     
  5. Thibor

    Thibor Super Moderator Staff Member Member

    if iamqwerty sends me his source, i will add it to the next release i do(within the next few days or so)
     
  6. rljo

    rljo Network Guru Member

    Thibor,

    This would be much appreciated.

    Iamqwerty:

    Would you be willing to do this?

    Thanks in advance,
    Bob
     
  7. Thibor

    Thibor Super Moderator Staff Member Member

    i've got the sources from iamqwerty, they will be added anon
     
  8. iamqwerty

    iamqwerty Network Guru Member

    Geocities Download Quota

    I have created a mirror due to geocities download quota:

    Mirror

    I hope someone find it useful
     
  9. VladTepes77

    VladTepes77 Network Guru Member

    I've just upgraded to this firmware for testing WOL...
    Unfortunately it does not work for me, neither from the GUI nor from telnet or "run command".
    With the DOS Utility mentioned before it works great.

    Any ideas what to do?

    Thnx in advance!
     
  10. iamqwerty

    iamqwerty Network Guru Member

    The wake-on-lan code can be found here:
    http://www.scyld.com/wakeonlan.html

    Have you tried some of the options, perhaps they will help?

    Otherwise it may be that your ethernet adapter is not supported :(
    Please post your router version, ethernet adapter and networksetup.
    If you have more than one computer, you could try the wol command on each of them. It works on my three computers.

    The DOS-utility is proparitary software and not under GPL license. Therefore it cannot be added instead of the current code.

    - qwerty
     
  11. VladTepes77

    VladTepes77 Network Guru Member

    first of all my configuration:
    WRT54G v3.1
    ASUS Broadcom 440x (integrated LAN on ASUS P4PE mainboard)
    Bios settings should be ok, as long as it works with other programs.
    Card settings in Windows: WOL on Magic Frame. (also tried on Wake Up Frame), with no luck.

    I even tried the program in Linux, ether-wake, with no luck...
    Doing some search related to this topic I found an alternative program for Linux-OS called "wakeonlan" (version 0.41)
    Here the link to this program: wakeonlan 0.41
    By simply callind the command "wakeonlan MAC-adr" it works for me.

    I've tried all combinations for ether-wake / wol without any success.
    Now my questions:
    How difficult is it to replace wol with wakeonlan?
    Might I test it on the router right now, without compiling the whole source?
    Should / Am I be able to integrate it into the firmware by myself? I'm willing to test it if someone may explain it to me how to do so...

    Thnx...
     
  12. iamqwerty

    iamqwerty Network Guru Member

    Solution

    Thanks for the link - it really helps identifying the problem.

    From wakeonlan 0.41

    6. Known problems/limitations
    This script only sends 'magic packets' in UDP packets.

    7. Wish list/future work
    Build an ethernet frame to send magic packets (as in Donald Becker's ether-wake program).

    And from Donald Beckers ether-wake source:

    An alternative to needing 'root' is using a UDP broadcast socket, however doing so only works with adapters configured for unicast+broadcast Rx filter. That configuration consumes more power.

    I will try to make it possible also to broadcast UDP packets.

    You are welcome to make your own build. Just follow the instructions from tofu's page and my page. My page

    One final thing before I proceed - have you tried this command:
    wol -b xx:xx:xx:xx:xx:xx ??
     
  13. VladTepes77

    VladTepes77 Network Guru Member

    Yes, I have tried this option as well...
    here an output outline (just the last line) of it, maybe it helps you on finding the problem:
    Code:
    Sendto worked ! 116.
    In the meantime I also found this C program: wakelan 1.1
    The other one was written in Perl, which worked great on my machine, but I don't for now if it would run on busybox...

    I'll have a look on the other C program the next days...

    For now I want to thank you for your support.
    Let me know when UDP packets work, I'll test it...

    Have a nice day.
     
  14. iamqwerty

    iamqwerty Network Guru Member

    I have added UDP - but I'm not able to test it.

    You can find a demo firmware here: http://storage.nal-net.dk/~11163/code.bin
    MD5 Hash: 04476fa3ef9ab2712342463d2323b758

    Sourcecode to modified wol here: wol.c

    You're right that the busybox won't accept a Perl-script. That's because a mipsel gcc compiler is used to compile the firmware.
     
  15. VladTepes77

    VladTepes77 Network Guru Member

    I've just tried the new wol.c, compiled in linux and tested it in linux, it says "Now sending UDP packet", but no luck...

    I'll try the new firmware, and see how it behaves...

    Which switch do I need for gcc to compile it as mipsel, or do I need a special version of the gcc compiler to do that?
     
  16. iamqwerty

    iamqwerty Network Guru Member

    The sourcecode and binary has been edited according to wakelan 1.1. You do need a special compiler in order to compile to a mipsel processor.

    I sure hope it will work now. Please try it out.

    BTW: MD5 Hash = ea12aacb2aa74639432913d48f277354
     
  17. VladTepes77

    VladTepes77 Network Guru Member

    I've tried it out, but no success...neither with the new firmware nor with the compiled new source (wol.c)...

    It's strange, but don't spend to much time with this problem if you are too busy at the moment.
    Check your PM,

    Thnx!
     
  18. NRGXBOX

    NRGXBOX Network Guru Member

    If your not too busy do you know if WOL works with broadcom adapters?
     
  19. VladTepes77

    VladTepes77 Network Guru Member

    @NRGXBOX
    I have an ASUS P4PE with an integrated Broadcom 440X...
    Iamqwerty compiled some firmwares for me, but until now without luck, I think next month he will have some time and we'll see then what he can do....
     
  20. NRGXBOX

    NRGXBOX Network Guru Member

    So there is a issue with Broadcom adapters? Man I would love this feature to work. What adapters does it work with?
     
  21. eNuffSaid

    eNuffSaid Network Guru Member

    This sounds really cool. I could use such functionality. I have a PC with a Broadcom NIC (which I read doesn't work), but I've got a few compaq's I'd like to try this with, too.

    Thanks!
     
  22. NRGXBOX

    NRGXBOX Network Guru Member

    Ya I bet most people have broadcom nics . Crossing my fingers.
     
  23. adrian_gti

    adrian_gti Network Guru Member

    I would have a massive need for this.... linksys network cards al round.. is this broadcom?

    fingers crossed :)
     
  24. NRGXBOX

    NRGXBOX Network Guru Member

    We can only hope if qwerty has a fix or put this in the next release.
    Crossing fingers as well.......I think we may have some more closest broadcom netXtreme people. lol

    Speak and be heard my fellow NetXtreme people, come out of your closests. :grin:
     
  25. eNuffSaid

    eNuffSaid Network Guru Member

    I've tried the dos utility (wol.exe) on my broadcom and that doesn't work either on my broadcom. Did miracles on my Deskpro EN. I've got three of those so this is already really great for me.

    Thanks querty for this excellent and very useful add-on.

    'nuff

    EDIT:

    I don't think wol is going to work for broadcom:

    http://forums.practicallynetworked.com/showthread.php?t=257

    There's a link to a nice AMD wol tool in that thread too.
     
  26. iamqwerty

    iamqwerty Network Guru Member

    Hi folks

    Hi folks

    I don't think there is an issue with broadcom NIC's. Both the motherboard and the NIC has to support WOL.

    I've got to computers with a Realtek NIC integrated on the motherboard and one with a broadcom. The broadcom NIC is on a laptop, but there is no "Good Connection" green light lit when the machine is off (and it will not wol-boot). The green light is present when I have powered off the machines with Realtek chips (and they will wol-boot).

    Now to some more interesting stuff.

    You can help me testing by telnet into your router and download these two tests:

    wget http://storage.nal-net.dk/~11163/test1
    wget http://storage.nal-net.dk/~11163/test2
    chmod +x test1; chmod +x test2

    find the mac of the device you want to test <mac>

    (nb: mac in test1 should be on this form: xx:xx:xx:xx:xx:xx)
    test a: $ ./test1 <mac>
    test b: $ ./test1 <mac> -U 192.168.x.255 (x is your routers lan ip: ie. 192.168.1.1)
    test c: $ ./test1 <mac> -U 192.168.0.254
    test d: $ ./test1 <mac> -U 192.168.0.255

    (nb: macs in test2 should be on this form: xxxxxxxxxxxx)
    test e: $ ./test2 <mac>
    test f: $ ./test2 <mac> -p 9 -b 255.255.255.255
    test g: $ ./test2 <mac> -p 9 -b 192.168.x.255
    test h: $ ./test2 <mac> -p 9 -b 192.168.0.254

    example report:
    NIC: Realtek RTL8139/810x Family Fast
    PC type: ACPI
    Dos Utility works: Yes
    Tests worked: a,b,c,d,e,f,g.
    Tests failed: h

    Other: NIC Advanced properties was set to WakeUp on ARP/PING and WakeUp using APM

    - qwerty
     
  27. Daft

    Daft Network Guru Member

    I have a Broadcom NetXtreme NiC integrated into my old Asus P4G8X motherboard (3 yrs old). I have firmware version v4.30.1, HyperWRT 2.1b1 +tofu11+qwerty installed from the link on the first post of this thread. WOL works beautifully :). Tested from New York City and Quebec City to my home in Ontario, Canada. Everytime succesS!

    EDIT: I have a WRT54G v1.0
     
  28. NRGXBOX

    NRGXBOX Network Guru Member

    I would love to test this for you but unsure what needs to be editied and how its ran once your in the telnet sessions.

    Just to let you know as well when I am directly connected to the modem and try wake on lan it works fine. The problem is when its connected to the linksys.

    Current firmware is : v4.70.6 - HyperWRT 2.1b1 + Thibor11
    Router is WRT54GS
     
  29. eNuffSaid

    eNuffSaid Network Guru Member

    http://www.geocities.com/fredag_d13

    :(
     
  30. iamqwerty

    iamqwerty Network Guru Member

    Geocities should not be a problem anymore.

    How to test:

    - Install tofu or thibor on your router (or tofu11+qwerty)
    - Enable the telnet daemon from Management.asp
    - From LAN, telnet into your router. (telnet won't accept WAN calls)
    - Proceed with wget as described earlier.

    BTW: The tests won't output anything. Hopefully some of them will turn on your computer. Of course you will need two computers connected to the LAN to do these tests.

    If you are unlucky and only own 1 computer you can still report NIC's that are working with tofu11+qwerty (like Daft did).
     
  31. Thibor

    Thibor Super Moderator Staff Member Member

    quick addition, My next release will include the "ip neigh" command so that machines can be woken from an internet based host. qwerty, perhaps you could incorporate that into your page?
     
  32. iamqwerty

    iamqwerty Network Guru Member

    I'm not sure what to include on the webpage. Shouldn't it just be a startup script like stated here:
    http://www.dslreports.com/forum/remark,13287946

    Then one could use a wol utility to turn on pc's from the internet. My add-on enables you to use a wol-utility in the router to wake up a pc from the internet or lan via webgui (and you don't have to remember a macaddress).

    Perhaps a checkbox - "enable WOL-calls from internet".

    Then people, for whom my add-on didn't work, could try out other programs.
     
  33. Thibor

    Thibor Super Moderator Staff Member Member

    sounds good
     
  34. NRGXBOX

    NRGXBOX Network Guru Member

    Thanks for chimming in on this. Ya I can log into the router fine and download the files but for whatever reason i'm not getting the syntax correct. When i try it says cannot open.

    Hey qwerty, I have the linksys router with speedbooster.
     
  35. iamqwerty

    iamqwerty Network Guru Member

    oops

    You need to run this command first:
    chmod +x test1; chmod +x test2

    Sorry about that
     
  36. NRGXBOX

    NRGXBOX Network Guru Member

    Still no go for me :sad: When I run that command it says no such file.
     
  37. iamqwerty

    iamqwerty Network Guru Member

    try ls to display files in current directory

    type ./test1

    it should work
     
  38. eNuffSaid

    eNuffSaid Network Guru Member

    Hello qwerty,

    Just finished installing your firmware on my WRT54Gv2 and everything is peachy. I can now WOL my Compaq EN's and best of all, your firmware works for my Broadcom NetXtreme as well! :thumbup: The dos utility from your 2nd post (wol.exe) didn't wake up my Broadcom.

    So you can imagine I'm one happy camper. Thanks so much for this great addon.

    1 question.

    It seems the list of machines on the wol page page for the router is populated by entries found in the static dhcp list. Is there another way to populate this list without assigning pc's to the static DHCP? (so I don't have to write down the mac addys of my pc's).

    Now I'm just praying this isn't a dumb question.

    Thanks very much!
     
  39. iamqwerty

    iamqwerty Network Guru Member

    You're right that the MAC's are generated from static dhcp's. At the moment there's no way you can add a MAC to the list without building your very own custom firmware. (hardcode your MAC's into wol.asp)

    First of all the wol code should be tested on many NIC's.
    After that - maybe I will work on:
    - Merge Static DHCP page with Wol page in some smart way.
    - Enable wol calls from internet (without accessing the gui).
    - MAC as non static dhcp feature

    What NIC's do your Compaq machines have?

    - qwerty - one happy coder
     
  40. Thibor

    Thibor Super Moderator Staff Member Member

    perhaps you could call the information from DeviceList? that would include all connected devices irrespective of whether or not they have static dhcp address
     
  41. VladTepes77

    VladTepes77 Network Guru Member

    so, here is my report:

    NIC: ASUStek/Broadcom 440x 10/100 Integrated Controller
    PC Type: ACPI
    Dos Utility works: Yes
    Tests worked: g
    Tests failed: a,b,c,d,e,f,h

    Ohter: Tested with 2 different settings for "Wake Up Capabilities" on the NIC, namely: Magic Frame (WORKED) and Wake Up Frame (FAILED).

    I think one thing I misunderstood:
    you wrote: ./test1 <mac> -U 192.168.x.255 (x is your routers lan ip: ie. 192.168.1.1)
    So I interpretated it as follows, if my LAN network is for example: 192.168.1.x /24, then I'll have to write: -U 192.168.1.255 (=broadcast). Is that correct?
    That's was the way I configured test case g and it works.

    Hope this will help you a bit.
     
  42. eNuffSaid

    eNuffSaid Network Guru Member

    Hello qwerty.

    My Compaq's have an "Intel PRO/100 VM Network Connection" (onboard). The Compaq's are Deskpro ENS 733 machines.

    My "game rig" has a Asus P4G8X Deluxe, with a "Broadcom netXtreme Gigabit Ethernet" adapter (onboard).

    The bold text is exactly how they appear in the device manager.
    They work like a charm with your WOL addon. :clap:

    I am very happy with this awesome addon. I would very much like to manually add MAC addy's to the WOL setup page of the firmware without having to Static DHCP my PC's. But for now, that's just what I did, and it serves me fine.

    Sorry I can't test your scripts. It's is all just abracadabra to me. :(

    Thanks again from a happy user.

    'nuff
     
  43. NRGXBOX

    NRGXBOX Network Guru Member

    Still cant get it to work.... my broadcom nic is a 57XX series....Call me a idiot but I can't get the test to work either.

    I can successfully log into the router via telnet but when I try those commands nothihng seems to work for me.
     
  44. Thibor

    Thibor Super Moderator Staff Member Member

    ok then, you're an idiot :)
     
  45. puffer

    puffer Network Guru Member

    Can Someone compile tofu12 + Wol ? My IQ doesn't meet the minimum requirements ;-) . Thanks :help:
     
  46. NRGXBOX

    NRGXBOX Network Guru Member

    :rofl:

    Anyhow there is a solution.

    My buddy Daft made it work like this.....he copied my mac address and pasted it under administration in the run command wol MAC and succESsssSSssSSSSs

    So the button for me under wol doesnt work...can you fix that.


    Praise to DafFfFFfttTTtTTtTTtttttt

    Is there a shutdown command you can use as well?
     
  47. eNuffSaid

    eNuffSaid Network Guru Member

    LOL. Dude, that's exaclty what your SUPPOSED to do. If you want to "populate" those wol buttons above the MAC: field, you need to assign static IPs to your machines in the setup of your router.

    You said we could call you an idiot, right? :grin:
     
  48. NRGXBOX

    NRGXBOX Network Guru Member

    Then why doesnt wol work with the button?
     
  49. Daft

    Daft Network Guru Member

    O true succesSSSSSSSsss i did hack the world tactics and scared u shitless when u came home. u diG? But true need webgui to work. Mine works tho! Perhaps buddies should fix their shitE.
     
  50. NRGXBOX

    NRGXBOX Network Guru Member

    Indeed I really would like the button to work as well. Nice if there was a shutdown feature as well.
     
  51. eNuffSaid

    eNuffSaid Network Guru Member

    NRGXBOX,

    First things first. Have you assigned any PC a static DCHP address?

    Connect to your linksys router. Under "Setup" go to "Static DHCP"
    Enter you're Broadcom MAC address and assign it a static IP. Save your settings and go to WOL. You should see your PC now behind the WOL button. If you click on the WOL button your PC should start booting.

    'nuff
     
  52. NRGXBOX

    NRGXBOX Network Guru Member

    yes
     
  53. eNuffSaid

    eNuffSaid Network Guru Member

    Okay,

    So when you go to the WOL page, does your PC show up behind the WOL button? Does it show your Broadcom's MAC address and IP?
     
  54. NRGXBOX

    NRGXBOX Network Guru Member

    Yes it is there and the MAC and IP are there as well
     
  55. eNuffSaid

    eNuffSaid Network Guru Member

    Then what I suggest you do is RE-DOWNLOAD tofu11+qwerty and flash your Linksys again.

    EDIT: I see you have a WRT54GS, I have the WRT54G. So you might have to get thibor's version instead of tofu's. Not sure really.
     
  56. NRGXBOX

    NRGXBOX Network Guru Member

    you got a firmware version for thibor?
     
  57. NRGXBOX

    NRGXBOX Network Guru Member

    any update on why the wol button doesnt work?
     
  58. iamqwerty

    iamqwerty Network Guru Member

    Not yet - hopefully my new Tofu+wol edition will work and Thibor will integrate that into his firmware. I don't know why the wol button doesn't work, but maybe Thibor has forgotten to correct a file named broadcom.c (but I don't know)
     
  59. Thibor

    Thibor Super Moderator Staff Member Member

    i didn't forget, perhaps your new version will help him
     
  60. iamqwerty

    iamqwerty Network Guru Member

  61. NRGXBOX

    NRGXBOX Network Guru Member

    Ah i cant use that code because its not for speedbooooster version.
     
  62. iamqwerty

    iamqwerty Network Guru Member

    If you have a GSv4 you can use Tofu for that device. Just load DD-WRT mini first and upgrade to Tofu12wol.

    I've tested a new build from Thibor (on my WRT54Gv2.2), and wol works. But you will have to wait a while until he releases it.
     
  63. NRGXBOX

    NRGXBOX Network Guru Member

  64. Thibor

    Thibor Super Moderator Staff Member Member

    2 days ago, dummy :)
     
  65. NRGXBOX

    NRGXBOX Network Guru Member

    Wol button works now........ :rockon:


    Id10t signing off for now.

    ThankS :thumb:
     
  66. Thibor

    Thibor Super Moderator Staff Member Member

    glad it's finally working for you :)
     
  67. NRGXBOX

    NRGXBOX Network Guru Member

    Is there a remote shutdown command through linksys you can do?
     
  68. iamqwerty

    iamqwerty Network Guru Member

    No remote shutdown command exists, but you can type this command in windows:
    shutdown -s -t 5

    I'm sure that an equallivant command exists in linux, do a google search
     
  69. galileo2000

    galileo2000 Network Guru Member

    First of all, many thanks to thibor and qwerty for resolving this once and for all. I've tried everything and it seems the only game in town.

    I am new here, but I was reading for a long time.

    Now, here is my request / problem: everything works fine from the "regular" IE, but I cannot make it work from Pocket PC 2003 and it is absolutely necessary that I will be able to wake up my main HTPC from my Pocket PC. Is this because of Javascript support or something lse?

    Once again, thanks a million for developing and please help me.
     
  70. galileo2000

    galileo2000 Network Guru Member

    Never mind...Works just fine with Pocket PC NetFront 3.3.

    Once again, Thanks a lot to qwerty ant thibor!!

    All my problems resolved :D

    Another satisfied customer :D

    Where should I pay?
     
  71. Thibor

    Thibor Super Moderator Staff Member Member

  72. galileo2000

    galileo2000 Network Guru Member

    Done.

    Currency exchange rates suck big way at the moment though :)
     

Share This Page