Connecting to a Wireless LAN with Linux, Part 1

By: Carla Schroder
Sunday, January 30, 2005 07:40:48 PM EST
URL: http://www.linuxplanet.com/linuxplanet/tutorials/5728/1/

The Hardware Hokey-Pokey

Wireless hardware for Linux is a moving target. The wireless network adapter that worked fine with Linux yesterday may be released with an unsupported radio chipset today, and with no indication of the change. So buyer beware--always confirm the chipset before you buy. The good news is a lot of wireless adapters have native Linux support, and for those that don't, the NdisWrapper utility lets you use the Windows drivers on your Linux box.

The adapters to look for are based on Prism radio chipsets. The 802.11b chipsets are best-supported and easiest to use; drivers are included in the Linux kernel, and they should work out of the box if you selected the right package group--usually "laptop"--at installation.

There are Linux drivers and utilities for CiscoAironet 350 adapters, which are available for download from Cisco's Web site (see Resources), and are also built into the kernel.

Intel has recently released Linux drivers for Centrino. Centrino support is still rather beta, so stay tuned for improvements. The word "Centrino" is a marketing label; only laptops equipped with an Intel processor, Intel chipset and an Intel PRO/Wireless 2100 adapter can carry the Centrino label. The PRO/Wireless 2100 is not available separately.

Ralink (see Resources) appears to offer enthusiastic Linux support, though their drivers are still beta. I have not tried these, so reports from actual real-life users are welcome.

Be sure to consult the links in Resources for specific cards. Because even when a particular adapter uses a Prism radio chipset, it may have unsupported firmware or other modifications. Jean Tourrilhes' site "Wireless LAN resources for Linux" is the ultimate resource for Linux users.

Recommend Wireless Adapters

Here is a roundup of a few of the best-performing wireless network adapters for Linux. This is not a comprehensive list, but a select few. If you have had good experiences with other cards please write and let me know.

802.11b support is the strongest. Theoretically this is 11 megabits per second, but in reality it's more like 5-9 mbps. This is much faster than most users' Internet connection, and is suitable for everyday computer chores. The most solid performer, in my nearly-humble opinion, is the Senao/EnGenius 2511 CD Plus PCMCIA wireless adapter. It has more transmit power and receive sensitivity than most of its competitors, which typically transmit at 30 mW, so the 2511 provides more reliable connections and greater range. It can be used for both client boxes and in access points. Its official transmit rating is 200 milliwatts, but some folks report successfully pushing it as high as 250 mW.

It has plugins for an external antenna, and it can be installed in a desktop PC with the addition of a PCI adapter. EnGenius is the United States subsidiary of Senao, which is based in Taiwan. It costs under $70.

The traditional bullet-proof wireless adapter is the Orinoco Classic Gold. It also can be used for either a client or an access point. It has connectors for an external antenna, and a PCI adapter, just like the 2511. However, compared to the 2511 it's a weakling, with only 30 mW of transmit power. But it is dependable and works well in Linux. Both are based on the Prism chipset and supported in the kernel. It also typically sells for under $70.

802.11g: 54 mbps

802.11b is reliable, but poky and dull; it's so last year. Linux users may enjoy the higher wireless speeds promised by the 802.11g standard. However, be warned that you may also enjoy more headaches. Some of the better-supported chipsets include the Prism GT (802.11b/g) and Prism Duette (802.11a/g). And wonder of wonders, the driver was written by the manufacturer itself (Intersil, now owned by Conexant). Intersil released the driver under the GPL (more shock and wonder) and it is now maintained by the fine folks at the Prism54 project. Conexant supports the project by releasing hardware specifications, licenses, and other goodies.

The hardware hokey-pokey is in full swing with the Prism54 adapters, so buyer beware. The first version of the SMC 2802w PCI worked great in Linux, supporting 802.11b/g. Then came a second version which does not work in Linux at all. The Netgear WG511 has the same story: version 1 worked great in Linux, version 2 no way. Using a Prism54 requires both a driver and a firmware, which will be covered in part 2.

The Dlink DWL-G650 is Atheros-based; it works fine using the MadWifi drivers. (Some folks take exception to MadWifi because part of the driver, the hardware abstraction layer, is closed-source. See Resources.)

So the short story is for the least hassle and most reliability stick with the 802.11b Senao or Orinoco Gold adapters. Users who want 802.11g may have it, it's just going to take some careful shopping.

Configuring Wireless Adapters

The odds are good that your distribution will recognize and activate your wireless card, so that all you have to do is enter the network settings. Most modern Linux distributions enable wireless support in the kernel, and include a selection of wireless drivers and utilities. Usually this is a separate package group at installation. You should also have the following utilities installed:

First check your existing configuration:
$ /sbin/iwconfig
lo     no wireless extensions
eth0     no wireless extensions
eth1     IEEE 802.11 ESSID:" " Nickname:"Prism I"
       Mode:Managed Access Point: 00:00:00:00:00:00 Bit rate 11Mb/s
       Tx-Power=15 dBm Sensitivity:1/3
       Retry min limit:8 RTS thr:off Fragment thr:off
       Power Management:off
       Link Quality:0/92 Signal level:-68 dBm Noise level:-122 dBm
       Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
       Tx excessive retries:0 Invalid misc:0 Missed beacon:0

This tells us several useful things: the wireless card is at eth1, and it is configured to attach to any network--ESSID:" ". This command sets the ESSID to "any":

#iwconfig eth1 essid any
You may or may not be able to connect, depending on what access controls are configured on your wireless access point. It is a good idea to set up encryption, and multiple profiles for road warriors. This is covered in detail in Part 2 next week.

Using NdisWrapper and Verifying Kernel Support

Copy the Windows .inf driver to your Linux system, then run this command to load the driver in the NdisWrapper, using your real file name of course:

# ndiswrapper -i /wirelessthings/windriver.inf
Verify the installation:
# ndiswrapper -l
Installed ndis drivers:
windriver.inf driver present

If you're not sure if you have wireless support built into your kernel, there are a couple of ways to check. First look in your kernel config file:

$ grep CONFIG_NET_RADIO /boot/config-`uname -r`
CONFIG_NET_RADIO=y
Also check your /lib/modules/[kernel version]/kernel/drivers/net/wireless to see if any kernel modules are installed, such as hermes.o, prism54.o, orinoco_cs.o, and so forth.

Come back next week to learn how to configure your wireless adapter on Red Hat--and Debian-type systems, discover what kind of adapters are installed, and tips for building wireless support into a Linux kernel.

Resources

Wireless LAN Resources for Linux
Senao
EnGenius
Cisco Aironet Drivers and Utilities for Linux
Ralink Linux drivers and documentation
Madwifi
NdisWrapper

Copyright Jupitermedia Corp. All Rights Reserved.