Ipw2200

From ThinkWiki
Revision as of 12:24, 8 February 2007 by Hmh (Talk | contribs) (Additional Comments: Write both locations. Not that one should need the comment if people actually READ the page...)
Jump to: navigation, search

Intel PRO/Wireless 2200/2915 Driver for WiFi

Linux driver for the 802.11bg and 802.11abg NICs - miniPCI cards - found in Centrino laptops. This driver only works on 2.6.x kernels (2.6.4 or newer).

Starting with kernels 2.6.14 the driver is included in kernel.

The following adapters sold by IBM use these chips:

NOTE!
Make sure you have installed the firmware! The ipw2200 documentation will tell you where to find these firmware files and where to install those.

Project Homepage / Availability

http://ipw2200.sourceforge.net/

Included in mainline Linux kernels, tracking the SourceForge version with about 6 months delay.

Packages

Status

In development, usable, WEP 128bit encryption works, WPA and WPA2 work with drivers >= 1.0.2 using wpa_supplicant, monitor/rfmon is supported as with version >= 1.0.6. Generally works well, but some users experience problems (especially with firmware restarts and with WPA functionality using wpa_supplicant). Passing the hwcrypto=0 module parameter improves reliability for many users.

The ipw2200 driver up to version 1.0.6 (in combination with some newer kernels) had a problem getting DHCP leases (it turned out to be a bug in the broadcasting code). Version 1.0.7 seems to have fixed this.

Older ipw2200 driver versions shipped by many distributions have been reported to freeze a T43 after several minutes of intensive communication. Installing version 1.1.2 of the driver solved the problem.

Latest stable versions:

  • ipw2200 driver: 1.2.0
  • firmware: 3.0
  • ieee80211 stack: 1.2.15

Latest development versions:

  • ipw2200 driver: 1.1.4
  • firmware: 3.0
  • ieee80211 stack: 1.2.15

Mainline kernels contain older (but mostly functional) versions of ipw2200 and ieee80211, and still require the addition of the firmware files. To get the latest versions you need to separately install the ipw2200 module and ieee80211 stack.

Installation

Installation from sourcecode

Download the latest ieee80211 stack and install it:

# tar xzvf ieee80211-1.2.15.tgz
# cd ieee80211-1.2.15
# make
# make install

Download the latest ipw2200 module and install it:

# tar xzvf ipw2200-1.2.0.tgz
# cd ipw2200-1.2.0
# make
# make install

Download the matching firmware and install it:

# tar xzvf ipw2200-fw-3.0.tgz -C /lib/firmware

Installation on Debian

Install ieee80211-source:

# apt-get install ieee80211-source
# module-assistant -t build ieee80211-source

Install ipw2200-source:

# apt-get install ipw2200-source
# module-assistant -t build ipw2200-source

There is a bug in the Debian package (last checked: Dec 30th 2005) that prevents from linking to ieee80211 modules using module-assistant. In case it is not fixed in your version, fall back to the regular source installation procedure described above.

The firmware is not distributed with debian due to licensing reasons, download the matching firmware and install it:

# tar xzvf ipw2200-fw-2.4.tgz -C /usr/lib/hotplug/firmware

see /etc/hotplug/firmware.agent for details on configured firmware locations

In etch the firmware can also be placed in /lib/firmware. Make sure that your firmware files are not in a subdirectory (dmesg will give you warnings after any modprobe when firmware can't be loaded)

Installation on Fedora Core

Installation on Fedora Core 5 works out of the box provided you install the ipw2200-firmware package. However, certain parts of the install process may not set up the wireless networking in a friendly manner using GNOME system tray icons and other tools. Bill Moss has written some excellent HowTo articles, including using VPNC to connect to a remote Cisco IPSec network.

Testing the driver

# modprobe ipw2200
# iwconfig

# dmesg output might look similar to this:

ieee80211: 802.11 data/management/control stack, 1.1.6
ieee80211: Copyright (C) 2004-2005 Intel Corporation <jketreno@linux.intel.com>
ipw2200: Intel(R) PRO/Wireless 2200/2915 Network Driver, 1.0.8
ipw2200: Copyright(c) 2003-2005 Intel Corporation
ipw2200: Detected Intel PRO/Wireless 2915ABG Network Connection

NB: To make the wifi LED work on the thinkpad, pass the option led=1 to the kernel while loading the module. eg. # modprobe ipw2200 led=1. This can also be accomplished by adding that option to the file where your distribution looks for modprobe options so that it becomes automatic.

In debian this can be done by putting a file named after the module in /etc/modutils with the options in it

here we might run a cmd like this

# echo options ipw2200 led=1 > /etc/modutils/ipw2200

then we must run update-modules to remake /etc/module.conf

# update-modules

WPA support

Use wpa_supplicant with the -Dwext argument (not -Dipw), and pass the hwcrypto=0 argument to the ipw2200 module.

There are some very detailed instructions with working sample configurations on the following link: ipw2200 WPA instruction

Power Management

To enable power management, issue:

# iwpriv wlan0 set_power 7

where wlan0 is the name of your interface. This will reduce idle power consumption by several Watts compared to no power management.

  • To disable the radio (and further reduce power consumption) when the card is not in use, issue:
# echo 1 > /sys/bus/pci/drivers/ipw2200/*/rf_kill
  • To enable the radio, issue:
# echo 0 > /sys/bus/pci/drivers/ipw2200/*/rf_kill
  • To make the radio off by default after boot, add
options ipw2200 disable=1

to your /etc/modprobe.conf or equivalent (on kubuntu 6.10 /etc/modprobe.d/options).

See README.ipw2200 in the ipw2200 package for details and other options.

Changing the enabled channels

Permitted WiFi channels vary with geography due to regulation. The EEPROM in this chip contains a country code (programmed by the hardware manufacturer), and the driver converts this to a channel list and enforces it.

If you carry your laptop to a different regulatory region, you may need to change the list of permitted channels according to local regulations. There are two ways to accomplish this:

Patching the ipw2200 driver

You can alter the ipw2200 driver sourcecode to hard-code the country code instead of reading it from EEPROM. For example, this will allow all 14 channels (perfect for those special occasions in international water):

--- ipw2200.c.orig
+++ ipw2200.c
@@ -11344,7 +11344,7 @@ static int ipw_up(struct ipw_priv *priv)
 		memcpy(priv->net_dev->dev_addr, priv->mac_addr, ETH_ALEN);
 
 		for (j = 0; j < ARRAY_SIZE(ipw_geos); j++) {
-			if (!memcmp(&priv->eeprom[EEPROM_COUNTRY_CODE],
+			if (!memcmp("ZZR",
 				    ipw_geos[j].name, 3))
 				break;
 		}

For the list of codes and their meaning, see the "ipw_geos" table in the ipw2200.c sourcecode.

Patching the EEPROM

Alternatively, you can change the country code in the EEPROM once and for all, and then use the standard ipw2200 driver.

See this guide:

Instead of the hd program mentioned there, you can use the more common od program:

echo -n ZZD | od -t x1
0000000 5a 5a 44
0000003
ATTENTION!
If this procedure goes wrong, you may ruin your wireless card.

Additional Comments

Your kernel may include an old version of the ipw2200 driver. It is recommended to use the latest version.

Make sure you also install the firmware version needed by the driver version you use. You can find the firmware here. To install it, decompress the .tgz file into /usr/lib/hotplug/firmware or /lib/firmware depending on your disto.

The driver doesn't appear to support the MII interface, so any tools like automatic network configuration managers (i.e. whereami) that rely on mii-tool do not work.