Make almost any wifi card work with Ubuntu

Ubuntu's wifi support has got steadily better over the years and with Ubuntu 8.04 (Hardy Heron) it's safe to say that the majority of wifi devices will work fine. However, if you find that yours doesn't (you'll know because it will be like no wifi hardware is installed), help is at hand in the form of Ndiswrapper.

This lets you use Windows XP wifi drivers under Ubuntu. As you can imagine, it's something of a hack and doesn't always work, although in most cases the results are very good.

The steps below walk you through what's needed to get XP wifi drivers working under Ubuntu. The guide is split into three sections: Identifying your wifi card make and model; sourcing the Windows driver and extracting the driver file components; and finally installing the Windows XP driver files.

Identifying the wifi card hardware

To source the correct driver for your wifi hardware it's necessary to find out its make and model. However, you don't need the make and model listed on the box or in the specification list. You must find out who actually manufactured the hardware, which will probably be different from the company that sold it (particularly with more inexpensive hardware). You must also find out the PCI ID number, which is how operating systems like Ubuntu and Windows refers to the card on a technical level.

1. Open a terminal window and type the following: $ lspci -vv -nn|less -i

This will list the hardware on your system connected through the PCI bus (which is practically all of it). The command options specified cause lspci to return more information (-vv) and cause the vital PCI ID numbers to be returned too (-nn).

2. Hit the forward slash (/) to search and type wireless. Then hit [Enter]. If you find no result, hit forward slash again and search for wlan. If you still get no results, try searching for 802.11. These are the common terms used to describe wifi hardware. When you get a match, use the up/down cursor keys to scroll so you see the entire entry for that device (each entry is separated from the others in the list by a blank line). Make a note of the make and model name listed on the first line.

3. Following this, look at the end of the same line for a pattern of numbers and letters that look like [168c:0013]—four digits, a colon, and then four more digits (the digits are hexadecimal, if knowing that helps you identify them). Write these down too. See Figure 3.46, on the following page for an example taken from my test PC with the relevant parts of the entry in the listing highlighted. Be careful not to get the details mixed up with the Subsystem line.

Sourcing the Windows XP driver

Finding the Windows XP driver isn't too difficult. The easiest way of doing it is to head over the Ndiswrapper website and browse their database of cards, which links to the download sites of drivers known to work. Of course, you'll need to do this using a computer that can get online (assuming your Ubuntu computer is presently unable to for lack of wifi drivers), and the easiest way of doing this is simply to boot into your Windows partition.

File Edit View Terminal Tabs Help

01:06.0 Ethernet controller [0200]: Itiprotocol MAC/baseband processor

Atheros Communications inc. AR5212/AR5213 Mu 168c:0013

rev 01)

Subsystem: Global Sun Technology Inc Trust Speedshare Turbo Pro PCI Adapter [16ab:7302]

Control: I/O- Hemt BusHastert SpecCycle- MemWINV- VGASnoop- ParErr- Step ping- SERR- FastB2B-

Status: Cap+ 66tfHz- UDF- FastB2B+ ParErr- DEVSEL=mediuflt >TAbort- <TAbort

Latency: 168 [2500ns min, 7000ns max), Cache Line Size: 32 bytes Interrupt: pin A routed to IRQ 20

Region 0: Memory at fdee0000 (32-bit, non-prefetchable) [size=64K] Capabilities: <access denied>

01:09.0 FireWire (IEEE 1394) [0c00]: VIA Technologies, Inc. IEEE 1394 Host Contr oiler [1106:3044] (rev 80) (prog-if 10 [OHCI])

Subsystem: DFI Inc Unknown device [15bd:1006]

Control: 1/0+ Heifti BusMastert SpecCycle- MemWINV- VGASnoop- ParErr- Step pingi" SERR- FastB2B-

Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=raedium >TAbort- <TAbort

Latency: 32 [8000ns max), Cache Line Size: 32 bytes Interrupt: pin A routed to IRQ 21

Figure 3.46: Identifying a wifi card's name, model number and PCI ID (see Tip 276, on page 316)

Once you've found the correct driver file, you must extract the components you need.

The following instructions describe how all of this is done:

