5.4. My Wireless Card Works on Another Operating System, but Not Linux
Personally, I'm rather annoyed with the current state of wireless connections from Linux. With precious few exceptions, you can't just plug and play an 802.11g card on a Linux laptop computer. As we move toward Intel's "World Without Wires," Linux is going to have to handle 802.11a/b/g and even "WiMAX" (802.16) network cards seamlessly. But for the immediate future, Linux geeks will often have to download and compile experimental drivers. If you take this approach, you'll have to recompile the kernel with modules every time you upgrade the kernel.
Fortunately, the need for Linux wireless card drivers has the attention of the hacker community. As of this writing, 4 of the top 10 Linux kernel projects listed on SourceForge are focused on specific wireless chipsets. I've managed to download and install "alpha" drivers on my laptop computer fairly easily. But it did require that I recompile my kernel. If this is too time-consuming, proprietary help is available from Linuxant (which happens to taint your kernel). A number of the hacking approaches are based on using an NDIS wrapper around an existing Windows XP driver. You'll need to configure your kernel source code with loadable modules. I cover recompiling the kernel in "Recompiling the Kernel" in Chapter 7.
As for packages, make sure you've loaded the appropriate wireless-tools RPM or DEB package. If you're working with a wireless PCMCIA card on a Linux 2.4 kernel, you'll also need the kernel-pcmcia-cs associated with your current kernel. If you're running a Linux 2.6 kernel, the PCMCIA tools are integrated into the kernel source code.
The main sponsor of Linux wireless network cards is Absolute Value Systems. You can browse the work they've collected online at http://www.linux-wlan.com. The basic database of wireless cards and their Linux status is available online at http://www.linux-wlan.org/docs/wlan_adapters.html.gz. Another great resource is maintained at http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Wireless.html.
As of this writing, precious few cards support the linux-wlan project. If possible, purchase these cards. Your budget will go toward companies that support Linux, and you're more likely to have trouble-free installations; many of these cards are described in the aforementioned databases.
If you're willing to use Microsoft Windows drivers, one more alternative is the NdisWrapper project, available online at http://ndiswrapper.sourceforge.net.
5.4.1. Identifying the Wireless Card
If Linux doesn't automatically detect your wireless card, you'll first need to identify it. What you see on the package may not correspond to the actual chipset in the card. When you find drivers for your card, you need to know the chipset.
If detected, you should be able to find the card in the output from the lspci -v or scanpci commands. If you have a Red Hat distribution, you might also find it in the /proc/pci file. The output is fairly straightforward; for example, the lspci -v command on my desktop computer gives me the following information about my wireless card:
01:0d.0 Network controller: Texas Instruments ACX 111 54Mbps Wireless Interface Subsystem: Abocom Systems Inc: Unknown device ab90 Flags: bus master, medium devsel, latency 64, IRQ 9 Memory at f4102000 (32-bit, non-prefetchable) [size=8K] Memory at f4120000 (32-bit, non-prefetchable) [size=128K] Capabilities:  Power Management version 2
As you can see, this is an 802.11g wireless card, based on the Texas Instruments ACX 111 chipset. It's actually a card from another manufacturer, who uses the TI ACX 111 chipset, which I got at a discount store. (As of this writing, that particular chipset is proprietary.) Shortly, I'll show you what I did to install open source drivers for this card.
If you have a PCMCIA card, you should see it detected in the output from the cardctl ident or pccardctl ident command. You may not be so fortunate. As described earlier in the "Linux Won't Work with All My Hardware" annoyance, older Linux 2.6 kernels have had trouble with respect to managing power and some wireless network cards. In that case, you might not even see output from the card. If your kernel and card are not affected by this problem, you may get specific output. For example, I got specific output from one laptop:
Socket 0: product info: "Realtek", "Rtl8180" manfid: 0x0000, 0x024c function: 6 (network)
But less output from another:
Socket 0: no product info available manfid: 0x0007, 0x0082
Fortunately, if you can identify the controller and chipset from the PCI interfaces, you're set. If Linux doesn't detect your card at all, there are alternatives.
5.4.2. Finding Drivers
If you're fortunate, the drivers for your wireless card are included with your Linux distribution and were detected during installation of the native network configuration tools. But this is not the case for the majority of wireless network cards. In this case, you'll need to find and probably install drivers on your own. There are several basic steps to this process:
5.4.3. Installing Developmental Drivers
In many cases, if you want to get a wireless network card working on your Linux computer, you'll need to install developmental drivers. Often, these beta- (and even alpha-) level drivers work as well as any stable kernel module. I've installed alpha drivers from a TI ACX100 SourceForge project to enable wireless "no name" cards with this chipset on my laptop and desktop computers.
Generally, you'll need the tools associated with compiling the kernel to install developmental drivers. I go into detail on basic requirements in Chapter 7. While most software for the major Linux distributions is compiled into binary RPM and DEB packages, test software is often available only as compressed archives in tar.gz or tar.bz2 formats. You need to know how to decompress such packages. For example, when I downloaded drivers for the ACX100 chipset, I downloaded a package named acx100-0.2.0pre8_plus_fixes_37.tar.bz2, which I then unpacked in my home directory with the following command:
tar xjvf acx100-0.2.0pre8_plus_fixes_37.tar.bz2
Alternatively, if the package were in tar.gz format, I'd use a command such as tar xzvf acx100-0.2.0pre8_plus_fixes_37.tar.gz. But I won't go into detail, as these are basic skills for the Linux geek. The result is unpacked to a subdirectory with the same filename. For example, if I downloaded to the /home/michael directory, I'd find the source for the wireless drivers in the /home/michael/acx100-0.2.0pre8_plus_fixes_37 subdirectory.
5.4.4. Compiling the Drivers
If you've installed the source code associated with the current kernel and configured loadable modules, you should be able to compile the downloaded wireless drivers into your kernel. The basic steps vary and should be documented in a file such as INSTALL or README in the driver package. There are three basic steps:
5.4.5. Starting the System
Next, you'll have some sort of script to activate your wireless card. If you've installed drivers from an RPM or a DEB package, the script commands may already be installed. Run the script as documented in the package. To make sure the script runs the next time you boot Linux, you'll need to add it to a user start script. Standard administrator configurable start scripts vary by distribution; start scripts for our three distributions are shown in Table 5-4.
If the file in question does not yet exist, you'll need to create it. Start with the command for your preferred shell; the following works for the default bash shell:
Then proceed with the full path to the script that activates your wireless card. Alternatively, if you've loaded modules, you'll want to make sure they load the next time you boot, by adding desired modules to /etc/modules.conf or /etc/modprobe.conf. Debian discourages direct editing of this file; you can configure modules in this distribution in one of the files in the /etc/modutils directory.