• 1
  • 7
  • 8
  • 9(current)
  • 10
  • 11
  • 38
Automatic WakeOnLan upon accessing MySql or FileShares
Code:
CPP     xbmc/network/WakeOnAccess.o
WakeOnAccess.cpp: In function âlong unsigned int HostToIP(const CStdString&)â:
WakeOnAccess.cpp:55:30: error: âinet_addrâ was not declared in this scope
WakeOnAccess.cpp: In member function âvirtual bool CWakeOnAccess::CMACDiscoveryJob::DoWork()â:
WakeOnAccess.cpp:74:20: error: âINADDR_NONEâ was not declared in this scope
WakeOnAccess.cpp: In function âlong unsigned int HostToIP(const CStdString&)â:
WakeOnAccess.cpp:56:1: warning: control reaches end of non-void function [-Wreturn-type]
/home/billy/attempt2/xbmc/utils/CharsetConverter.h: At global scope:
/home/billy/attempt2/xbmc/utils/CharsetConverter.h:83:1: warning: âg_charsetConverterâ defined but not used [-Wunused-variable]
/home/billy/attempt2/xbmc/guilib/GraphicContext.h:244:1: warning: âg_graphicsContextâ defined but not used [-Wunused-variable]
make[1]: *** [WakeOnAccess.o] Error 1
make: *** [xbmc/network/network.a] Error 2
billy@htpc:~/attempt2$

doh, just saw your edit! I'll try again.
Reply
-----------------------
XBMC built successfully
-----------------------
Big Grin

Thanks! Now to reinstate mysql and do some tinkering. I'll let you know how I get on.
Reply
(2012-10-20, 18:30)bilbonvidia Wrote: -----------------------
XBMC built successfully
-----------------------
Big Grin

Thanks! Now to reinstate mysql and do some tinkering. I'll let you know how I get on.

Excellent, well done!
There will be some usage issues on Linux since there is no Mac-discovery and no Ping.
1) settings\system\power-save -> enable wake on access..
mac discovery will fail and no wakeonlan.xml will be made so
2) you have to make one manually based on this template and put at same location advancedsettings.xml and sources.xml are
Code:
<onaccesswakeup>
    <netinittimeout>60</netinittimeout>
    <wakeup>
        <host>10.0.0.6</host>
        <mac>00-15-F2-1D-DF-1E</mac>
        <timeout>1200</timeout>
        <waitonline>40</waitonline>
        <waitonline2>40</waitonline2>
        <waitservices>5</waitservices>
    </wakeup>
    <wakeup>
        <host>tower</host>
        <mac>ff-15-F2-1D-DF-1E</mac>
        <timeout>1200</timeout>
        <waitonline>30</waitonline>
        <waitonline2>30</waitonline2>
        <waitservices>5</waitservices>
    </wakeup>
</onaccesswakeup>
3) restart to activate wakeonlan.xml
Reply
Hi, i use linux and would apreciate to see your work in mainline !!!
I dont understand why you say you dont have ping under linux ?

For auto-discovery under linux, you can use arping to get mac adress on the same sub-network from IP, but i dont know what tools is embededd in xbmc , maybe add arp to the packet dependency (i tried with openelec and arp is there)?
It only knows what has already been discovered though so you would have to initiate some contact to a specific IP. Probably using ping would be easy

ping -b <broadcast address>

can be used to scan the network and fills your arp cache.

Bibi
Reply
We don't have ping and autodiscovery under Linux, because no one has added that for XBMC under any of the other supported OSes. I agreed arp could be the way. We just need someone to do the dirty work.
Reply
right....

xbmc on ubuntu is hanging when there is a wakaonlan.xml file present. I first used my windows machine to create the file:

<onaccesswakeup>
<netinittimeout>10</netinittimeout>
<wakeup>
<host>192.168.0.2</host>
<mac>00-1D-92-DD-1A-0D</mac>
<timeout>300</timeout>
<waitonline>120</waitonline>
<waitonline2>0</waitonline2>
<waitservices>5</waitservices>
</wakeup>
</onaccesswakeup>




