For a long time (especially with the 2.4.x kernels), I’d been using a Linksys WUSB11-V26 with the Atmel RFMD 503 as the wireless NIC for my home network, using the at76c503 driver. It worked pretty well, but then I upgraded to a 2.6.x kernel and while it continued to work for a short time, when we suffered a prolonged power outage, the NIC refused to work when power came back. I discovered that my particular WUSB11-V26 only worked with the 0.90.2-140 revision of the firmware (newer firmwares wouldn’t turn the radio on) — once I learned this, everything was fine, I’d just hack the driver source to use the older firmware and everything was fine. However, when upgrading to 2.6.x, I discovered this meant also needing to upgrade to a more recent version of the at76c503 driver, which was fine since my NIC already had the 0.90.2-140 firmware downloaded to it. I built the new driver, installed it, and everything worked fine — until the powerloss. Watching the latest at76c503 driver try to download the firmware resulted in an "unexpected opcode 146" error. So, I decided it was time to buy a slightly better supported wireless NIC and stop fussing with this piece of junk.
Today, I ran out to CompUSA (instant gratification!) and bought myself a Linksys WMP54GS, which you can get at Amazon.com for around $59.99. I decided to go the PCI card route because I wanted to get 802.11g, but my host only has USB 1.1 and I didn’t want to spend the money on a USB 2.0 PCI card in addition to a new USB wireless NIC. Not only that, but most USB NICs have dinky attached antennas, and the PCI card has a screw-on antenna that can be replaced with larger and presumably better antennas. This is important depending on where in the house I need to position the antenna to get the best signal and coverage.
Since I know that wireless NICs aren’t well supported under Linux for various reasons, I decided to log all I had to do to get this particular NIC working on my machine. I run Debian, but these instructions should help get you pointed in the right direction for the most part. I hope this mini-HOWTO proves useful to you if you are in the process of installing a WMP54GS PCI NIC too; leave a comment if it did (or didn’t — maybe I can help)!
Identify what you’ve got
First, identify what you’ve actually got. This is what my machine reports:
0000:01:0b.0 Network controller: Broadcom Corporation BCM4306 802.11b/g Wireless LAN Controller (rev 03)
$ lspci -n | grep 0000:01:0b.0
0000:01:0b.0 0280: 14e4:4320 (rev 03)
There’s no specific driver for the WMP54GS for Linux. The trick is to use NdisWrapper, a package which loads the WinXP drivers (!) under Linux — for better or worse, this apparently works. You can download the source tarball (ndiswrapper-1.1.tar.gz) or get the Debian package (ndiswrapper-source_1.1-1_i386.deb). Note: I struggled with the Debian ndiswrapper-source and ndiswrapper-utils version 1.0rc2 which installed but did NOT work — I couldn’t set the SSID using iwconfig at all. You must use version 1.1.
So, here are the steps to download, build, and install NdisWrapper for Debian systems:
$ cd /tmp
$ wget http://ndiswrapper.sourceforge.net/debian/ndiswrapper-source_1.1-1_i386.deb
$ dpkg -i ndiswrapper-source_1.1-1_i386.deb
$ cd /usr/src
$ gzip -dc ndiswrapper-source.tar.gz | tar xf -
$ cd modules/ndiswrapper
$ debian/rules binary-utils
$ debian/rules binary-modules
$ cd ..
$ dpkg -i ndiswrapper-utils_1.1-1_i386.deb
$ dpkg -i ndiswrapper-modules-2.6.10_1.1-1_i386.deb
Install the Linksys WMP54GS driver
At this point, you now have NdisWrapper installed. But, what about the actual WMP54GS drivers? You can pull them off the CD that came with the NIC, or you can download them. According to the NdisWrapper List wiki page, you want to download this WMP54GS_20040423.exe driver. Either way, you need the following three files:
According to the NdisWrapper Installation wiki page, you don’t need to actually “install” the self-extracting EXE on a Windows machine. Just use a archive extraction program that understands self-extracting EXE’s and extract those three files that we need. Actually, I think we only need the .inf and .sys files, but I extracted the .cat file because it was the only other file in the directory. Once you’ve got those files extracted, you “install” them using the ndiswrapper tool:
# ndiswrapper -i BCMWL5.inf
# ndiswrapper -l
Installed ndis drivers:
bcmwl5 driver present, hardware present
Time to load the driver
If you’ve done all the previous steps correctly, at this point the only thing left to do is load the ndiswrapper kernel module, which in turn will load the bcmwl5 driver we just installed, and you should be in business.
# modprobe ndiswrapper
Verify that it loaded correctly by checking what got written to syslog. Here’s what got written to mine:
kernel: ndiswrapper version 1.1 loaded (preempt=yes,smp=no)
kernel: ndiswrapper: driver bcmwl5 (Linksys,02/19/2004, 126.96.36.199) loaded
kernel: ACPI: PCI interrupt 0000:01:0b.0[A] -> GSI 21 (level, low) -> IRQ 21
kernel: ndiswrapper: using irq 21
kernel: wlan0: ndiswrapper ethernet device 00:0f:66:e6:0d:37 using driver bcmwl5, configuration file 14E4:4320:1737:0015.5.conf
kernel: wlan0: encryption modes supported: WEP, WPA with TKIP, WPA with AES/CCMP
Configure the interface
After that, it was just a matter of configuring the wlan0 interface in /etc/network/interfaces and then issuing an ifup wlan0 to configure it. Here’s an idea of what I use:
iface wlan0 inet static
up dhcpd -q -cf /etc/dhcpd-wlan0.conf -pf /var/run/dhcpd-wlan0.pid -lf /var/lib/dhcp/dhcpd-wlan0.leases wlan0
down kill `cat /var/run/dhcpd-wlan0.pid`
Yes, I run a DHCP server bound to the wlan0 interface to provide IP addresses via DHCP to anyone connecting to the wireless network. Don’t worry, there’s iptables rules-a-plenty that lock it all down nicely, but that, my friends is for another time …
Update: If you want to set up WPA (Wi-Fi Protected Access), check out the WPA page on the ndiswrapper wiki.