Configuring the ndiswrapper module for wireless controllers without native Linux drivers

Author(s)

Bill Giannikos

Editing This Page

If you would like to edit this page please first view our Editing Guidelines.

Introduction

This guide is designed to help you configure a wireless controller under Linux which do not have any native drivers. Thanks to the ndiswrapper module, you are able to run drivers written for Microsoft Windows XP/2000 under Linux. This method should only be followed if there are no native drivers available for your wireless controller.

Important Notes

Windows driver version

You should use drivers for Windows XP and if no drivers are available for XP then use drivers for Windows 2000. Drivers written for Windows Vista are not yet supported under ndiswrapper yet.

64bit Linux

When installing the Windows drivers with ndiswrapper, you will need to install drivers which match the architecture of your Linux distribution. So you will install 32bit Windows drivers when using 32bit Linux and 64bit Windows drivers when using 64bit Linux. Unfortunately many manufactures have not release drivers for the 64bit version of Windows XP so your only recourse would be to reinstall a 32bit version of Linux.

4K Stack Kernels

You should avoid using a kernel with the 4k stack option enabled. Some Windows drivers need stack sizes greater than 4K which may result in kernel panics.

Some Linux distributions (namely Fedora, CentOS and Red Hat Enterprise Linux) come with the 4K stack option in the kernel enabled by default. See further down this page on how to manage this.

Installing ndiswrapper

CentOS/Red Hat Enterprise Linux 5.0

With default kernel

Warning: Using the default kernel, with 4K stacks, may result in random crashes of the kernel (see above for details). If you begin to experience random lockups follow the 'Using an alternative kernel' instructions below.

NDISwrapper is not included with CentOS/Red Hat Enterprise Linux 5.0 so we will need to use a 3rd party repository. Here we will be using the ATrpms repository.

If you are not currently using the ATrpms repository then, as root, add the following lines to the bottom of your /etc/yum.conf file:

[atrpms]
name=CentOS $releasever - $basearch - ATrpms
baseurl=http://dl.atrpms.net/el$releasever-$basearch/atrpms/stable
gpgkey=http://ATrpms.net/RPM-GPG-KEY.atrpms
gpgcheck=1

Then execute the following command:

yum install ndiswrapper-kmdl-`uname -r` ndiswrapper

And that's it, ndiswrapper is now installed ready to be configured.

Using an alternative kernel

Unfortunately if you need to use a 8K stack kernel then the only real option you have is to compile your own kernel. This is out of scope for this document but there are plenty of guides on doing just this. You should then follow the 'Generic Method' section below to complete the ndiswrapper installation.

Debian GNU/Linux 4.0 (Etch)

Installing the version of ndiswrapper included with Debian

Log in as root and execute the following commands:

apt-get install linux-headers-`uname -r`
apt-get install build-essential
apt-get install ndiswrapper ndiswrapper-utils-1.9 wireless-tools
apt-get install ndiswrapper-source module-assistant
m-a prepare
m-a a-i ndiswrapper

You should now have ndiswrapper installed and ready to use.

Installing the latest version of ndiswrapper

Log in as root and execute the following commands:

apt-get install linux-headers-`uname -r`
apt-get install build-essential

You should now follow the Generic Method guide below.

Fedora Core 6

With default kernel

Warning: Using the default kernel, with 4K stacks, may result in random crashes of the kernel (see above for details). If you begin to experience random lockups follow the 'Using an alternative kernel' instructions below.

NDISwrapper is not included with Fedora Core 6 so we will need to use a 3rd party repository. Here we will be using the ATrpms repository.

If you are not currently using the ATrpms repository then, as root, add the following lines to the bottom of your /etc/yum.conf file:

[atrpms]
name=Fedora Core $releasever - $basearch - ATrpms
baseurl=http://dl.atrpms.net/fc$releasever-$basearch/atrpms/stable
gpgkey=http://ATrpms.net/RPM-GPG-KEY.atrpms
gpgcheck=1

Then execute the following command:

yum install ndiswrapper-kmdl-`uname -r` ndiswrapper

And that's it, ndiswrapper is now installed ready to be configured.

Using an alternative kernel

Unfortunately if you need to use a 8K stack kernel then the only real option you have is to compile your own kernel. This is out of scope for this document but there are plenty of guides on doing just this. You should then follow the 'Generic Method' section below to complete the ndiswrapper installation.

