HOWTO: WPA2 under Ubuntu 5.10 with a WPC54G v3 (Broadcom)

Over the holiday weekend I took my old Sony VAIO notebook and loaded Ubuntu Linux on it. As a desktop / end-user distro I’m very impressed with Ubuntu – it is easy to use and configure. Unfortunately, I had some trouble getting my wireless card to work with WPA2 authentication to my wireless network at home. From looking at the Ubuntu forums it seems like this is a common problem. There are some helpful guides; however, none I found covered how to use WPA2 Pre-Shared Key authentication specifically. Fortunately by reading the man pages and some trial and error I was able to get it working.

Here are the steps:

  • download the appropriate driver for your card -> Linksys WPC54G v3
  • from the download extract the driver file (bcmwl5.sys) and inf file (LSBCMNDS.inf)
  • fire up the Synaptic Package Manager and install wpasupplicant & ndis-wrapper
  • open a shell and change directory to the location the driver and inf file were extracted to
  • install the driver: sudo ndis-wrapper -i ./LSBCMNDS.inf
  • check that the driver was installed correctly: ndiswrapper -l if it was installed correctly it should output “driver present, hardware present”
  • write the module configuration file: sudo ndiswrapper -m
  • load the module: sudo modprobe ndiswrapper
  • add ndiswrapper to /etc/modules so the kernel module is loaded at boot time

Now on to the fun of configuring wpa_supplicant to handle the WPA2 authentication for the interface.

  • open the /etc/wpa_supplicant.conf file in an editor
  • edit the network stanza as shown below substituting myssid and mypsk with the appropriate values for your network

network={
ssid=”myssid
proto=WPA2
key_mgmt=WPA-PSK
psk=”mypsk
}

  • open /etc/default/wpasupplicant in an editor
  • change ENABLED to 1
  • change the OPTIONS argument to have values appropriate for your adapter. For my WPC54G v3 I used the following:

OPTIONS=”-i wlan0 -D ndiswrapper -c /etc/wpa_supplicant.conf”

  • open the /etc/network/interfaces file in an editor
  • add entries for the wlan0 interface – on my notebook I desire the wireless card (wlan0) to be the primary interface. My configuration follows below:

# The primary network interface
auto wlan0
iface wlan0 inet dhcp
pre-up /etc/init.d/wpasupplicant start
pre-up sleep 5

  • and we are done

This leaves you with a wlan0 interface that will start automatically, is configured via DHCP, and prior to bringing the interface up the system will start wpa_supplicant to handle the WPA2 authentication so the card can associate with your WLAN.

I found the following to be helpful resources in getting it working:

Hopefully this is helpful to anyone else who is struggling to get it working.

Cold Comedy Concoction

Last Sunday we had the opportunity to see our friends Erin and Nate act in Stark Raving Theater’s 2nd annual Cold Comedy Concoction. It is made up of four one-act comedies which were all quite funny. In case a night of comedy isn’t enough to pique your interest in local theater it is worth noting that one of the plays features some boobies – so get out and support Portland theater. You won’t be disappointed.

The show runs through January 14th.