Cool Engineering

Info on some cool engineering projects

Monday, September 11, 2006

Please wake me up

Over recent days I have been toying with the idea of creating a hardware based WOL (Wake On LAN). The application is an interesting one. I'm setting up a computer in a remote location which is connected to LAN via WIFI. This computer will be used for a estimated maximum of 5 hours a week (mostly on weekends). The computer is about 2km from my house (and on a different network), so it would be nice to turn it on remotely so that I can connect to it from home via remote desktop (or something of the like - after configuring this in the local router). Unfortunately the WIFI standards up to 802.11g don't support WOL (although 802.11n is rumoured to) - unlike most standard 10/100 NIC's these days.
With this in mind I have thought about setting up a small microprocessor connected to the Ethernet port of the computer. This micro could have a real time clock and could trigger the WOL functionality of the computer at predefined times that I have programmed in. How does this work then? Basically a special UDP packet containing a 'magic string' is used to trigger the computer into waking up. Using Ethereal (a great packet analysing program Wade put me onto a while back), I was able to take a look at what these 'magic packets' look like.
Basically it is like:
0000 ff ff ff ff ff ff 00 10 a4 84 5a d2 08 00 45 00 ........ ..Z...E.
0010 00 82 63 f9 00 00 80 11 14 c7 c0 a8 01 03 ff ff ..c..... ........
0020 ff ff 05 eb 2f ff 00 6e 05 b2 ff ff ff ff ff ff ..../..n ........
0030 00 14 85 ea 2a 1e 00 14 85 ea 2a 1e 00 14 85 ea ....*... ..*.....
0040 2a 1e 00 14 85 ea 2a 1e 00 14 85 ea 2a 1e 00 14 *.....*. ....*...
0050 85 ea 2a 1e 00 14 85 ea 2a 1e 00 14 85 ea 2a 1e ..*..... *.....*.
0060 00 14 85 ea 2a 1e 00 14 85 ea 2a 1e 00 14 85 ea ....*... ..*.....
0070 2a 1e 00 14 85 ea 2a 1e 00 14 85 ea 2a 1e 00 14 *.....*. ....*...
0080 85 ea 2a 1e 00 14 85 ea 2a 1e 00 14 85 ea 2a 1e ..*..... *.....*.

Note the sequence 00:14:84:ea:2a:1e which is repeated about 15 times - this is the MAC address of the host computer. Besides this the packet is made up of source and dest (FF FF FF FF in this case) IP addresses, checksums, a source MAC address, a dest MAC (FF FF FF FF FF FF) and various port and mode settings.
At some point I hope to get around to building this and testing it out - but for now, uni is pretty busy - I should also probably build the computer this will interface with first as well.

0 Comments:

Post a Comment

<< Home