Khadas VIM2, Edge and VIM3/VIM3L SBC’s all come with Wake-on-LAN (WoL) support which allows you to power on the board with a specific Ethernet packet. This is not especially useful if your board sits on a desk since you have easy access to the power button, but if you’ve placed the SBC in a cabinet, inside an enclosure without access to the power button, or in another hard-to-reach location this can be a lifesaver.
I had never tried the feature until today, so I decided to give it up a go adapting the instructions provided on Khadas Wiki. I’ll use Khadas VIM3L running Android 9.0 and sent WoL packets from my Android phone as well as an Ubuntu 18.04 laptop.
WoL is disabled by default, but it’s really easy to enable in Android 9. Go to Settings->More Settings->Device Preferences->WOL.
Make sure Wake on LAN is enabled, and note the Ethernet MAC address.
Several Android apps support Wake-on-LAN including the one from the same name available for download on Google Play.
After launching the app, click on + icon to add a new device, and scroll down to scan IP addresses from your local network.
Select the one that corresponds to the MAC address in Khadas VIM3L settings, and edit it with a user-friendly name such as “Khadas VIM3L”. When the board is running, there will be a small green, and after turning off the board the dot will become red. So how to start the board again? Simply tap on the device and it will automatically start. It’s that simple as the video below demonstrates.
We can send a magic WoL packet from the command line with wakeonlan utility follow with the MAC address as parameters:
$ sudo apt install wakeonlan
$ wakeonlan c8:63:14:70:43:c1
Sending magic packet to 255.255.255.255:9 with c8:63:14:70:43:c1
We can also do the same from a GUI with gWakeOnLan:
sudo apt install gwakeonlan
It’s a bit easier to use since the program will auto-detect IP address on the LAN so you don’t need to remember or input the MAC address.
Once you’ve added the machine, you can select it, and click on Turn On button, and you’re good.
I have not tested this one, but based on the info from the WiFi, you can install Wake-On-LAN Sender tool, and add your machine is a similar way to what is done in Ubuntu.