Wake on lan from luci


i am unable to wake up a host in my network using luci web interface. the command run by luci is as follows:
etherwake -D -i br-lan 00:00:00:00:00:00

however, i need an extra -b (broadcast) flag for this command to work (tested in command line). could this be added as an option to luci?

thank you,


I think you need to replace the 00:00:00:00:00:00 with the computer’s MAC address to get rid of broadcast flag.

Other option is to define a custom command for this (see System - Custom Commands).


tested in luci worked like charm.

Starting WoL utility:

/usr/bin/etherwake -D -i “br-lan” “74:D4:35:BB:66:EF”

The target station address is 74:d4:35:bb:66:ef.
Packet is 74 d4 35 bb 66 ef 74 d4 35 bb 66 ef 08 42 ff ff ff ff ff ff 74 d4 35 bb 66 ef 74 d4 35 bb…
Sendto worked ! 116.


i guess i did not describe it well. luci is running the following command:

/usr/bin/etherwake -D -i "br-lan" "00:00:00:00:00:00" (00's are just placeholder - I do have a real mac address there)

what i need it to run is this:

/usr/bin/etherwake -b -D -i "br-lan" "00:00:00:00:00:00"

the latter command works fine, but is unreachable from luci interface.

As I said earlier: “Other option is to define a custom command for this (see System - Custom Commands).”

yes, i went with this option in the end - thank you for the tip. still, for novice users, it would be nice to have an extra option at wol menu.

Hi Jose,

i have solution for you not very nice but working.

You need to edit /usr/lib/lua/luci/model/cbi/wol.lua

on line 63 you will see:

  		util, (iface ~= "" and " -i %q" % iface or ""), host  

just change it to

  		util, (iface ~= "" and " -b -i %q" % iface or ""), host

Them it should work as you want to if not let me know.

thank you, works nicely!

just keep in mind if package luci-app-wol gets some update it might stop work.

sure, btw here’s a PR in upstream: https://github.com/openwrt/luci/pull/975