Disabling the Built-in bcm43xx Driver.

Dapper/Edgy enables support for the bcm43xx driver by default, which conflicts with ndiswrapper. To get ndiswrapper to work, you need to blacklist the driver:

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

You can remove the current driver without rebooting:

 sudo rmmod bcm43xx
 sudo rmmod ndiswrapper
 sudo modprobe ndiswrapper

Clearing Out Old Ndiswrapper Stuff.

You only need to do this if you gave previously installed a version of ndiswrapper.

 sudo modprobe -r bcmwl5
 sudo rmmod ndiswrapper
 sudo apt-get remove ndiswrapper-utils
 sudo rm -r /etc/ndiswrapper/
 sudo rm -r /etc/modprobe.d/ndiswrapper 

Install NDISWrapper.

Preparation.

Note you can’t install ndiswrapper this way using the Live CD.

If you do not know what chipset your wifi card uses, issue the lspci command in a terminal. It should be listed there. In order to see if your chipset is known to work with the ndiswrapper module, find your card in the list [WWW] here. That link might even provide you with useful tips to get your specific card to work, as well as providing a link to the working Windows drivers.

Compiling from Source.

I have assumed that you have already downloaded the Windows drivers for you card and that you are using the bcmwl5 (Broadcom) drivers.

  • Download ndiswrapper-1.1.tar.gz file from the Sourceforge site.
  • I get fed up typing sudo before every command to run something as root, so I create a root account for myself. If you don’t want to do this you can type sudo in front of the commands.
  • To create a root account open a command shell and enter the following command:
sudo passwd root

You will be prompted to enter your own password first, next you will be asked to enter and confirm a password for root. Once you have done this you can open a root shell by typing:

su root

Enter your root password when prompted. From here on I assume that you are logged in as root.

  • Now we need to build the source. First make sure that you have all the pre-requisites installed:
apt-get install build-essential debhelper fakeroot linux-headers-$(uname -r)
  • Unpack the ndiswrapper tarball. I have assume you wil be using /usr/src but you can choose somewhere different.
cd /usr/src
tar -xvzf /path/to/ndiswrapper.tgz
  • Now we need to modify the rules file to build a Debian package
cd /usr/src/ndiswrapper-1.1
sed -e "s/misc/kernel\/drivers\/net\/ndiswrapper/g" debian/rules > debian/temp
mv debian/temp debian/rules
  • Make the debian packages (this assumes that you ae already in the directory /usr/src/ndiswrapper-1.1):
make deb
  • You should now find two .deb files in /usr/src. You need to install them overwriting any modules already installed by Ubuntu:
cd /usr/src
dpkg -i --force-overwrite ndiswrapper-utils_1.1-1_i386.deb
dpkg -i --force-overwrite ndiswrapper-modules-$(uname -r)_1.1-1_i386.deb

Installing the Windows Drivers.

Substitute your driver name and path for your Windows driver:

ndiswrapper -i ~/windows_drivers/bcmwl5.inf
  • Create a module alias for ndiswrapper so it loads on boot:
ndiswrapper -m
  • Finally load the ndiswrapper module:
modprobe ndiswrapper
  • Check that the driver was loaded and whether the hardware was detected:
ndiswrapper -l
Installed ndis drivers:
bcmwl5 driver present, hardware present
  • Check that ndiswrapper is listed in /etc/modules:
vi /etc/modules
  • Reboot and go into the network setup and you should see your wireless card listed. It’s probably worth disabling your wired card in Network Manager, as this will sometimes stop you getting your wireless car working.