View Single Post
  #4  
Old 4th February 2010, 07:10 PM
stoat Offline
Registered User
 
Join Date: Jun 2006
Posts: 7,551
HOWTO Use Broadcom Wireless Cards in Fedora 14/15/16

How to install and use ndiswrapper

History and background

Ndiswrapper was initially released in 2003 and is software that acts as a sort of "adapter" to make a Windows driver work in Linux. After it is installed, ndiswrapper commands are then used to install the Windows driver and to configure the system to load and use the ndiswrapper module. Windows XP drivers are preferred, but some people still use drivers for Windows 2000 and even Windows 98. Wireless drivers for Vista and later Windows versions are known not to work well with ndiswrapper and should be avoided. And for 64-bit Fedora, use a 64-bit Windows driver with ndiswrapper. Not all chipsets and Windows drivers work with ndiswrapper. If the appropriate packages are installed for compiling, then ndiswrapper can be compiled from the source code. The source code can be downloaded from Sourceforge.net. But a popular pre-compiled binary version of ndiswrapper also is available from the RPM Fusion repositories in a kmod version and an akmod version that can be installed in Fedora using the YUM package manager as described in detail below. The ndiswrapper documentation and database of supported chipsets are still available at the Sourceforge wiki. According to the ndiswrapper database, most of the chipsets described here so far are known to work with ndiswrapper. Here they are...
BCM4301
BCM4303
BCM4306
BCM4309
BCM4310 USB
BCM4311
BCM4312
BCM4318
BCM4320 USB
BCM4321
BCM4328
BCM43XG
And one of those in that list will only work with ndiswrapper because there is no Linux driver for it (yet)...
BCM4310 USB
So with more chipsets working with Linux drivers, ndiswrapper has gradually assumed its new role as "the last resort". Nevertheless, some people still prefer ndiswrapper even when a Linux driver is available for their chipset.

Installation of the RPM Fusion version of ndiswrapper

The ndiswrapper maintained by RPM Fusion is available in a kmod version which is actually a trio of packages: the ndiswrapper package, a kmod-ndiswrapper metapackage, and a kernel specific kmod-ndiswrapper package. These three packages are dependent upon each other, and installing any one of them generally installs the others as dependencies. The two kmod-ndiswrapper packages will be updated every time the Fedora kernel is updated if the RPM Fusion repos are enabled. The ndiswrapper package is updated only when new versions of it become available. Ndiswrapper is also available in an akmod version which automatically creates updated kmod-ndiswrapper packages when the Fedora kernel is updated. It is a matter of personal preference whether to install the kmod version or the akmod version. The active RPM Fusion repos follow the life cycle of Fedora versions. That means versions of the ndiswrapper for archived versions of Fedora will also be archived at RPM Fusion.

IMPORTANT NOTE: The following steps are for installing the RPM Fusion binary version of ndiswrapper because of its popularity and simplicity. These steps assume that the Fedora system has a wired NIC connection to the Internet for the download steps. If the Fedora system does not have an Internet connection, then all of the packages and files mentioned can be downloaded using another computer or operating system and transferred to the Fedora filesystem. For help with that, start a new thread in the Networking forum and mention your running kernel and Broadcom chipset.
  1. Install the RPM Fusion repositories.
    http://rpmfusion.org/Configuration
  2. Update the system and reboot. This step potentially may take a long time and can be considered optional. But I recommend it if time and bandwidth allow it. A system update eventually needs to be done anyway, and it may avoid some kmod-ndiswrapper dependency issues if the system is up-to-date before attempting to install ndiswrapper.
    Code:
    su
    yum update
    reboot
  3. Determine the architecture of the running kernel.
    Code:
    uname -r
  4. Do this step only if you need to install the kmod version of ndiswrapper for the i686 or x86_64 kernels.
    Code:
    su
    yum install kmod-ndiswrapper
  5. Do this step only if you need to install the kmod version of ndiswrapper for the PAE kernel.
    Code:
    su
    yum install kmod-ndiswrapper-PAE
  6. Do this step only if you want to install the akmod version of ndiswrapper for any kernel.
    Code:
    su
    yum install akmod-ndiswrapper
Acquire and prepare the Windows driver
  1. Places to find the Windows driver files for the wireless card include the CD that came with the wireless card, the Internet, or Windows system folders.
  2. The files needed are the .sys and .inf files for the Windows driver.
  3. Put those two files together in one place, open a terminal, and change directories (cd) to that directory.
Install the Windows driver
Code:
su
ndiswrapper -i [driver INF filename here]
ndiswrapper -mi
IMPORTANT NOTE: That last ndiswrapper command creates the file /etc/modprobe.d/ndiswrapper. For Fedora 11 and later, that file should have a .conf ending. Give it one now and allow it to replace the previous file.
Code:
su
mv /etc/modprobe.d/ndiswrapper /etc/modprobe.d/ndiswrapper.conf
Now reboot and look in the NetworkManager panel icon for available networks (left-click the icon).

Some things to try if it doesn't work.
  1. Check the loaded kernel modules. The ndiswrapper module should be loaded, and potentially conflicting modules such as b43 or b43legacy should not be loaded...
    Code:
    lsmod | sort
  2. If ndiswrapper is not being loaded, then try manually loading it.
    Code:
    su
    modprobe ndiswrapper
    lsmod | sort
  3. If manually loading the module worked, then try the -ma option and reboot...
    Code:
    su
    ndiswrapper -ma
    IMPORTANT NOTE: That last ndiswrapper command creates the file /etc/modprobe.d/ndiswrapper. For Fedora 11 and later, that file should have a .conf ending. Give it one now and allow it to replace the previous file.
    Code:
    su
    mv /etc/modprobe.d/ndiswrapper /etc/modprobe.d/ndiswrapper.conf
  4. If a conflicting module is being loaded, then blacklist the unwanted module and reboot. Example...
    Code:
    su
    echo "blacklist b43" >> /etc/modprobe.d/blacklist.conf
    reboot
  5. Confirm that the Windows driver was installed...
    Code:
    ndiswrapper -l

The End. Good Luck.

Last edited by stoat; 14th June 2010 at 03:09 AM.