1. Use a web browser to head over to http://ndiswrapper.sourceforge. net. Once there, click the Documents/Wiki link on the left, and then click the link that reads List of cards known to work. On the following page click the entry in the alphabetical list that refers to the first letter of the manufacturer details you discovered earlier.

2. In the listing page that appears, search using the PCI ID number you noted earlier. Note that you shouldn't include the square brackets surrounding the numbers and letters. The details from my test PC were [168c:0013], so I searched for 168c:0013.

3. It's likely more than one entry in the list will match, so you should then check the details listed in the Card: and Chipset: components of the website listing against the manufacturer and model details you wrote down earlier. Try and get the best match possible. Some entries in the Ndiswrapper website list might even refer to the make and model of computer the wifi card is used in. Once you find a match, click the link provided to download the driver. Avoid any drivers marked as x86_64 in the list—these are designed to work on 64-bit versions of Linux (unless you have the 64-bit version of Ubuntu installed, of course, although this is unlikely unless you specifically opted to).

4. Once you have the driver file, you must extract the necessary driver components from it. To be frank, this is easier done using Windows rather than Ubuntu, so if you don't already have Windows up and running, copy the driver installation file to your Windows desktop and then boot into Windows. Once Windows has started, download a program called Universal Extractor from This is a clever open source program that's able to extract files from just about any archive file, including Windows setup executable files (.exe). Once it's downloaded and installed, right-click the Windows XP driver file and select UniExtract to Subdir. This will create a new folder containing the individual driver files.

5. The files you want will probably be in a folder named WinXP, Win-dowsXP, or similar. If you've ever installed hardware drivers in Windows this will sound familiar, although the folder might be called ndis5x or similar. In the folder, look for .inf files. If you're in luck there will be only one, and you can skip straight to the last step in this section. If there's more than one then you'll need to search through each until you find the correct one.

6. Open the first .inf file in Windows Notepad by double-clicking it. Click Edit ^ Find and search for the first part of PCI ID you noted earlier. For example, the whole PCI ID number on my test PC was 168c:0013, so I searched for 168c. If you find no match, close the file and move onto the next .inf file. If you do find a match, look further along that particular line and look for the second part of the PCI ID. It will probably be next to the word DEV_. If you find a match then congratulations! You've found the .inf file you need.

7. Copy the .inf file to a new folder, along with any .sys and .bin files you find in the driver folder (you may not find .bin files). Any other files can be ignored. You now have all you need to install the XP driver under Ubuntu but don't reboot just yet. First you'll need to grab some package files from the Ubuntu repositories. Installing the XP driver files

As mentioned, installing the XP drivers is easy but first you'll need to download and install the Ndiswrapper configuration software (the actual Ndiswrapper system software is already installed out-of-the-box on Ubuntu). The following steps describe all the steps needed to install the driver:

1. Type the following addresses in the address bar of your browser. Each will cause a file to be downloaded: ^ ndi swrapper-utils-1.9_1.50-1ubuntu1_i 386.deb n/n/ndi swrapper/ ^ ndiswrapper-common_1.50-1ubuntu1_all.deb n/n/ndi sgtk/ndi sgtk ^ _0.8.3-1_i386.deb

2. Reboot into Ubuntu and copy the XP driver files to the desktop, plus the three system software packages you downloaded. Open a terminal window and type the following to install the software:

3. Once installation has finished, click System ^ Administration ^ Wireless Network Drivers. Once the program window appears, click the Install New Driver button.

4. A dialog box will appear prompting for the location of the .inf file. Click the Location dropdown to open a file browsing window and navigate to navigate to the .inf file. Then click the Install button.

5. In the Wireless Network Drivers program window, you will now see your wireless hardware listed on the left of the window. Hopefully, beneath it will be listed the words Hardware present: yes, as shown in Figure 3.47, on the next page. If you see Hardware present: no, you have an incompatible driver. Select the hardware in the list and click Remove Driver. Then repeat the steps above to download an alternative driver.

Following this your wifi hardware will be immediately available for configuration using NetworkManager at the top right of the desktop. You can close the Wireless Network Drivers window, and delete the driver and package files from the desktop.

Figure 3.47: Confirming correct installation of the Windows XP wifi driver (see Tip 276, on page 316)

Was this article helpful?

0 0

Post a comment