WOL Before loading XBMC?
#1
Question 
Ive finally got everything working it seems in the house with the main HTPC acting as a NAS and a couple ATV2's around the house.

Windows controls the sleep. No activity for 5 minutes and it goes to sleep.

Windows controls this instead of xbmc as there might be active downloads or network shares going on. xbmc doesn't seem to take notice of these.

Ive got the ATV xbmcs to close xbmc down after 5 minutes to match up with the sleeping of the NAS.
This is because you are foced to click on xbmc and then the WOL script wakes up the htpc because its set auto run wol at start up.

For some reason since the mysql upgrade to centralise everything it seems like its made xbmc a lot slower actually opening. Like when I click xbmc the screen sits blank for around 30 seconds, then the logo then a bit more.
Im running refocus and so the background is blue because at this time the nas hasn't loaded in time and cant the apple tv cant access the shared thumbnails.

Now im not sure why its taking longer. The whole house is gigabit ethernet, no wireless on the media system.

(Its a slight different question to what im about to ask, but anyone else have this issue?)

I though is it possible to run a script when we click on xbmc in the apple menu and THEN open xbmc?

The script will be a wol script. This is so the htpc can be booting up in time for when xbmc on the apple tv is fully loaded. No empty backgrounds etc.

Is something like this possible?
Reply
#2
skunkworks:xbmc-git davilla$ grep -r preflight xbmc/*
xbmc/Application.cpp: // run any platform preflight scripts.
xbmc/Application.cpp: install_path += "/tools/darwin/runtime/preflight";
Reply
#3
Thanks for the reply daville, but im not to sure about the code.

So I need to ssh in and run "grep -r preflight xbmc/*" ?

then,

xbmc/Application.cpp: // run any platform preflight scripts.

loses me a bit, do I have to find a WOL script and put it in here? (And what does xbmc/Application.cpp: refer to?)

last line im a bit lost again because of the prefix but im guessing you execute the last bit to finalise it off?
Reply
#4
that's a grep for the word 'preflight' in the xbmc source code tree.


On startup, xbmc for darwin will try to run tools/darwin/runtime/preflight (in the xbmc.app or xbmc.frap.. dir). This does not exist on ios as it's function was only for osx.

Bascially it's a preflight hook that can be exploited to do anything you want to happen before xbmc starts up.
Reply
#5
The 30 second timeout you're seeing is probably a reverse DNS lookup from the mysql server. You can try turning that off as described here

http://www.linuxask.com/questions/disabl...p-in-mysql
Reply
#6
I've implemented a little different solution - as soon as my ATV2 is powered on it sends a WOL command every 10 seconds. As soon as it is powered off (15 minutes sleep timer) it stops sending.

It was tricky because ATV2 doesn't really sleep (it just disables HDMI and the power LED) but I've found a solution for that.

Just tell me if you're interested...
Reply
#7
Have a look at my post here, maybe this would be what you are looking for ? ; http://forum.xbmc.org/showthread.php?tid=124340
Reply

Logout Mark Read Team Forum Stats Members Help
WOL Before loading XBMC?0