Then tried manually editing:

<onaccesswakeup>
<netinittimeout>60</netinittimeout>
<wakeup>
<host>192.168.0.2</host>
<mac>00-1D-92-DD-1A-0D</mac>
<timeout>1200</timeout>
<waitonline>40</waitonline>
<waitonline2>40</waitonline2>
<waitservices>5</waitservices>
</wakeup>
</onaccesswakeup>

It just seems to hang at the xbmc logo

Is there some sort of log , I couldn't see anything?


apart from
22:20:38 T:3078149904 DEBUG: WakeOnAccess [192.168.0.2] trigged by accessing : DataBase:MyMusic28
22:20:38 T:3078149904 INFO: WakeOnLan - Magic packet send to '00-1D-92-xx-1A-0D'
Reply
Was the server asleep? Did the packet make it over and wake it up? If you are using mySQL, XBMC will stay on the splash screen if it can not connect to the database.
Reply
The log shows that the magic packet is successfully sent.
After that, the config specifies to wait for 40+40+5 seconds and that wait is uninteruptable since there is no ping function, the full 85 seconds must elapse.
Also, since this is in the startup (the log shows you are connecting to MySQL) , there can be no visual feedback since the UI has not yet been started.
In other words ; it is expected that xbmc should 'hang' for a long periode, but it is also expected that it eventually gets going (provided the server is awake)
Reply
Thanks for the responses. The server was awake all the time during the test, xbmc crashes after the splash screen and spits me out back to the desktop.

If I do sleep the server the same happens and the server does not wake, I can wake the server using wakonlan from the command line.

Is it hanging because it can't verify online?
Reply
(2012-10-22, 10:02)bilbonvidia Wrote: .. server was awake all the time during the test, xbmc crashes after the splash screen ..
OK, can you connect to MySQL without this patch?

(2012-10-22, 10:02)bilbonvidia Wrote: If I do sleep the server the same happens and the server does not wake, I can wake the server using wakonlan from the command line.
We use the already existing internal wol-transmission of xbmc and log says it succeeded.. I dont know why your server does not start and must assume that the built-in wol in xbmc is working..


(2012-10-22, 10:02)bilbonvidia Wrote: Is it hanging because it can't verify online?
Yes for those ~85 seconds

Reply
Okay just to clarify, I left the server on all of the time so regardless of whether the wol packet is sent there should be no issue connecting after the wait period but xbmc crashes after this period.

If I delete the wakeonlan.xml file from userdata and start xbmc again it connects to mysql and loads straight away.

Are there any trouble shooting steps you would like me to try?
Reply
Could you try this : in wakeonlan.cpp line ~233 there is :
Code:
else
  Sleep(1000);
try to delete the line with 'else' .. rebuild & check
Reply
Okay so I am stuck at work but, was able to login remotely and rebuild and create a new xml file. Got one of the kids to start it and apparently it has indeed loaded without crashing so perhaps progress.

I will do a server sleep test when I get home and report back.
Reply
Great. Thank for sticking with it!
Reply
This is odd, xbmc was on when I got home so had booted fine with the xml file present. It locked up though when I tried to exit. I slept my server and rebooted the machine from a remote terminal and the server did wake but xbmc went into a crash restart loop so I tried rebooting the xbmc machine again while leaving the server on but the same thing happened, xbmc crashing and restarting, I could for a split second see the xbmc home menu screen before crashes however, I dont remember this yesterday. I deleted the xml file while this was occurring and sure enough it the stopped the crash restart loop.

Reply
  • 1
  • 7
  • 8
  • 9(current)
  • 10
  • 11
  • 38

Logout Mark Read Team Forum Stats Members Help
Automatic WakeOnLan upon accessing MySql or FileShares4