Bug 1200 - implement magic packet wake-on-lan (wol) with Squeezebox2
: implement magic packet wake-on-lan (wol) with Squeezebox2
Status: CLOSED FIXED
Product: SB 2/3
Classification: Unclassified
Component: Slimproto
: unspecified
: All All
: P2 enhancement with 7 votes (vote)
: ---
Assigned To: Blackketter Dean
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-03-25 13:15 UTC by Kevin Pearsall
Modified: 2008-12-18 11:38 UTC (History)
1 user (show)

See Also:
Category: ---


Attachments
source of a gpl program called wakelan that does magic packet wol (24.23 KB, application/x-gzip)
2005-04-04 13:30 UTC, Kevin Pearsall
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Pearsall 2005-03-25 13:15:43 UTC
 
Comment 1 Kevin Pearsall 2005-04-04 13:30:49 UTC
Created attachment 395 [details]
source of a gpl program called wakelan that does magic packet wol
Comment 2 Kevin Pearsall 2005-04-04 13:35:59 UTC
how i'd imagine this would work:
- pressing power, sleep, or play when server is not present would send magic packet
- or it could be to press and hold sleep or something...
- could also put something on the display like 'Attempting to wake SlimServer...'
Comment 3 Vidur Apparao 2005-04-25 20:47:19 UTC

*** This bug has been marked as a duplicate of 331 ***
Comment 4 Kevin Pearsall 2005-04-26 14:25:56 UTC
not really a dupe, one is a feature request for squeezebox1 (bug 331) this one
is a feature request for squeezebox2.
Comment 5 KDF 2005-04-26 14:36:18 UTC
I've been reading that WOL doesn't really over wireless, so wont this be
pointless for a large number of users expecting this to eventually work?

for eg, I have tried sending WOL to a PC behind the SB2 bridging, and can't get
it to work.  research on that seemed to suggest I was dreaming to ever expect it
to work without hacks to most routers/bridges
Comment 6 Kevin Pearsall 2005-04-26 14:44:03 UTC
i don't understand why that would be an issue...  are you saying that wireless
routers dump the wol packet?

now a machine behind a bridge, i could see that as possibly being an issue, but
what if it's just wired or wireless directly to your router?

how did you send the packet?  using wakelan?
Comment 7 Kevin Pearsall 2005-04-26 15:04:26 UTC
yeah wow if the computer is connected wirelessly, wol is just no go.

but i don't think that invalidates this as a feature.  that'd just be one caveat.
Comment 8 KDF 2005-04-26 15:58:47 UTC
the videbox plugin sends a WOL packet using the following:

sub wakeUp {
	$socket->send( WakeOnLAN( $wol_mac ), 0, $destaddr ) if $wol_mac =~ /[1-9]/;
}
# Assemble a Wake On LAN packet

sub WakeOnLAN {
	my $mac = shift;

	my $macbin = join( '', map { chr( hex( $_ ) ) } split( /[^0-9a-f]+/i, $mac ) );
	return ( chr(0xFF) x 6 ) . ( $macbin x 24 );
}


I mentioned it because I spent a HUGE amount of time digging for info (until
about 5am actually) and found it very difficult to get a straight answer.  There
were hints that it was possible, but nothing that proved any idea had worked.  I
don't see any reason not to support for wired, but it is going to have to be
made clear that wireless isn't happening (if indeed it isn't reliably possible).
 I'm losing patience with some attitudes lately, so I figure I am probably not
the only one.  Avoiding the potential for creating yet another cause for the
parade of (enthusiasm killing) ranting is worth the caveat  :)
Comment 9 Claus Hansen 2005-06-20 14:12:43 UTC
WOL over WLAN working with this setup:

Slimserver running on an old Advance 9 PIII motherboard with a RealTek RTL8139 
NIC that is on my LAN (note: not WLAN), i.e. connected to one of the 10/100 
MBit/s ports on my:

Wireless router: Linksys WRT55AG running firmware 1.30 (the most recent one, 
from April I believe). 

The PCs from which I can wake the Slimserver PC are:
1) A home assembled P4 system with a Linksys WMP55AG WLAN NIC
2) An IBM T41 with the build in WLAN NIC (I believe it is an Intel PRO/Wireless 
LAN 2100)
3) A Compaq Armada M700 with a 3Com XJack NIC (3CRPAG175)

Comment 10 Mick 2005-06-21 08:33:34 UTC
Just to add to what "password" said.
I can wake my homePC by sending WOL magic packets Wirelessly from my T42
Thinkpad using a Netgear 802.11G card.

My Wirleess router is a Belkin. I have it set to port forward any UDP packets on
port 9 to xxx.xxx.xxx.255. i.e. Do a broadcast on the subnet.
The destination NIC is connected by CAT5 to the Wireless router. it also
obviously needs to remain powered while the PC is in standby, otherwise the
packets go nowhere.

I can document my setup precisely and test firmware if required as I'd really
like to see this feature implemented.

The main issue as I see it, is that the SB needs to know the correct MAC address
to construct & send the Magic packets to. But once you have the SB sucessfully
connected to the Slimserver during setup, you can probably extract the MAC from
one of the packets and store it Automagically. Even entering the MAC address
manually would not be a major issue for a Rev 1 release.
Comment 11 Kevin Pearsall 2005-06-21 09:13:39 UTC
from what i gather, WOL should work fine from wireless devices, just not TO
wireless devices.  so if the computer is wireless, i don't think  you can wake
it up using a magic packet.  but if it's wired, that will be fine.

wireless cards just don't have the same powered-on-but-powered-off capability
that ethernet boards do i guess...
Comment 12 Mick 2005-06-21 13:26:53 UTC
Comment #11 is correct. To save power in laptops, the Wireless radio will
normally be completely shutdown.

I'm not sure about desktop Wireless NIC's. It may be possible to leave power
going to the card when the PC is in standby, but the NIC needs to be in PCI slot
2 on a PCI2.2 motherboard for WOL anyway. 

I've looked through the docs for a Netgear Desktop wireless NIC and could find
no mention of standby power settings.
Comment 13 Blackketter Dean 2005-08-03 16:09:50 UTC
Will be in tomorrow's nightly build in version 16.  Sends WOL packet if you choose to connect to a 
server via the top-level Squeezebox2 Setup menu, if you press RIGHT while trying to connect or press 
POWER when trying to connect.
Only tries to wake servers on your local subnet which are not squeezenetwork.  :) 
Comment 14 Jacob Potter 2005-08-04 03:54:09 UTC
Sweet! Works perfectly for me.
Comment 15 KDF 2005-08-04 09:50:19 UTC
I woke to stuttering music, not yet sure if it is the result of the new fw or not.
Comment 16 Blackketter Dean 2005-08-04 10:50:37 UTC
I believe that's due to a scanning issue.  Reopen if you confirm it's related to the firmware.
Comment 17 Kevin Pearsall 2005-08-05 15:09:03 UTC
Wow, that is so slick.
Comment 18 Claus Hansen 2005-08-06 22:26:42 UTC
GREAT!!!!!!!!!!!!!!!!!!!!!!!! It works like a charm - fantastic!!
Comment 19 James Richardson 2008-12-15 12:31:11 UTC
This bug has been fixed in the 7.3.0 release version of SqueezeCenter!

Please download the new version from http://www.slimdevices.com/su_downloads.html if you haven't already.  

If you are still experiencing this problem, feel free to reopen the bug with your new comments and we'll have another look.