How to Install Windows Wireless Network Device Drivers in Ubuntu
NdisWrapper is effectively an open-source driver (technically described as a kernel module) that allows Linux to use standard Windows XP drivers for wireless network devices. You might describe NdisWrapper as being a translation layer between the Linux kernel andthe Windows drivers, which can be installed using NdisWrapper's configuration tools.
You should only use NdisWrapper in one of two situations:
- Your wireless network hardware simply isn't recognized by Ubuntu, which is to say, all you see when you click the NetworkManager icon is a Manual Configuration option; you don't see any wireless networks listed. Of course, you should first ensure that the wireless hardware in your computer is actually switched on - some notebooks offer the facility to deactivate it to save battery life.
- Your network hardware is recognized by Ubuntu but fails to work correctly or adequately when you configure it. Perhaps it is unable to associate with wireless base stations, for example, or maybe you can't connect to WPA-enabled base stations and consider WEP too insecure for your surroundings. If this is the case, in addition to installing NdisWrapper, you’ll need to undertake an additional step in order to blacklist the existing Ubuntu driver.
Using NdisWrapper is relatively simple and just a handful of commands are required. However, getting hold of the necessary Windows driver files is harder work because, unfortunately, NdisWrapper isn't designed to work with the usual method of driver distribution: .exe files. Instead, NdisWrapper needs the specific .inf and .sys files that constitute the driver - effectively, the Windows system files. These are contained within the .exe file and must be manually extracted.
NOTE: Sometimes drivers are distributed as .zip files, in which case the relevant files are easy to get at. Keep your fingers crossed that this will be the case for your particular hardware!
NdisWrapper is far from perfect. Not all wireless devices have been proven to work with it, and it's not necessarily the case that a driver available for Windows will work under Linux. Sometimes trial and error is required. Annoyingly, Windows drivers sometimes appear to work but then prove unreliable. Some might stop working. Some might even crash your system. The best plan is simply to give it a try.
In the instructions in this section, we explain how to make an Atheros AR5008 wireless network device that’s built into an Apple MacBook work under Ubuntu using NdisWrapper. The instructions remain essentially the same for all types of wireless network hardware. However, some specific details, such as download addresses, will obviously differ.
First, you'll need to install the NdisWrapper software, and then you can install the necessary Windows drivers. These steps will make your wireless network device available under Ubuntu. Then you can follow the instructions in the previous section to connect to that wireless network.
Installing the NdisWrapper Configuration Tools
NdisWrapper consists of two components: a kernel module and configuration tools. The kernel module comes as part of the default kernel package, so is installed by default, but you will need to download and install the configuration tools manually. To do so, using another computer that is already online (or by switching to Windows XP if you dual-boot), visit the following addresses using a web browser:
http://us.archive.ubuntu.com/ubuntu/pool/main/n/ndiswrapper/ndiswrapper-utils-1.9_1.50-1ubuntu1_i386.deb
http://us.archive.ubuntu.com/ubuntu/pool/main/n/ndiswrapper/
ndiswrapper-common_1.50-1ubuntu1_all.deb
http://us.archive.ubuntu.com/ubuntu/pool/main/n/ndisgtk/ndisgtk_0.8.3-1_i386.deb
You'll be prompted to download these files. Save the files to a floppy disk or USB memory stick, or burn them to a blank CD-R/RW disk. Then, on the Ubuntu computer, copy the downloaded files to the desktop.
Next, open a terminal window (Applications > Accessories > Terminal), and type the following, which will install the new software:
cd ~/Desktop
sudo dpkg -i ndis*
You'll need to enter your password when prompted. When the commands have finished, and you see the command prompt again, close the terminal window.
Installing the Windows XP Drivers
Once the NdisWrapper configuration software is installed, you can install the Windows XP wireless network device drivers. There are several parts to the procedure:
- Identify the wireless network hardware, and then source the appropriate Windows driver.
- Extract the necessary .sys and .inf files from the driver archive (and possibly .bin files, although this is rare).
- You may need to blacklist the built-in Ubuntu driver, so that NdisWrapper can associate with the hardware.
- Use the NdisWrapper configuration tool to install the Windows driver.
These steps are covered in the following sections. You will need another computer that's already online to download some files and check the NdisWrapper web site for information. If your computer dual-boots, you can use your Windows setup to do this.
Identifying Your Wireless Network Hardware and Sourcing Drivers
To identify the wireless network hardware for use with NdisWrapper, it's necessary to discover two pieces of information: the make and model of the hardware and the PCI ID number. The former is the make and model of the hardware, as identified by Ubuntu as a result of system probing, rather than what’s quoted on the packaging for the wireless network device or in its documentation. These details discovered by Ubuntu will usually relate to the manufacturer of the underlying components, rather than the company that manufactured the hardware. The PCI ID is two four-digit hexadecimal numbers used by your computer to identify the device internally. The same PCI ID numbering system is used by both Windows and Ubuntu, which is why it's so useful in this instance.
You can find both the PCI ID and the make/model information using the Device Manager tool. Then follow these steps:
1) Select Applications > System Tools > Device Manager. In the left column, find the entry that reads Network Controller, Networking Wireless Control Interface, or WLAN Interface. You might also look for USB Interface, PCI Bridge, or 802.11 to exhaust your search. Then look at the corresponding summary in the right column, where you'll find the make and model of the hardware listed under the Vendor and Model headings. If no useful details are listed, you might need to click the parent entry in the list. On one test system, we found the WLAN Interface entry, but saw the make and model details only after we clicked the Ethernet Controller parent entry in the list on the left.
2) Write down the make and model shown in Device Manager. For example, on a test notebook containing an Atheros wireless network device, the make and model read "AR5418 802.11abgn Wireless PCI Express Adapter". Remember that these details don't relate to those listed in the instruction manual or computer packaging (our notebook’s specification lists the hardware simply as "Built-in AirPort Extreme Wi-Fi"). This is because Ubuntu is identifying the hardware generically, reading information from its component hardware.
3) Click the Properties tab of Device Manager (if this isn't visible, click View > Device Properties) and look through the information there for a line that begins info.udi. Look at the end of the line, and make a note of the two sets of characters that are separated by an underscore and preceded by pci_. Look at the image for an example taken from our test machine. Yours may differ, but the line should always end with pci_ and then the digits. If it doesn't, you have selected the wrong entry in the list of devices on the left. Try examining a different entry, such as the parent of the entry in the list.

4) Write down the characters following pci_ at the end of the info.udi line. Written alongside each other, the two sets of digits that are separated by an underscore form the all-important PCI ID number. In written form, they're usually separated by a colon. If either of the sets of letters or numbers is less than four characters long, simply add zeros before them in order to make four characters. For example, in the above image, the end of the info.udi line reads 168c_24. We add two zeros before 24, making a complete PCI ID of 168c:0024. On another test PC, the end of the line read 168c_13. Adding two zeros before the 13 gives a PCI ID of 168c:0013.
5) Using another computer that's able to go online, visit http://ndiswrapper.sourceforge.net/. On the main menu, click Documents/Wiki, and then click the List of Cards Known to Work link. This is a community-generated listing of the wireless network devices that have been proven to work with NdisWrapper.
6) The "known to work" cards are grouped in alphabetical order. Select the appropriate list based on the card manufacturer’s name. (Remember to use the name you discovered using Device Manager in steps 1 and 2, and not the official name in the computer's manual or packaging.)
7) Using the search function of your browser (Ctrl+F within Firefox), look for the PCI ID number you noted earlier, in the format described in step 4. For the example in the above image, we would search for 168c:0024. In the list, look to match the following things, presented in order of importance:
- The PCI ID
- The model name of the wireless hardware, as reported by Device Manager (listed on the Summary tab)
- The manufacturer and model of the notebook, as mentioned on its case or within its documentation
It's likely many entries in the list may match your PCI ID, so search until you find the one that best matches the model of the hardware. If there are still many matches, search until you find an entry that matches the manufacturer and model of the notebook. You might not be lucky enough to find an exact match for the notebook manufacturer and model, however, and you might need to select the most likely choice. Use your common sense and judgment. If your notebook is manufactured by Asus, for example, but you can't find the drivers for the exact model, then choose drivers for another Asus model.
Caution: Watch out for any mention of x86_64 in the description of the driver file. This indicates the entry in the list relates to 64-bit Linux.
Look within the entry in the list for a direct link to the driver file. Sometimes this isn't given, and a manufacturer web site address will be mentioned, which you can visit and navigate through to the driver download section (usually under the Support section within the web site). Download the Windows XP driver release.
Extracting the Driver Components
Once the drivers are downloaded, you'll need to extract the .sys and .inf file relevant to your wireless network hardware. These are all that NdisWrapper needs, and the rest of the driver files can be discarded. However, extracting the files can be hard to do, because often they're contained within an .exe file. (Most driver .exe files are actually self-extracting archive files.) Additionally, the driver file might contain drivers for several different models of hardware, and it's necessary to identify the particular driver .inf file relevant to your wireless network device.
If the driver you've downloaded is a .zip file, then your task will probably be much easier. Simply double-click the downloaded .zip file to look within it for the directory containing the actual driver files.
If the driver is an .exe file, it's necessary to extract the files within it. With any luck you might be able to do this using an archive tool like WinZip (www.winzip.com), assuming that you've downloaded the file using Windows. Simply open the archive using the File > Open menu option within WinZip. You may have to select All Files from the File Type drop-down list in order for the .exe file to show up in the file list. However, if you're using Windows, we recommend an open-source and free of charge program called Universal Extractor, which can be downloaded from www.legroom.net/software/uniextract. This program can extract files from virtually every kind of archive, including most driver installation files. Once it is installed, simply right-click the installation .exe file, and select UniExtract to Subdir. This will then create a new folder in the same directory as the downloaded file, containing the contents of the installer file.
Once you've extracted the files within your downloaded driver file, look for the files you need. It's likely those driver files will be contained in a folder called something like Driver or named after the operating system, like Win_XP. Once you've found the relevant directory, look for .inf, .sys, and .bin files (although you may not find any .bin files; they're used in only a handful of drivers). You can ignore any other files, such as .cab and .cat files. Click and drag the .inf, .sys, and .bin files to a separate folder.
The task now is to find the .inf file for your hardware. If there's more than one, you'll need to search each until you find the one you need. You need to look for text that corresponds to the PCI ID you noted earlier. Open the first .inf file in a text editor (doubleclicking will do this in Windows), and using the search tool, search for the first part of the PCI ID, as discovered earlier. For the example in the image on the previous page, we would search for 168c. If you don't find it within the file, move on to the next .inf file, and search again. When you get a search match, it will probably be in a long line of text and to the right of the text VEN_.
Then look further along that line to see if the second part of the PCI ID is mentioned, probably to the right of text that reads DEV_. In the case of the driver file we downloaded for the example, the entire line within the .inf file read as follows (the two component PCI ID parts are shown in bold):
%ATHER.DeviceDesc.0023% = ATHER_DEV_0023.ndi, PCI\VEN_168C&DEV_0024
If you find both component parts of the PCI ID in the line, as in this example, then you've found the .inf file you need. (In fact, you'll probably find many lines matching what you need, which is fine.)
You must now transfer the .inf file, along with the .sys and .bin files (if any .bin files were included with the driver) to the computer on which you want to install the drivers. This can be done by putting them onto a floppy disk, by burning them onto CD, or by using a USB memory stick. Create a new directory called driver on the desktop and save them there.
Your procedure from this point depends on if Ubuntu recognized your wireless networking device when you first booted but was unable to make it work correctly. If it did then you will need to blacklist the built-in driver, so that NdisWrapper can associate with the hardware. If the device wasn't recognized, you can skip straight to the "Using NdisWrapper to Install the Drivers" page.
Blacklisting Existing Drivers
To blacklist the existing built-in driver that didn't work with your wireless device, you need to find out the name of the kernel module and then add it to the /etc/modprobe.d/ blacklist file. Here are the steps:
1) Open Device Manager (System > Administration > Device Manager), and select the entry in the list for your wireless network device. This is the one you discovered in steps 1 and 2 earlier, on the "Identifying Your Wireless Network Hardware and Sourcing Drivers" page.
2) Click the Properties tab (if this isn't visible, click View > Device Properties), and look for the line that begins info.linux.driver. Then look in the value column, and make a note of what's there. For example, on our test notebooks, the value column read rt2500usb. Close Device Manager.
3) Open a terminal window (Applications > Accessories > Terminal). Type the following to open the blacklist configuration file in the Gedit text editor:
gksu gedit /etc/modprobe.d/blacklist
4) At the bottom of the file, type the following on a new line:
blacklist modulename
Replace modulename with the name of the module you discovered earlier. For example, on our test system, we typed the following (as shown in the image):
blacklist rt2500usb

