WOL client not working - blocked?

Hi!

I’ve been using multiple XBMC distro’s in the past, like raspbmc and xbian.
I always install a WOL relayd client from here; Raspberry Pi Tutorials – Home Upgrade Place
In the past this worked everytime, but with OSMC I can’t get it to work.

The WOL message is being received by the Raspberry pi, checked with “tcpdump port 9”.
Output:
17:22:03.614628 IP xxxxxxxxxx.chello.nl.xxxxx > osmc.local.discard: UDP, length 102

It seems the WOL message, which the Raspberry pi should send, isn’t begin sent.
I checked with “etherwake -b xx:xx:xx:xx:xx:xx”, nothing happens.
If I use my iPhone on my LAN with a WOL app, it works perfectly, so the issue is with the Raspberry pi.

Is anything blocking the outgoing WOL message on OSMC?

I don’t think OSMC uses init.d. That’s likely your problem.

Find another way to start your script.

Create a systemd unit. OSMC does use init.d scripts as legacy scripts.

/etc/rc.local will work if it’s a one-shot

S

Let’s take a step back to the core problem; why doesn’t “etherwake” work?

What should happen? I haven’t used this tool before, and didn’t even know it was bundled with OSMC (is it)?

S

Try wakeonlan.

sudo apt-get install wakeonlan

I can confirm wakeonlan works on OSMC.

osmc@osmc:~$ wakeonlan xx:xx:xx:xx:xx:xx  
Sending magic packet to 255.255.255.255:9 with xx:xx:xx:xx:xx:xx

etherwake requires root permissions to run.

osmc@osmc:~$ etherwake -b xx:xx:xx:xx:xx:xx
etherwake: This program must be run as root.

But it did work as sudo etherwake -b xx:xx:xx:xx:xx:xx.

Weird, wakeonlan does work, etherwake doesn’t. I’m logged in as root, so don’t need sudo.
So it’s not a connection/firewall issue. Would it be init.d? I’ll look into systemd, never heard of it :slight_smile:

How are you logged in as root? Is there a secret password someone whispered to you?

Just for laughs, try with sudo. Can’t hurt.

I already did, but like I said I’m logged in as root, so it doesn’t matter.
It’s easy enough to change root’s password and activate it :smile:

Using username “root”.
OSMC: Open Source Media Center

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Tue May 19 22:31:02 2015 from xxx.xxx.xxx.xxx
root@osmc:~#

Have you considered that may be a possible cause of ethwake not working?

You’re using root, I’m using osmc & sudo.
ethwake doesn’t work for you. ethwake works for me.

Not an OSMC issue.

Try tcpdump (send via TCP) and see what etherwake is doing wrong

S

I haven’t and I tried just now using the osmc account combined with sudo and it still doesn’t work, weird stuff.

Anyway, the only reason I’m using etherwake is to test the basic connectivity and ability to succesfully send a WOL message to my other computer, which works with wakeonlan.
So the only thing left is figure out why the WOL relayd isn’t working. I’ll look into systemd and try to use that.

I’ll let you know the outcome.

So I did some research into systemd and going from init.d to systemd, but I really don’t have a clue how I should migrate this script.
Is there someone who can give me some help with this?