Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Wake a sleeping Mac from the network' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Wake a sleeping Mac from the network
Authored by: regulus on Nov 21, '06 11:44:20AM

Thanks, worked great for me on my home network with one additional change, I needed to also change 192.168.1.255 in the script with the IP address of the computer I wanted to wake, otherwise I got an error... socket.error: (13, 'Permission denied')

Note: I have a standard MacOSX 10.4.8 install with the developer tools and the script just worked. No need to install python.

Here's the steps:
1. paste the script into a new text document
2. changed the MAC address and IP address to the computer I want to wake
3. saved it as wakeonlan
4. made it executable with chmod a+x wakeonlan
5. set the Energy Saver preference to allow wakeonlan on the computer I wante to wake



[ Reply to This | # ]
Wake a sleeping Mac from the network
Authored by: fladnag77 on Jan 30, '07 07:56:43AM

To get this script to work with the "broadcast" address (which is useful if you don't know the sleeping machine's IP (when it is dynamically assigned using eg DHCP)), I added one line:

#!/usr/bin/env python
import socket
s=socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)
s.sendto('\xff'*6+'\x00\x01\x02\x03\x04\x05'*16, ('192.168.1.255', 9))

and also changed the port to 9 (the "discard" port).



[ Reply to This | # ]