Popular Guides
View more guides at Linux Wiki Guides
Bill Giannikos
This guide is designed to help you configure a wireless controller under CentOS and Red Hat Enterprise Linux 5 which does not have any native drivers. For those that don't know, CentOS 5 and Red Hat Enterprise Linux 5 are basically the same thing just with a different name so this guide applies to both. 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 or the drivers available do not work properly with your card.
For best results you should use drivers written for Microsoft Windows XP. Vista drivers are not recommended.
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.
CentOS/RHEL 5 as standard uses a kernel with the 4K Stack option enabled. This can be a problem with NDISwrapper as many Windows driver expect a greater stack size. Unfortunately the only way around this is to compile a custom kernel. This is beyond the scope of this guide.
If you are getting random system lockups while using NDISwrapper then the 4k stack issue may be the issue. Try finding a different set of Windows drivers and see how that work.
We will be using 'nano' as our text editor of choice but you can use whatever you wish.
While this guide is mainly focused to laptop users there isn't any difference for desktop users.
You should run a full update for your installation to ensure you have all the latest packages installed.
The ndiswrapper module is not included with CentOS/RHEL so we will need to use a 3rd party repository. Here we will be using the ATrpms repository.
1. Load up a terminal window if you are in the graphic interface.
2. Switch to the root user by entering the command “su -” (without the quotes) and typing in your root password
3. Edit the file /etc/yum.conf. Using nano we type the command:
nano -w /etc/yum.conf
4. If you have already configured yum to use the ATrpms repository then append “*ndiswrapper*” to the end of the “includepkgs” line and skip the next setup. Otherwise continue on.
5. Add the following to the bottom of this file:
[atrpms] name=EL $releasever - $basearch - ATrpms baseurl=http://dl.atrpms.net/el$releasever-$basearch/atrpms/stable gpgkey=http://ATrpms.net/RPM-GPG-KEY.atrpms gpgcheck=1 enabled=1 exclude=*kmdl*i586* includepkgs=*ndiswrapper*
6. Save the file. In nano you press Ctrl-X, answer yes to the “Save modified buffer” question and then press enter on the file name to write.
7. If you have not previously setup ATrpms execute the following command:
rpm --import http://ATrpms.net/RPM-GPG-KEY.atrpms
8. Now execute the following command:
yum install ndiswrapper ndiswrapper-kmdl-`uname -r`
The ndiswrapper module is now installed.
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. Alternatively you can use our Linux Wireless Chipset Detector utility which will determine which controller you have.
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. If not then the driver from your manufacturer should work fine. You can also find a list of drivers from the NDISwrapper site.
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 two commands as root:
ndiswrapper -i <location_of_your_driver>/<the_driver>.inf ndiswrapper -l
Change the above from <location_of_your_driver> to your driver's directory and change <the_driver> to match the name of the .inf file in the driver's directory. For example a Broadcom controller is sometimes called bcmwl5.inf and is in the bcmwl folder. You would type in:
ndiswrapper -i bcmwl/bcmwl5.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 “hardware present” it is likely that you installed the wrong Windows XP driver.
Now type in:
modprobe ndiswrapper
And the wireless controller should be active. You can try to see if the controller is working by typing:
iwlist scan
This should print out a list of access points in your area.
Finally we need to tell CentOS/RHEL to load this driver each time we start the computer. Type in the following:
echo "modprobe ndiswrapper" >> /etc/rc.modules chmod 755 /etc/rc.modules
You should now have a working wireless controller.
Discussion
Hi
Good How to, work fine, but Server of ATrpms not work, alternative?
Keko
Hi There
I have succesfully installed the ndiswrapper driver for centOS 5.2 but how do i configure it so that my PC use it. I.E, DHCP or which wireless router to point it to?
Regards