Send Magic Packet to Wake a Computer from a NAS326

Sorry for my english...

I have installed ffp and i can not find an option to send a magic packet to wake a computer in the home network. I want to SSH to the NAS and send the magic packet from it, because my router loses the arp table when i shotdown the computer.

Is there a way to do this?

Accepted Solution

All Replies

  • Mijzelf
    Mijzelf Posts: 2,598  Guru Member
    First Anniversary 10 Comments Friend Collector First Answer
    As far as I know ffp has no WOL package. But most slacker sites are dead links now.
    Sending a WOL packet is no rocket science. It's any ethernet packet which contains in it's payload 6 bytes FF FF FF FF FF FF, followed by 16 times the 48 bit (6 bytes) MAC address of the device-to-be-waked. In practise an UDP broadcast packet is used, send to port 0, 7 or 9, but that doesn't actually matter.
    There are several implementations around, a shell script, a perl script and a python script. I didn't test any of them in ffp.
    When you have the ffp build tools installed, you can also build a binary. Download ether-wake.c and compile it:
    gcc -o ether-wake ether-wake.c

  • mangu
    mangu Posts: 5
    First Comment
    Thank you for your answer Mijzelf. I´m trying to follow some tutorials to install ffp build tools to compile etherwake, but i keep getting errors. I dont know if these tutorials are outdated but i cant install build tools.


    In those, it says "install ALL packages available as described in the linked tutorial" but i cannot find what are those packages. Sorry, im a little bit familiar with Linux but the normal commands there, cant be used here =)

    I have try also the scripts but i cant do them to work.

    Thank you in advance.



  • Mijzelf
    Mijzelf Posts: 2,598  Guru Member
    First Anniversary 10 Comments Friend Collector First Answer
    I think that for just executing 'gcc -o ether-wake ether-wake.c' you only need to install gcc, binutils and mpfr.
  • mangu
    mangu Posts: 5
    First Comment
    Hi Mijzelf. I have installed those packets and i can compile it now, but i get this error in the process.


    root@NAS326:/i-data/-------/admin/WOL# gcc -o ether-wake ether-wake.c
    In file included from /ffp/include/errno.h:36:0,
                     from ether-wake.c:61:
    /ffp/include/bits/errno.h:25:26: fatal error: linux/errno.h: No such file or directory
    compilation terminated.


  • Mijzelf
    Mijzelf Posts: 2,598  Guru Member
    First Anniversary 10 Comments Friend Collector First Answer
    edited December 2022
    When you look in Fonz' repository https://ffp.inreto.de/ffp/0.7/arm/packages/
    you see a file MANIFEST.gz, which contains a full file listing of all packages. If you search for 'linux/errno.h' you can see that it's provided by package 'linux-headers'. So install that package.

  • mangu
    mangu Posts: 5
    First Comment
    Seems that this dont want me to wake up my computer hahah

    root@NAS326:/i-data/------/admin/WOL# gcc -o ether-wake ether-wake.c
    ether-wake.c:87:23: fatal error: interface.h: No such file or directory
    compilation terminated.

    I have searched in the file that you mention, MANIFEST.gz, and i cant find "interface.h" . The only one i find is "zend_interfaces.h". This seems to be impossible mission...


  • Mijzelf
    Mijzelf Posts: 2,598  Guru Member
    First Anniversary 10 Comments Friend Collector First Answer
    Answer ✓
    This seems to be impossible mission...

    Nah, that's not so bad. I jst pointed to an ether_wake.c with some garbage. Try this one instead:

    https://gist.github.com/erichschroeter/9884006



  • mangu
    mangu Posts: 5
    First Comment
    OMG!! It worked!! You are a genious Mijzelf!!

    Now my NAS is perfect =) Thank you very very very much!!

    Merry Christmas and happy new year!!

Consumer Product Help Center