I'm looking for a way to use WakeOnLan, from WAN, to wake up my desktop computer.
I found the package "etherwake" that could do the job if I'm ssh'ing to my openwrt router in order to launch the command.
But, even after reading this topic Wake on Lan with OpenWrt and its solution, I still can't manage to launch it :
root@OpenWrt:~# /usr/bin/etherwake -D -i "br-lan" -b [HIDDEN_MAC]
ether-wake: The Magic Packet host address must be specified as
- a station address, 00:11:22:33:44:55
Even with : /usr/bin/etherwake [HIDDEN_MAC]
I don't understand what doesn't work.
I installed it that way ::opkg install etherwake (current version : 1.09-4)
(OpenWrt 19.07.3 r11063-85e04e9f46 / LuCI openwrt-19.07 branch git-20.196.38150-e7609bd)
try: /usr/bin/etherwake -b -i br-lan 00:11:22:33:44:55
I use etherwake in a script and this works for me... I don't think the command line parameters are positional but maybe they are and the position of the "-b" argument matters.
EDIT: I also don't use quotes around the interface in my script - your post above indicates you used "br-lan" rather than br-lan.
root@OpenWrt:~# /usr/bin/etherwake -b -i br-lan [HIDDEN_MAC]
ether-wake: The Magic Packet host address must be specified as
- a station address, 00:11:22:33:44:55
root@OpenWrt:~# opkg update
Downloading http://downloads.openwrt.org/releases/19.07.3/targets/ath79/generic/packages/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_core
Downloading http://downloads.openwrt.org/releases/19.07.3/targets/ath79/generic/kmods/4.14.180-1-b84a5a29b1d5ae1dc33ccf9ba292ca1d/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_kmods
Downloading http://downloads.openwrt.org/releases/19.07.3/packages/mips_24kc/base/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_base
Downloading http://downloads.openwrt.org/releases/19.07.3/packages/mips_24kc/luci/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_luci
Downloading http://downloads.openwrt.org/releases/19.07.3/packages/mips_24kc/packages/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_packages
Downloading http://downloads.openwrt.org/releases/19.07.3/packages/mips_24kc/routing/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_routing
Downloading http://downloads.openwrt.org/releases/19.07.3/packages/mips_24kc/telephony/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_telephony
root@OpenWrt:~# opkg upgrade etherwake
root@OpenWrt:~# opkg info etherwake
Package: etherwake
Version: 1.09-4
Depends: libc
Status: install user installed
Section: net
Architecture: mips_24kc
Size: 5754
Filename: etherwake_1.09-4_mips_24kc.ipk
Conffiles:
/etc/config/etherwake 96ceb2e8389056a00013f49118ee2edbfc5b147c8a2b3fa886710df8c31f7ec0
Description: You can wake up WOL compliant Computers which have been powered down to
sleep mode or start WOL compliant Computers with a BIOS feature.
WOL is an abbreviation for Wake-on-LAN. It is a standard that allows you
to turn on a computer from another location over a network connection.
ether-wake also supports WOL passwords.
Installed-Time: 1601657141
I found the solution :
When you told me to check again the MAC address, I was still sure I'm copying the right field with "ipconfig /all"... WAIT !... Windows to Unix (putty) copy/paste again
I pasted the MAC address from /etc/config/dhcp instead with PUTTY and everything was alright.