I want to WakeOnLAN my NAS server remotely, but my router blocks WOL packets. I thought I could circumvent this by ssh'ing into our androidTV box, and sending a WOL packet from there on the LAN. I can ssh into the androidTV, but can't send the WOL packet. Is it possible to run a graphical ssh session to the androidTV and then use one of the WOL apps in the Play Store? Or is there any way I can use a WakeOnLan application from terminal?
-
Have you found a solution? If so, please answer your question! I want to do the same thing! Thx – nelsonec87 Apr 07 '16 at 02:00
-
@nelsonec87 I ended up using a Raspberry Pi running XMBC instead of the Android box. That works quite well. – Matthijs Vk Apr 09 '16 at 09:53
-
I tried to set up an SSH server on my TV Box and tried "busybox ether-wake MAC" but not wake up the device. :( – Gaboros May 03 '17 at 16:55
1 Answers
I have figured out the solution as I was trying to achieve the same thing.
Problem: I need to remotely power on my server at home using Wake on Lan (WoL) command. For WoL to work reliably, a PC within the LAN needs to be used to send the WoL command, and NOT a remote PC. I don't completely understand the reason why, but it has something to do with the router clearing the ARP table cache after a device is powered off. In our case, the server that is switched off but we want to remotely turn it on. For more details read here: https://serverfault.com/questions/161560/how-to-get-wake-on-lan-working/349783#349783
Solution You can have a device within the LAN which can send the WoL command to the powered off server. One way to do this is by having a rooted Android device which is running a SSH server. You can remotely login to the Android device using SSH and then send the WoL command.
Steps I used
- Root an Android device and ensure you have BusyBox installed
- Install a SSH server on the Android. https://android.stackexchange.com/questions/9905/is-there-some-ssh-server-for-android. I used SSHDroid.
- Remotely login to your Android device using SSH. Ex:
ssh -p 2222 root@xxx.xxx.x.xxx
- Send the WoL command using
ether-wake -b -i wlan0 XX:XX:XX:XX:XX:XX
. Reference: https://forum.xda-developers.com/showthread.php?t=2495288 - Steps 3 and 4 can be combined in one go using this example:
ssh -p 2222 root@xxx.xxx.x.xxx "su -c ether-wake -b -i wlan0 XX:XX:XX:XX:XX:XX"
Note:
- The above steps may differ based on the type of device. The update steps are for an Android device, but the same principle can be used on non-Android devices.
- On Android you can NOT use the
wakeonlan
command. You have to useether-wake
command. This is because BusyBox doesn't installwakeonlan
. - You must have sudo or root privileges to issue the
ether-wake
command

- 1,142
- 4
- 20
- 33