Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I have a NAS box that is "Wake On Lan" enabled. I'm struggling to find a way for to utilise this with my TimeMachine backups from my Mac (Mountain Lion).

My intention is that may Mac will wake the sleeping Nas when TimeMachine backups are scheduled.

Has anybody got any experience of sending magic packets from a mac to a nas? Any assistance would be greatly appreciated.

Cheers

Noel

share|improve this question

1 Answer 1

up vote 1 down vote accepted

I resolves this by the using an answer from this question that links to this blog post, and incorporating this Wake UP NAS applescript into the automator app (Changing the MAC and local broadcast IP address to suit)

Wake Up Nas Script:

do shell script "python -c \"
import socket
data = '\\xff'*6+'\\x00\\x13\\xd4\\xdc\\xf2\\x80'*16
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)
s.sendto(data, ('192.168.1.255', 80))\""

The automator app is as follows:

pause 10 seconds
run the above WakeUpNas script
pause 4 mins (let the nas start up if needs be)
Get Specified Servers (add the servers that you want to wake)
Connect to Servers

Then adding the above App to the startup items to reconnect to drive when the Mac restarts.

By following the blog post you can also call the app when the computer wakes from sleep by installing Sleepwatcher and a little extra work.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.