Saturday, January 12, 2008

OpenWRT: A Better Way to do Wireless

In my house, I have a wireless network. Big news - everyone has one.
The unusual aspect of this one was that occasionally, the access point didn't want to talk to one of my PCs. Headache? Lack of appreciation? Missing upgrade? I'll never know....

So I decided to pull out a spare Linksys WRT54G (old model!) I had lying around, install OpenWRT on it, and put it up instead. Worked like a charm...

NOTE: The docs at OpenWRT are NOT good. Stuff like this installation guide, where "getting started" consists of mostly empty space, is somewhat hard to decode. So why not write down some steps, like so many have before?

  • Core. Having done this before, I went for the 2.4 kernel for the WRT54G (last time I tried, wireless didn't work on 2.6). Downloaded the right image from the download directory, got connected to the box, and upgraded. No problem.
  • Find the router! Being not completely naive, I did this without connecting the box to my network, because it came up listening to 192.168.1.1 - the same as my home network's router. Fun would have resulted....
  • Telnet to the found address, and set the password. Then, log out, and ssh to root@192.168.1.1. Note: If you have ever done that before, to a different 192.168.1.1, you're in trouble - luckily, OpenSSH's ssh client shows you exactly which host key to remove from your .ssh/known_hosts file.
  • Reconfigure. Move it to a different IP address, turn off DHCP for the LAN, enable the wireless, set the SSID.. all done in /etc/config somewhere.
  • Cross your fingers and reboot. It works!
The OpenWRT actually comes with a running web server. But on Kamikaze, there's absolutely nothing in it - all URLs give "URL not found".

Being a sucker for pretty pictures, I found X-WRT, which tries to make a web interface. But it says Kamikaze is a "work in progress". Danger?
A quick visit to #openwrt on irc.freenode.net reassured me: "Yes, but it works fine for some!"
Instructions are on the Wiki, NOT under "installation instructions" on the front page. But they're clear, explicit, and they work!

For now, Kamikaze is plain sailing. If I learn something more, I may say more. Until then, let's see if THIS one stays up for long...