Skip to main content
Topic: Wake NAS from sleep (Read 2952 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Wake NAS from sleep

Help for a newb please.

If I start Foobar 1.1.11 after my PC and NAS have been running for a while, the status of the library shows as error!, and I can't play any tracks.
To work around this if I close Foobar,  open windows explorer and select a file on the NAS, I can hear my NAS disks burst into life.
If I then re start Foobar the library status goes initialising, and then monitoring, and every thing is fine.
So my question is what do I have to do so that Foobar directly activates my NAS?

Just for reference WMP does wake the NAS from sleep.
The NAS is a D-Link DNS323, on a wired windows network. This happens with all of my PCs which run Vista, Win7 64, and Win8 64

Sorry if this question has already been answered, but I couldn't find anything.

Wake NAS from sleep

Reply #1
Replying to my own post here!
Have updated Foobar to 1.1.13

Looking for solutions I came across the phrase "magic packet", which is explained here:

I am out of my depth here but it seems that the software (Foobar) needs to send a "magic packet" to the sleeping NAS, and isn't ?
Have seen some freeware which is an executable which sends a "magic packet", that I could put into a batch file....but I can't believe Foobar does not do this anyway!

Really would appreciate any suggestions!


Wake NAS from sleep

Reply #2
Is your NAS actually asleep, or have the disks just spun down? What is the status of the LEDs on the NAS when it stops working with foobar2000? What does the NAS manual say those LEDs mean? If the NAS is in a suspended state then yes, WOL might be what you need.

Next time it happens, instead of opening Windows Explorer just try pinging the NAS to see if you get a response to the ping, and see if the disks spin up, or if foobar can now play tracks.

Oh, and you don't need to quote the immediately preceding post when replying.

Wake NAS from sleep

Reply #3
Thanks for the suggestions.

According to the manual "The DNS-323 Power Management feature allows you to configure the drives to shut down while power remains constant to the device. The drives will power up again when data is accessed."
In the options screen I have "hibernation" enabled. It seems that DLink use the terms hibernation and sleep interchangeably.

I tried pinging the device while it was asleep, and it had no effect (successful round trip, but no start for the HDDs).

I have also tried Media Monkey, Windows Media Player, Windows Media Centre, and VLC. All of these wake the NAS from sleep successfully.

My conclusion is that this is a bug with Foobar, and my guess is that it is not sending a "magic packet" to the NAS.

My workround was to get a magic packet sender (exe) from and put it into a batch file

cd c:\program files\WOL
MC-WOL 00:11:22:EA:B4:9c (my NAS MAC altered)
rem pause
cd c:\program files\foobar2000

This sends the magic packet to the NAS, wakes it from sleep and starts Foobar

My other conclusion having spent time with several pieces of software is that Foobar is by far the best overall package, and I am really pleased with it 9.5 out of 10!


Wake NAS from sleep

Reply #4
Your NAS isn't asleep - if you can ping it then it is awake, just with the disks powered down.

Magic packets don't spin up disks, they wake devices from sleeping. As your NAS isn't asleep then the magic packet isn't waking it - but it's obviously doing something that makes the NAS spin up the disks. Maybe it's a timing problem, and the extra second or two your batch file creates between the magic packet exchange and foobar2000 starting up and looking for the library is enough time for the disks to spin up, so foobar2000 doesn't see a non-responsive disk and generate the error message.

For completeness, applications don't generally send magic packets to wake remote devices. Think about it for a couple of seconds - how would any application (Media Monkey, Windows Media Player, Windows Media Centre, VLC, foobar2000) know the MAC address of the device you want to wake up? Media Monkey, Windows Media Player, Windows Media Centre, and VLC aren't waking the NAS from sleep, because it isn't asleep. They are doing something to spin up the disks, but that is completely different. If it's a timing issue maybe they just wait a little longer for the disk to respond? Or maybe they don't monitor the library in the same way as foobar2000?

Short version: your solution is working (and that's a good thing  ), but your analysis is a little flawed.

What would be interesting is to fire up foobar2000 using your batch file, play one track, then stop playback and wait until the disks in your NAS power down. If foobar2000 still works (plays tracks, no library error) then the problem would seem to be to do with timings when foobar2000 starts up and begins library monitoring. On the other hand, if the disks don't spin down then we can deduce that foobar2000 is keeping them spinning, so it could still be an aggressive timing problem, but more investigation would be needed.

SimplePortal 1.0.0 RC1 © 2008-2018