So, I've made my own dodgy fix for this whole Apple Mac thing by commenting the block starting at line 374 in
WakeOnAccess.cpp - It works, but is not a long-term fix - it's probably poor form just magic packeting every server all the time, especially if they're already on.
I've also done some playing around with pinging the mac's in my house server in different ways while they've been on, asleep, and off.
- Off: No response from anything.
- Sleep: ICMP pings are responded to, but not TCP pings.
- On: ICMP pings are responded to, and also TCP pings.
When I say "TCP Ping", I mean the "tcp" mode of the Net:
ing perl module, which as far as I can tell just connects to the echo port (7?) of the computer. (Disclaimer: I am by no means a network or perl programmer).
Since I did that test, I have since rebooted the mac mini, and it appears to be functioning normally now - nothing responds when asleep, but both icmp and tcp respond when awake. However, with the other mac in my house (which I have not rebooted lately), it still behaves as listed in the bullet points above.
I was brainstorming ways of fixing this - my thoughts are that in wakeonlan.xml, the user could specify whether to ping the server in ICMP or TCP mode to figure out if it were awake or not. This could also be discovered automatically - upon discovering MAC addresses, XBMC could do a TCP ping, and if the server responds to that, XBMC would use that to test for a response in the future, rather than ICMP.