5) Save the file, and then reboot your computer.
You should now find that the wireless network device is no longer visible when you click the NetworkManager icon, and all you see is a Manual Configuration option. This is good, because it means the hardware no longer has a driver attached, and you can now tell NdisWrapper to use the hardware.
Using NdisWrapper to Install the Drivers
On the Ubuntu computer on which you wish to install the drivers, you should now have the .inf file from the previous steps, plus the .sys and possibly .bin files that constitute the driver. You should have copied these files from the removable storage device into a new folder on your desktop named driver.
Note: If you ve used a USB memory stick to transfer the files, it should appear automatically on the desktop as soon as it's inserted. When you've finished with it, right-click the desktop icon, and select Unmount. You must do this before physically removing any kind of USB memory device, as explained later in this guide.
To install the driver using NdisWrapper, follow these instructions:
1) Click System > Administration > Windows Wireless Drivers. Enter your password when prompted.
2) Click the Install New Driver button.
3) The Install Driver dialog box appears, prompting you to select the .inf file for your wireless device. Click the Location drop-down list to open a file browsing dialog box.
4) Navigate to the .inf file you copied to your system, which you have placed in the driver folder on your desktop. Double-click the desktop folder, and then doubleclick the driver folder listed in the right column. Select the .inf file you copied in the driver folder and then click the Open button.
5) Back in the Install Driver dialog box, click the Install button.
6) At this point, you should see the driver listed at the left column of the Wireless Network Drivers dialog box. It specifies the name of the driver installed and whether the hardware is installed. If it says the hardware isn’t installed, you've probably selected the wrong .inf file, or might be using the wrong driver file. Return to the previous sections and try to get an alternative Windows driver.
7) No reboot is necessary and your wireless network card should work immediately. To test if the driver works, click the NetworkManager icon and see if there are wireless networks listed. If it works, click Close to exit the Wireless Network Drivers dialog box.
Following this, you should find the network device is available for configuration. Follow the earlier instructions for connecting to a wireless network.
Removing NdisWrapper Drivers
As mentioned earlier, although NdisWrapper can solve a lot of headaches with nonworking wireless hardware, it isn't perfect. You might find that the Windows driver you install simply doesn't work. In such a case, you can download a different version of the driver and try again. But first you'll need to remove the existing driver.
Select Click System > Administration > Windows Wireless Drivers and enter your password when prompted. In the Windows Network Drivers dialog box, select the driver you want to remove in the left column and click Remove Driver. Click Yes when prompted to confirm the removal. Click Close to exit the tool.
Tags: drivers,kernel,pci,wep,wpa,wireless,wifi
Related Articles