Subscribe to Munawwar's Lab        RSS Feed
-----

Wake-on-LAN Dongle

Icon Leave Comment
Have you walked into your workplace/school and then realized that you forgot to take your files/memory stick or forgot to sync your files with a cloud storage service/whatever? I have run into situation where I really wished I could remotely start up my PC. Now I don't wish anymore...I just do it!

Say what?
Here is the keyword - "Wake-on-LAN" (for many it isn't new). The first time I read on this technology I thought it could only work if the computer is in "sleep" state. Months later I read about it again and found that it can work even when your computer is completely switched off, aka S5 state (of course it should still be plugged into a power source <-- I get this silly question from many). And this would work only if your BIOS and ethernet adapter support this feature (link).

However there is a small problem: The computer that you want to wake must be connected to a network through ethernet (since WOL magic packets can currently only be sent through ethernet...there is something called "wake over wireless LAN - WoWLAN" however it is not reliable...at least that's what I read). BUT my PC is placed too far away from my router...so how do I work this out?

ARM to the rescue! I had a mini2440 (an arm device with linux) lying around. I connected a wifi dongle to it, and an ethernet cable form it to my PC and then sat down to get all the software working.

First hurdle - I couldn't find the ARM drivers for my wifi dongle. I had to build them from source.
Then to build Qt for ARM so that I can get cracking on some codez.

Got them all done! Now time to code...but first I googled around and found an existing open-source project that implements WOL with Qt. I tested the app and it *worked*...woot!
The struggle wasn't over:
1. I had to port this over to ARM and test whether it worked.
2. I had to add some code to make this program a service accessible over HTTP.
3. Fix some existing bugs in the code.

Finally, I had to do some additional tricks to workaround the dynamic IP which my ISP assigns to me.
Phew...after all that work, I did get this project completed. Now I can switch on my PC from Mars...all I need is internet access. YEAH! Herez the codez and binary. The code is platform independent since it is written in Qt (just remember to get the old Qt 4.6.1 IDE if you want to compile for ARM). Note: No authentication is done on the incoming requests. So don't use this program to wake your backyard ballistic missile system.

0 Comments On This Entry

 

Trackbacks for this entry [ Trackback URL ]

There are no Trackbacks for this entry

September 2014

S M T W T F S
 123456
78910111213
14151617181920
2122 23 24252627
282930    

Recent Entries

Recent Comments

Search My Blog

0 user(s) viewing

0 Guests
0 member(s)
0 anonymous member(s)