Hacking Wake PC via Wii via WOL

pelago

Member
Member
Joined
Feb 20, 2006
Messages
1,019
Trophies
0
XP
565
Country
This is a great idea for an utility, especially if it can be built into (or called from) other programs like media players, file transfer programs etc.
 

OSW

Wii King
Former Staff
Joined
Oct 30, 2006
Messages
4,787
Trophies
0
XP
482
Country
Is achieving the reverse possible? Waking your Wii from standby. (Just curious, although I doubt it is)
 

nehe32

Well-Known Member
Member
Joined
Sep 15, 2007
Messages
158
Trophies
0
XP
203
Country
New Zealand
yakboy said:
I aware these forms are becoming noob central.

HAHAHA
true, however you are the cancer, not me.

also, on topic, you do know that the computer needs to be in a power-saving mode (like sleeping) to use WoL..right?
it also requires you to enter the BIOS (or device manager)
 

raptor5001

Well-Known Member
Newcomer
Joined
Aug 4, 2006
Messages
58
Trophies
1
XP
370
Country
United States
Unsurprisingly, Wikipedia provides a good reference for WOL
tongue.gif
http://en.wikipedia.org/wiki/Wake-on-LAN

Pretty much, it seems the packet needs just to contain a payload in the format of six hexadecimal values of FF followed by the destination PC's MAC address repeated 16 times. As long as that is in the packet, and the WOL-enabled PC receives it, it will wake up. So you can send out an OSI-2 packet directed to address FF:FF:FF:FF:FF:FF or an IP packet to the LAN's broadcast address. Don't even have to use UDP. Wouldn't work over TCP though, since that transport protocol is going to try to synchronize (syn) with the WOL PC before transmitting your payload, and obviously an off PC won't reply.

It wouldn't be too difficult to implement this into MPlayerCE. Maybe those guys might want to include this in their project if someone else writes the code for it.
 

Tristar

Well-Known Member
Member
Joined
Sep 14, 2009
Messages
323
Trophies
0
XP
98
Country
WiiCrazy said:
Here is the one I modified,

http://www.gcd.org/sengoku/docs/wol.c

added wii specific headers, definitions
changed hp->h_addr to hp->h_addr_list[0] ,
changed all socket related stuff to be prefixed with "net_"

and added some console initialization routines along with constant arguments for ip address and mac address...

I'll try add a network init code and test when I get home...
Code seems to be simple but of course there could be some limitations either in libogc or wii's wireless card then this won't work...

By the way on my pc bios there is no settings labeled as wake on lan... but there are a bunch of wake up options like from ps2 mouse / ps2 keyboard blah blah... and there is one regarding pci / pcie... could it be that it doesn't support wake on lan? Pretty much new board actually...


I do have WOL configured correctly and working on the host but, am unable to compile the source that you have modified.

where are these files referred to by your source code?
#include
#include
#include

these lines just get 'warning: sys/socket.h: No such file or directory'
'warning: netinet/in.h: No such file or directory'
'warning: netdb.h: No such file or directory' error from devkitpro

along with numerous other errors - Does this need a particular version of devkitpro to compile?
 

WiiCrazy

Be water my friend!
Member
Joined
May 8, 2008
Messages
2,395
Trophies
0
Location
Istanbul
Website
www.tepetaklak.com
XP
387
Country
Tristar said:
WiiCrazy said:
Here is the one I modified,

http://www.gcd.org/sengoku/docs/wol.c

added wii specific headers, definitions
changed hp->h_addr to hp->h_addr_list[0] ,
changed all socket related stuff to be prefixed with "net_"

and added some console initialization routines along with constant arguments for ip address and mac address...

I'll try add a network init code and test when I get home...
Code seems to be simple but of course there could be some limitations either in libogc or wii's wireless card then this won't work...

By the way on my pc bios there is no settings labeled as wake on lan... but there are a bunch of wake up options like from ps2 mouse / ps2 keyboard blah blah... and there is one regarding pci / pcie... could it be that it doesn't support wake on lan? Pretty much new board actually...


I do have WOL configured correctly and working on the host but, am unable to compile the source that you have modified.

where are these files referred to by your source code?
#include
#include
#include

these lines just get 'warning: sys/socket.h: No such file or directory'
'warning: netinet/in.h: No such file or directory'
'warning: netdb.h: No such file or directory' error from devkitpro

along with numerous other errors - Does this need a particular version of devkitpro to compile?

You prefix those includes with something, now I don't remember. Source code is at home and I'm on vacation. I can send them when I get back home.
 

PPSainity

Blinded by Science
Member
Joined
Jun 6, 2009
Messages
646
Trophies
0
XP
199
Country
Canada
Most current commercial PC BIOSes no longer list WOL options, but may still support it, especially for onboard NICs. Best way to see if your PC has the capability even if your BIOS had no mention of such is to (if running Windows) launch Device Manager, find your NIC, and see if it has WOL options in the advanced settings.

I think that a nice WOL, magic packet sending app would be nice for the Wii. Being able to send a magic packet from WiiMC or Mplayer CE would be a great feature...

-[]D
 

Tristar

Well-Known Member
Member
Joined
Sep 14, 2009
Messages
323
Trophies
0
XP
98
Country
WiiCrazy said:
@Tristar : Btw, in the first page of this thread my modifications to compile wol.c can be clearly seen.



Oh OK - I thought that "Here is the one I modified......" was a link to the modified version, as it implies
wink.gif
 

tueidj

I R Expert
Member
Joined
Jan 8, 2009
Messages
2,569
Trophies
0
Website
Visit site
XP
999
Country
LibOGC (or rather, IOS) definitely has some quirks when it comes to UDP and broadcast mode... I did some quick changes to that source code and it seems to work for me, if anyone with a compiler wants to try it out here is the source: http://pastie.org/936868
Obviously change the IP and MAC strings to match the machine you're trying to wake.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    Psionic Roshambo @ Psionic Roshambo: This parrot is no more it has ceased to be!