October 22, 2008
My wireless got messed up for some reason over the weekend. I’d left my laptop over at a friend’s for a couple of days while I hung out with my brother, and when I got back and powered it up, wireless was mysteriously not working (maybe NOT mysteriously since I vaguely remember doing a dist-upgrade before shutting down the last time, but anyway). I’d been using ndiswrapper with WinXP drivers I downloaded from the Compaq driver site (my laptop is a Compaq Presario V3000 – Broadcom 4312 Wireless).
Here’s what it says from lspci:
01:00.0 Network controller: Broadcom Corporation BCM4312 802.11a/b/g (rev 01)
If you’ve got the same controller or laptop, then this might be useful.
So anyway, I tried uninstalling ndiswrapper, reinstalling it, no go. Tried purging all my old ndiswrapper configs and such, grabbed new drivers from Compaq, reinstalled ndiswrapper, and for a while it worked. Then after a few more power cycles, it went missing again. Tried b43-fwcutter, which detected my controllers nicely, but wouldn’t let me connect to any wireless networks.
That’s when I tried looking for other drivers, other than from the Compaq site (I heard Dell drivers would work as well), in the hopes of using those with my ndiswrapper, when lo and behold! I stumbled upon this bit of news! Oh joy! Excited, I hurried over to their download page here and downloaded the 32-bit version and read the readme while waiting.
Here’s the gist of what the instructions were:
Untar the file hybrid-portsrc-x86_32_5_10_27_6.tar.gz (hybrid-portsrc-x86_64_5_10_27_6.tar.gz if you’re running on a 64-bit kernel) in its own folder:
tar -xvzf hybrid-portsrc-x86_32_5_10_27_6.tar.gz
You should now see this in your directory listing:
Now build the Loadable Kernel Module (LKM) like so:
make -C /lib/modules/`uname -r`/build M=`pwd`
Of course, you need to make sure you have all the required kernel headers before building it. Once that’s done, your directory listing should look like this:
The magic file we need is wl.ko. Make sure you don’t have b43, b43legacy or b43xx loaded by running this:
rmmod bcm43xx; rmmod b43; rmmod b43legacy
And for good measure remove ndiswrapper modules:
Now load the module ieee80211_crypt_tkip:
And finally load the wl.ko module:
Now if you do an ifconfig, you should see wlan0 right after your eth0 and lo devices. Yippee-kay-yay! Test it out by scanning and connecting to a network. If it works, then you might want your module to load upon boot, which is something the Broadcom readme doesn’t touch on. Let me school you how.
Copy the wl.ko file to /lib/modules/2.6.26-1-686/kernel/net/wireless/
cp wl.ko /lib/modules/2.6.26-1-686/kernel/net/wireless/
Create the module dependencies:
Try loading your new module!:
If you get no error on modprobe, then it worked perfectly! Next you have to tell your system to load the module at startup. On my debian system, I do this by editing the file /etc/modules to include the following:
Now, reboot and you’ve got official Broadcom wifi goodness! Hooray! Ubuntu 8.10 (due out the end of this month) will have this driver bundled with it, here’s hoping that Debian will have it in its repositories soon! Of course, all the above was done on my GNU/Debian Lenny/Sid system, so let me know if you tried it out on yours and tell me how it worked for you. Cheers!