Page 1 of 1

Wake on LAN

Posted: 12 Jan 2008, 13:33
by Cheeseboy
Edit: I had to rewrite this since the last one was a mess.

The goal is to power up any PC on my home network from work.
The PC that is to be powered up remotely has to have Wake On LAN capability, and WOL has to be enabled in BIOS.
All my PCs claim to have this ability, but it doesn’t actually work on all of them. This is yet another reason I will never again buy a motherboard from Asus.

Since I can access my Bubba from work using ssh, all I needed was some software on Bubba that was able to send the magic WOL network packet to the target PC. Etherwake is available in the Debian repositories, and will do just fine.

To install it, become root, and then uncomment the first three lines in /etc/apt/sources.list

Code: Select all

apt-get update
apt-get install etherwake
Go back and reinsert the comments in /etc/apt/sources.list, and then do another apt-get update.

To use ehterwake, you need to know the MAC address of the main Ethernet network card of the PC you want to turn on. To find out on Windows, open a command prompt and type:

Code: Select all

ipconfig /all
It is the value called ”Physical address” you are after. It will look something like this:
Etherwake will not accept this format. You will have to replace the hyphens with commas:

To find the MAC address on a Linux machine, execute this as root:

Code: Select all

ifconfig -a
I usually just access the Web interface of my router to find out the MAC address of the computer I want to switch on.

To turn on the PC, execute this on your Bubba as root:

Code: Select all

etherwake 00;1C;C0;14;2B;48
You can then ping the machine you just told to wake up, and when ping gets a response, you know it’s up.

Posted: 31 Mar 2008, 12:04
by kitabu
This is a great tip. Have you tried it with Bubba itself? It would be cool to save even more energy javascript:emoticon('8)')

Posted: 31 Mar 2008, 12:34
by Cheeseboy
Yes, the Bubba does not wake up on the WOL packet...


Re: Wake on LAN

Posted: 05 Jul 2009, 04:55
by mike_nl

right. I have done my own tests with some bubba modifications,
but it isn't working at all, yet ;-).

Re: Wake on LAN

Posted: 05 Jul 2009, 11:21
by Cheeseboy
Hi mike_nl,

Wow, that was some time ago I wrote that, and it was for the very first version of the BUBBA, with an ARM CPU and with only 64MB memory.

It is still up and running and I used that command just the other day, and it works as long as the motherboard of the target computer supports WOL, and it is enabled in it's BIOS.
I have come across a motherboard that claimed to support WOL, but didn't in reality.
It looks like my original post has been truncated (probably when they updated these fora).
I'm sure that I mentioned in my original post that the windows format of the MAC address (00-1C-C0-14-2B-48) will not work, you have to replace the hyphens with colons:

Code: Select all

etherwake 00:1c:c0:14:2b:48
It also has to be executed as root.



Re: Wake on LAN

Posted: 29 Dec 2009, 16:39
by johannes
Your original post restored (so I hope, please double check). And yes, some kind of corruption when upgrading the forum. (Thanks Carl).

Re: Wake on LAN

Posted: 30 Dec 2009, 14:16
by Cheeseboy
OK, here is another update for bubba2 (I only just put it to use, even though I bought it when it was launched).

As etherwake will default to eth0 (the port marked WAN on the chassis), it will not work sending the wakeup frame from that NIC. Use -i to specify the NIC for your internal network (eth1):

Code: Select all

/usr/sbin/etherwake -i eth1 00:1c:c0:14:2b:48
@Johannes: Initial post looks OK, albeit with my own mistakes and some funny characters...

Re: Wake on LAN

Posted: 22 Feb 2010, 03:41
by Kiff
I used wakeonlan instead of etherwake. I don't know if there's any big difference, but wakeonlan did not require me to log in as root.

Re: Wake on LAN

Posted: 17 Jun 2013, 03:25
by mike_nl
Hi Cheeseboy,

long time no read ;-). But what i mean in the beginning was that i can wakeup the bubba 2
from out every PC where i have installed the wakeup routine.

That was because to spare energy and have more control if the bubba is switched off.
I have an eTrayz and that little one can do it. So that was my first idea.

Re: Wake on LAN

Posted: 17 Jun 2013, 11:31
by theWebalyst
[quote="mike_nl"... But what i mean in the beginning was that i can wakeup the bubba 2
from out every PC where i have installed the wakeup routine.[/quote]

So we have the ability for bubba to wake up other machines and vice versa?

Would be great to know details for reference (here and/or in the Wiki). Would either of you be able to write a quick summary of:
1) How to use Wakeup-On-LAN from bubba to wake-up PC
1) How to use Wakeup-On-LAN from PC to wake-up bubba

I'll soon be living off-grid so this will be useful to me!


Re: Wake on LAN

Posted: 17 Jun 2013, 12:09
by Cheeseboy
theWebalyst wrote: 1) How to use Wakeup-On-LAN from bubba to wake-up PC
2) How to use Wakeup-On-LAN from PC to wake-up bubba
(I modified the numbers in your quote to make the answer clearer)

1. Wake up a PC from your B1/B2/B3

1.1 Make sure the PC motherboard supports WakeOnLan, and that it is enabled in BIOS (it usually isn't by default).
I found I have had to disable USB wakeup functionality in BIOS on some mobos to get the WOL to work.

1.2 Find out the MAC address of the main Ethernet card on the PC you want to wake up (it will have to be ethernet, WiFi does not seem to work yet, even though some manufacturers claim to support WOL over WiFi)
Linux (Look for the "HWAddr"):

Code: Select all

$ ifconfig eth0
Windows (Look for the "Physical address" of the main Ethernet card):

Code: Select all

>ipconfig /all
The address consists of 6 bytes, written in hex, with a delimiter between each byte. The delimiter on Linux is colon ":", but on Windows it is a hyphen "-". Examples:
Linux: d4:be:d9:a3:be:b8
Windows: 08-00-27-7B-F2-5A

1.3 Install software on your B2/B3 that can send the magic WOL packet. I use etherwake. It requires root permissions to send the magic packet, and also the MAC address in Linux-format (with colon delimiters). It will by default sent the magic packet through eth0, but the PC you want to wake up is probably connected through eth1, so you have to specify that too.

Code: Select all

$ sudo apt-get install etherwake

Code: Select all

$ sudo /usr/sbin/etherwake -i eth1 d4:be:d9:a3:be:b8
(Note that if it had been a windows machine you were waking up, you would have swapped out the hyphens to colons in the MAC address)
I have simple scripts for different machines as the MAC addresses are impossible to remember.
A previous poster in this thread mentioned another software package available called simply "wakeonlan", which is based on perl. I have never used it.

2. Wake up a B2/B3 from another computer

2.1 This will not work with WOL. The B2/B3 ignores the WOL packet. You will have to buy a proper remote-controllable PDU if you can afford it.
I used a cheap solution when I only needed to turn on my B2 occasionally (and remotely):
A Telldus Tellstick, and a simple Nexa radio-controlled relay. As the B2 will boot when the power comes on, it worked pretty well.

Have fun!