MAC discovery failure when enabling wake on lan

I would like to enable the “wake on lan” option. I run a Pi 2 against SMB network shares on a Windows 7 PC. When I try and setup this wake on lan, I get MAC discovery error\s.

I set the network adapter on my PC to allow “magic packet” wake:

Then I enabled the “attempt to wake server” option in OSMC power settings. That’s when I got a MAC discovery error reported. Am I doing something wrong here?

I see a couple of similar posts in the forum. The first (from April) suggested changing ports, but I am not too sure where / how. The second (from June) was for uPnP and got no replies anyways.

Does anyone have “wake on lan” working with Windows 7 Samba shares?

Still working on this, but no luck so far. I have now tried manually creating wakeonlan.xml and placing it in /home/osmc/.kodi/userdata

The basic file I used is this (but I also tried other pingport: 0, 445 and other pingmode: 1)

<onaccesswakeup> <netinittimeout>60</netinittimeout> <netsettletime>500</netsettletime> <wakeup> <host>192.168.0.103</host> <mac>A4:BA:DB:F9:95:0C</mac> <pingport>9</pingport> <pingmode>0</pingmode> <timeout>600</timeout> <waitonline>15</waitonline> <waitonline2>30</waitonline2> <waitservices>10</waitservices> </wakeup> </onaccesswakeup>

Following this tutorial, I have been able to successfully WOL using an android app from my phone. So I think my PC is setup correctly, and it must be a KODI configuration issue? (The app successfully wakes my PC using the same IP and MAC as above, on port 9).

I am figuring out this is actually a KODI issue, so I will also post on the forums there.

Finally got this working! The approach outlined above ended up working, with a few caveats:

  1. For some reason, I had to use my host name (not ip address). I found this really strange, but it is repeatable (i.e. fails to wake PC if I change back to the ip address). Maybe it is because my network paths are set using the host name?

  2. I failed to understand <timeout>. From here, I finally understood that Kodi will not attempt WoL until this amount of time has elapsed since last connection to the PC. So when I was manually sleeping the PC, Kodi was not attempting to WoL. I rebooted Kodi (resetting the clock), and then it attempts WoL.

Now I am just trying to get Yatse to do the same thing, so I can revert to running headless…

If interested, here is my working wakeonlan.xml file contents:

<onaccesswakeup>
 <netinittimeout>60</netinittimeout>
 <netsettletime>500</netsettletime>
 <wakeup>
 <host>BERTO</host>
 <mac>A4:BA:DB:F9:95:0C</mac>
 <pingport>9</pingport>
 <pingmode>0</pingmode>
 <timeout>3600</timeout>
 <waitonline>10</waitonline>
 <waitonline2>30</waitonline2>
 <waitservices>0</waitservices>
 </wakeup>
</onaccesswakeup>

@DBMandrake - I had set dnsproxy=yes in /etc/connman.prefs in order to resolve some tethering issues. Could this be causing any of the MAC discovery and smb name resolution issues I seem to be experiencing with wake-on-lan?

I saw some other information (like here, for example) saying that DNS issues can sometimes lead to these types of problems. This reminded me that I had made the above DNS-related change.