Ubuntu with WPA Wi-Fi running on a Dell Inspiron 5160. Shoulda been easier, but coulda been impossible.

Now that Mac-inistas Mark Pilgrim, Cory Doctorow, and Tim Bray have made the leap to Ubuntu Linux, I thought it was high time to follow. Never able to afford a Macintosh, I ubuntu-ed from the Microsoft Windows pool of unsatisfied, inconvenienced, and generally trod upon users.

My target machine for the Grand Experiment was a Dell Inspiron 5160 laptop. I had heard tell that the embedded Wi-Fi interfaces in Dell machines were...problematic. "Oh, everything can be fixed on a computer," I told myself as I charged through the OS installation. Following the first native reboot, I discovered that, while the wireless interface was visible in the networking tool, it couldn't be activated and didn't have any security options other than WEP.

Now I was in a bit of a quandry. I wasn't about to lobotomize my wireless network's protection by replacing reliable ol' WPA with cone of silence-era WEP. But I had already affixed two Ubuntu decals to my laptop; an XP-ward retreat would be a humiliation for all to see.

Quite a pickle.

So I did what I usually do in such circumstances: mindlessly enter random command sequences copy-n-pasted from the Googlesphere. It wasn't long before the OS refused to recognize any network interface, much less the internal wireless card.

The next morning, I re-installed Ubuntu from scratch, googled responsibly, and found a solution. The crucial article is Broadcom Wireless in Ubuntu Dapper 6.06. The article mentioned a TrueMobile card, which shares the same BCM4309 chipset as mine. Running lspci | grep 802.11 on my laptop verified this:

0000:02:02.0 Network controller: Broadcom Corporation BCM4309 802.11a/b/g (rev 03)

The instructions specified a driver file called bcmwl5.inf that you can get "from Dell or whoever." I searched for that one for some time, before it occurred to me that my partner's laptop (still running Windows) probably had a similar card and driver. Sure enough, it was hiding in her C:DRIVERSNETWORKADDON folder (I assume that's some Dell OEM folder). Since then, I've discovered the ndiswrapper driver page on Sourceforge which points to the correct file for revision 3 of the BCM4309 chipset: ftp.us.dell.com/network/R76521na.EXE (use bcmwl5a.inf from the AR directory).

Once that file was safely stashed on my laptop, I ran through a simplified sequence of commands (I didn't need to first remove ndiswrapper and all my RadioStates were already zero):

sudo gedit /etc/modprobe.d/blacklist [add line: blacklist bcm43xx]
sudo rmmod bcm43xx
sudo apt-get install ndiswrapper-utils
sudo ndiswrapper -i bcmwl5a.inf
sudo ndiswrapper -m
sudo modprobe ndiswrapper

A quick reboot and I could see the neighbour's wireless network (recently secured -- somebody wised up). My network didn't show up, but it didn't broadcast the SSID so I didn't expect to see it anyway. Running ifconfig showed the wireless card was using the wlan0 interface.

Configuring WPA was a lead-pipe cinch. The Ubuntu documentation entry for WifiDocs/WPAHowTo shows all there is to it:

sudo apt-get install network-manager-gnome

Another reboot -- not needed perhaps, but it's now an ingrained Windows habit -- and I was able to right-click on the new icon and set up the WPA connection. Voila.

Later I discovered that I had to repeat the WPA setup each time until I configured the AP to broadcast the SSID. Hiding the SSID doesn't greatly enhance security, so I can live with that change. The wireless interface also changed back to eth1 for some reason.

Comments