Tuesday, 21 August 2007

Having Linux Wireless Troubles? Try WPA!

A few weeks ago, my father bought himself a brand new laptop. It was an Advent 7113 and he got a pretty good deal. Of course, it had Vista installed. He already knows about Linux because I've had him use it in the past. This time however, he wanted to stick with Vista to try it out. So I set up ZoneAlarm, ClamWin, connected to his wireless network and left him to it. Everything seemed to be going well.

And then it happened!

The inevitable "Can you come over and have a look at this laptop" phone call. I've had plenty of these calls in the past, so I wasn't too surprised when I received this one. What did surprise me though, was when the laptop started it booted straight into Ubuntu Feisty. Interesting!

It turns out my parents got tired of Vista after a couple of weeks because they were constantly being bombarded with pop-ups. They instructed my brother to wipe Vista and put Linux on it. He obliged by installing Ubuntu Feisty. I was called when they couldn't get connected to the wireless network. Nice!

Running lsusb revealed the laptop uses an inbuilt MSI 6877 WLAN usb card. The Network Manager application in Feisty could see the network but couldn't connect. It just sat there trying to connect for ever after accepting the WEP key. I had a bad feeling about this and posts like this one on the Ubuntu forums didn't help.

I spent many hours trying various drivers, downloading them and building them. I tried every combination of iwconfig I could think of. Nothing worked! As a last resort, I was thinking of using ndiswrapper but Vista had been wiped from the machine and they didn't get an install CD. So, I couldn't find the Windows drivers for the wireless card. I was aware that the Vista drivers probably wouldn't work with ndiswrapper anyway. It would likely have to be the XP ones. Where would I get those? I really didn't want to use ndiswrapper if I could help it.

The fact that Feisty could see the network continued to niggle me. Why couldn't it connect? Why would someone write a driver that could see the network but couldn't connect? It made no sense. Perhaps it was just a very early version of the driver? It's doubtful that such a driver would make it into the kernel and end up in Feisty though! I downloaded the latest live CD of Gusty, just in case the driver had been updated. Still the same issue. I was getting tired of this! WHY WON'T THE DRIVER CONNECT?

OK, let's see what happens if I turn off all security on the router. BINGO! CONNECTED! A router without any security is not the answer but at least this is progress. So, I have one other option. Try WPA instead of WEP encryption on the router. Fingers, toes and everything else crossed while I enter the WPA passphrase and wait for the laptop to connect to the network. And it does! Wireless is working perfectly.

I've no idea why WPA worked over WEP and frankly I don't care! My parents have a fully functional laptop with the latest version of Gusty and I haven't had any calls since.

I'm off to update that post on the Ubuntu forums.