AvBrand Exploring Technology
AvBrand Exploring Technology
Blog 

Using a Linksys Router to power on your Car PC

3:12 PM, August 5th, 2010

Probably one of the topics I get emails about the most is: How do I make the laptop in my car turn on when the car turns on?

I struggled with this problem when I first was designing my Car PC. There's a bunch of different ways to turn on a laptop: the power button, a USB keyboard's power button, and Wake-On-LAN packets.


  • The power button is physical. In order to trigger it, you'd need to take the laptop apart (possibly destroying it) and wire into the button.
  • The USB keyboard method might actually work: Many USB keyboards have a "power" button, which can be pressed to power on the device. However, this requires your laptop to provide a bit of power on the USB port even when it is off, so it doesn't work on most laptops.
  • Wake-on-LAN packets are simple packets that can be sent to a laptop. The ethernet card is kept in a "sleep" state and when it sees a packet directed at it, it wakes up the whole computer.


The last option seemed like the right one for me. But how to send a Wake-On-Lan packet? I did some research, and it turns out that the absolute cheapest way to do it is via a Linksys router. I picked up a brand-new Linksys WRT54G from some guy on craigslist for $30, and loaded the DD-WRT firmware onto it.

Among other things, the DD-WRT firmware provides a place where you can specify "startup commands". These commands are executed by the router upon startup. I looked up the command to send Wake-On-Lan packets for my version of DD-WRT (it might be different for yours) and put this in there:

/usr/sbin/wol -i 192.168.1.255 AA:BB:CC:DD:EE:FF

You have to replace the AA:BB:CCD:EE:FF with your laptop's network card's actual MAC address, which you can get by typing "ipconfig /all" at the console.

Then, I wired a 12v power supply and rigged it to a line in my car that is only powered when the car is running. I also fashioned a little tiny 40 cm network cable. Now, when the car starts, it powers up the router, and about 8 seconds later after the router is done booting, it sends the WOL packet that wakes up the laptop.

Of all of the systems in my car, this one has been the most reliable. The router has never failed on me in 2 years.

Some people scoffed at the idea of having a big router in the car. Here are some answers to frequent questions and comments:


  • Surely you could use an arduino or some other chip to send the WOL packet?

    Probably, but arduinos cost at least $30. It wouldn't be cheaper than the router.

  • Yeah, but, it's a whole router for just that!

    True. But, the more recent upgrades to my car have made it quite handy to have the router in there. It now serves as a network link to the NTSC-to-Network video capture device that handles the front and rear cameras. The wifi in the router is also used to share my Car PC's cellular internet connection, turning my car into a mobile hotspot.







Comments

skyvola 1:57 PM, August 10th, 2010

I like this idea, I have been toying with how to do this myself once I get a new car. Are you just bridging the connection from the phone to the DD-WRT or are you doing something different? i was thinking with mine I was just going to bridge directly to the CarPC but it would make sense for having the video cameras in. I have read there is also a GPS hack for those routers that you can use them to map while war driving. I think when I set mine up I may have some questions for you if that won't bother you too much. I have a miniITX board that's only a 533 but with a gig of ram it should do all the basics I am going to need, plus I can have it power on and off with the car rather than the step with WOL.

Ryan 12:12 PM, December 14th, 2010

Very nice. I've had this exact same idea, but i never heard of anyone doing it.

If you dont mind, im curious about how you wired the electricals of the car to supply power to the routers, and other similar peripherals.

Feel free to email me.

Thanks

Avatar-X 12:47 PM, December 14th, 2010

Very simple... just some 12V DC to DC power supplies

-av

steve 5:22 PM, April 26th, 2011

Very nice, I just put dd-wrt on my wrt54g2 and it seems to work so far. It takes a bit longer- ~20 seconds. I read on the faq that you don't use an inverter, what do you use? Straight 12v?

-s

Avatar-X 8:50 AM, April 27th, 2011

For the linksys? I use a little home-made power supply with a 7812 in it. For the computer I use a laptop power adapter that takes 12V in.

copyright © 2024 AvBrand.com - sitemap