Monday, September 29, 2008

Compaq V6000 and Wifi with Ubuntu

Although b43 worked out of the box on my Ubuntu 8.04 laptop for getting a Wifi connection up and running, I couldn't use it for a very long since connection with it kept getting dropped. Moreover, it connected with my linksys hub at a mere 2Mbps. So I had to resort to using ndiswrapper on my laptop. And it works great!

Here are the instructions how I got this to work. If you are starting out with a fresh install or don't have b43 or ndiswrapper installed, you can straight jump to section B.

A.a1. If you have enabled b43, disable this first by going into System -> Administration -> HardwareDrivers.

A.a2. Uninstall b43-fwcutter:


$ sudo apt-get remove b43-fwcutter


[You may want to restart your laptop at this point]
A.b1. Just to be sure remove any previous installations of ndiswrapper:


$ sudo modprobe -r ndiswrapper
$ sudo ndiswrapper -r bcmwl5
$ sudo rm -r /etc/ndiswrapper
$ sudo rm -r /etc/modprobe.d/ndiswrapper


[You may want to restart]
A.b2. Now remove the pre-canned version of ndiswrapper. We need to get the latest version of ndiswrapper.


$ sudo apt-get remove ndiswrapper-common
$ sudo apt-get remove ndiswrapper-utils-1.9


B.1. Now install ndiswrapper from source:


$ wget http://downloads.sourceforge.net/ndiswrapper/ndiswrapper-1.53.tar.gz
$ tar zxvf ndiswrapper-1.53.tar.gz
$ cd ndiswrapper-1.53
$ sudo make uninstall
$ sudo make install


B.2. Grab the Windows XP version of wifi driver. I got the URL for this from HP Support site - make sure that you use the correct driver otherwise the wifi will not work.


$ mkdir WLAN_DRIVER; cd WLAN_DRIVER
$ wget ftp://ftp.compaq.com/pub/softpaq/sp34001-34500/sp34152.exe
$ cabextract sp34152.exe


B.3. Ensure that b43 driver is not loaded.


$ echo 'blacklist b43' | sudo tee -a /etc/modprobe.d/blacklist


B.4. Install the WinXP driver with ndiswrapper


$ sudo ndiswrapper -i bcmwl5.inf
$ sudo depmod -a
$ sudo modprobe ndiswrapper
$ sudo ndiswrapper -m


B.5. Configure the network interfaces and ensure that ndiswrapper is auto-loaded and that WPA is configured for security.


$ sudo cp /etc/network/interfaces /etc/network/interfaces.orig # back up just in case
$ echo -e 'auto lo\niface lo inet loopback\n' | sudo tee /etc/network/interfaces
$ echo 'ndiswrapper' | sudo tee -a /etc/modules
$ echo 'ENABLED=0' | sudo tee -a /etc/default/wpasupplicant


B.6. Now create a shell script to ensure that the drivers are loaded in the correct order:


$ sudo vim /etc/init.d/wirelessfix.sh


B.7. This should open vim, press 'i' to go the edit mode of the editor and then paste the following lines


#!/bin/bash
modprobe -r b44
modprobe -r b43
modprobe -r b43legacy
modprobe -r ssb
modprobe -r ndiswrapper
modprobe ndiswrapper
modprobe b44


B.8. Save the file and close the editor by pressing the sequence [ESC] followed by ':wq' (without quotes)
B.9. Finally mark the script as executable and update the system to use this script at init time:


$ cd /etc/init.d/ && sudo chmod 755 wirelessfix.sh
$ sudo update-rc.d wirelessfix.sh defaults


Now, reboot. The laptop wifi should now work.

[ps: This description is based on http://ubuntuforums.org/showthread.php?t=781966]

No comments:

Post a Comment