Schedule wake all devices



  • Hi,

    Which command does pfsense executes, when wake all devices is clicked, in wake on lan service.
    I need to schedule waking of multiple devices.



  • [2.4.4-RELEASE][admin@pfsense]/root: wol --help
    Usage: wol [OPTION] ... MAC-ADDRESS ...
    Wake On LAN client - wakes up magic packet compliant machines.
    
        --help          display this help and exit
    -V, --version       output version information and exit
    -v, --verbose       verbose output
    -w, --wait=NUM      wait NUM millisecs after sending
    -h, --host=HOST     broadcast to this IP address or hostname
    -i, --ipaddr=HOST   same as --host
    -p, --port=NUM      broadcast to this UDP port
    -f, --file=FILE     read addresses from file FILE ("-" reads from stdin)
        --passwd[=PASS] send SecureON password PASS (if no PASS is given, you
                        will be prompted for the password)
    
    Each MAC-ADDRESS is written as x:x:x:x:x:x, where x is a hexadecimal number
    between 0 and ff which represents one byte of the address, which is in
    network byte order (big endian).
    
    PASS is written as x-x-x-x-x-x, where x is a hexadecimal number between 0
    and ff which represents one byte of the password.
    
    Report bugs to <krennwallner@aon.at>
    [2.4.4-RELEASE][admin@pfsense]/root: 
    

    It uses the WOL command, get yourself a Raspberry PI, install the WOL software and get creative with a shell script that does a for loop incrementing the IP address.



  • Hi,

    You want to type the command - or script something up ? ..... but you don't want to look at other scripts ?? ;)
    Things do not work like that.
    Document first - the writing is done afterwards.

    The command for FreeBSD to Wakeup On Line will take several nanoseconds if you feed your question in Google, so I presume you want to script.

    Btw : it's "wol" - see the manual for the parameters.

    I really hope I'm not going to tell you something new here ....

    Hover the mouse over the button :

    f462cf30-fc5f-4b61-bb16-0bce37ba847f-image.png

    and look at the left bottom corner of your browser windows : some very important information is shown over there :

    8f75f6c7-74c4-4eff-a98f-b3d2e09cc0c7-image.png

    You see the parameter "wakeall=true" ?

    You see the filename : services_wol.php ? (worlds most stupid script language )

    Look in that script file - use Ctrl-F and bingo :

    2f054464-87fe-47c2-b1cb-255f4536f289-image.png



  • Can't I do it from pfsense itself, to send magic pakets to all devices at once on scheduled time, with crin job



  • @Gertjan thanks, I'll try this



  • @anilkapoorbind said in Schedule wake all devices:

    Can't I do it from pfsense itself,

    On the command line, you typing the commands, and the list on paper with all the MAC addresses, yes.
    Or a shell script file that parser a file - why not : the config.xml file that contains all the MAC's in the form of a DHCP Static MAC lease, seems very possible to me.

    Or execute from cron the PHP file I mentioned above with the param I mentioned above, it should work.


  • Netgate Administrator

    You want to actually use the list defined in the WoL page in pfSense or just wake devices in general?


Log in to reply