Fedora 7

With default kernel

Warning: Using the default kernel, with 4K stacks, may result in random crashes of the kernel (see above for details). If you begin to experience random lockups follow the 'Using an alternative kernel' instructions below.

NDISwrapper is not included with Fedora 7 so we will need to use a 3rd party repository. Here we will be using the ATrpms repository.

If you are not currently using the ATrpms repository then, as root, add the following lines to the bottom of your /etc/yum.conf file:

[atrpms]
name=Fedora $releasever - $basearch - ATrpms
baseurl=http://dl.atrpms.net/f$releasever-$basearch/atrpms/stable
gpgkey=http://ATrpms.net/RPM-GPG-KEY.atrpms
gpgcheck=1

Then execute the following command:

yum install ndiswrapper-kmdl-`uname -r` ndiswrapper

And that's it, ndiswrapper is now installed ready to be configured.

Using an alternative kernel

Unfortunately if you need to use a 8K stack kernel then the only real option you have is to compile your own kernel. This is out of scope for this document but there are plenty of guides on doing just this. You should then follow the 'Generic Method' section below to complete the ndiswrapper installation.

Gentoo Linux 2007.0

For best results, make sure you do not compile the kernel with the 4K stack option enabled. It is disabled by default.

It's very easy to install ndiswrapper in Gentoo, as root execute the following command:

emerge wireless-tools ndiswrapper

And that's it, ndiswrapper is now installed ready to be configured.

Mandriva Linux 2007

It's very easy to install NDISwrapper in Mandriva. As root, execute the following:

urpmi ndiswrapper

And that's it, ndiswrapper is now installed ready to be configured. You can also install ndiswrapper using the Mandriva Control Center.

SuSE Linux 10.1

It's very easy to install NDISwrapper in SuSE. First load up YAST and choose the 'Software' option from the categories on the left hand side. Now select “Software Management” on the right hand side. Finally do a search for 'ndiswrapper' and install the package.

And that's it, ndiswrapper is now installed ready to be configured.

Ubuntu/KUbuntu/XUbuntu Linux 7.04

It's very easy to install NDISwrapper in Ubuntu. Open up a terminal window and execute the following:

sudo apt-get install ndiswrapper-utils-1.9

And that's it, ndiswrapper is now installed ready to be configured.

Generic Method

You will need to ensure you have the correct kernel headers installed for the kernel you are currently running. How to do this varies depending on your distribution so we wont cover it here.

Next download the latest version of ndiswrapper. In the example below we are using 1.45 but substitute the version number with the one you have.
Now log in as root and run the following:

cd /usr/local/src
tar -xzvf ndiswrapper-1.45.tar.gz
cd ndiswrapper-1.45
make
make install

You should now have ndiswrapper installed and ready to use.

Configuring ndiswrapper

First find out which wireless controller you have in your system. This website should provide you with details on which card you have in your laptop but another way to check is by using the lspci command. Look for a line which has 'Network controller' in it. You will likely have two of these lines, one is your wireless controller while the other is your wired controller. It should be fairly straight forward to determine which is your wireless controller.

Download the Windows XP driver which is appropriate for your wireless controller. This website should recommend a driver to use based on the laptop you are using. Alternatively you can use our Linux Wireless Chipset Detector utility which will determine which controller you have.

Extract the contents of your driver. If you have an .exe file, you will need to use either cabextract or unshield to extract its contents. If you have a zip file just use unzip.

Now execute the following commands as root:

ndiswrapper -i <location_of_your_driver>/<the_driver>.inf
ndiswrapper -l

The last line should print out a list of the installed drivers. You should also see “hardware present” printed next to your driver, if you do not see this it is likely that you installed the wrong Windows XP driver.

Conclusion

There you have it. Your distribution should now be able to see a wireless controller and be able to configure it.


Discussion

Olkin, 2009/01/30 10:14

On “Configuring ndiswrapper” step I've used unzip command to extract content of driver with .exe extension (cabextract and unshield were not working).

Enter your comment. Wiki syntax is allowed:
If you can't read the letters on the image, download this .wav file to get them read to you.
 
configuring_the_ndiswrapper_module_for_wireless_controllers_without_native_linux_drivers.txt · Last modified: 2009/09/22 14:07 by 68.119.66.239
Contact Us Sister Sites Privacy Policy Terms of Use
Copyright © 2006-2013 Linwik.com and other authors