3.2. Wireless (WLAN) Card

My E5400 shipped with an Intel Wireless WiFi Link 5100. It identifies itself as:

# lspci | grep 4232
0c:00.0 Network controller: Intel Corporation Device 4232

3.2.1. Kernel Configuration

As far as I know, support for the Intel Wireless WiFi Link 5100 is relatively new. It is present in my kernel (2.6.29), but you have to turn on experimental features in your kernel:

General setup  -->
  [*] Prompt for development and/or incomplete code/drivers  -->

You have to enable the mac80211 subsystem:

[*] Networking support  -->
    [*] Wireless  -->
        <*> Generic IEEE 802.11 Networking Stack (mac80211) 

The iwlwifi project provides the drivers Intel Wireless WiFi Link devices. You have to activate the core and the Next Gen AGN driver:

    Device drivers  -->
    [*] Network device support  -->
        Wireless LAN  -->
        [*] Wireless LAN (IEEE 802.11)
            <*> Intel Wireless WiFi Core
            [*] Iwlwifi RF kill support
            [ ] Enable full debugging output in iwlagn driver
            <*> Intel Wireless WiFi Next Gen AGN
            [*]   Enable Spectrum Measurement in iwlagn driver (NEW)
            [*]   Enable LEDS features in iwlagn driver (NEW)
            [ ]   Intel Wireless WiFi 4965AGN (NEW)
            [*]   Intel Wireless WiFi 5000AGN (NEW)

3.2.2. Hotplugging and Firmware

Before you reboot, you should install the hotplug system because the wlan device requires loading a piece of firmware.

# emerge hotplug

Then you have to emerge the package net-wireless/iwl5000-ucode:

# emerge iwl5000-ucode

This will install the file iwlwifi-5000-ucode-VERSION.tgz in /lib/firmware/ so that the hotplug system can find it, when the kernel driver requests it. You go on with installing wpa_supplicant:

3.2.3. Network Configuration and wpa_supplicant

# emerge wpa_supplicant

Then you want to make the new device known to the system:

# ln -s net.lo0 /etc/init.d/net.wlan0

Go ahead with configuring wpa_supplicant. First add the following two lines to /etc/conf.d/net:

modules=( "wpa_supplicant" )
wpa_supplicant_wlan0="-Dwext"

See the manpage wpa_supplicant(5) for the meaning of the option. Finally, configure your wireless connections in /etc/wpa_supplicant.conf. The following example illustrates how to configure wpa_supplicant to first try to connect to an access point with the SSID "private_idaho" with WPA-PSK2, and then to any unsecured network:

ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0 
eapol_version=2 
update_config=1 

# This is a network block that connects to any unsecured access point. 
# We give it a low priority so any defined blocks are preferred. 
network={ 
    key_mgmt=NONE 
    priority=-9999999 
}

network={ 
    ssid="private_idaho" 
    scan_ssid=1
    psk="PASSPHRASE_GOES_HERE" 
    # Pick either WPA or WPA2 (latter preferred, of course) 
    #proto=WPA 
    proto=WPA2 
    key_mgmt=WPA-PSK
    pairwise=TKIP 
    group=TKIP 
    priority=2 
}

Restart your system, and you should be able to connect to your access point. Of course, there are a zillion other ways to set this up, but this setup works. If you you don't use the wireless permanently, you can compile the driver as modules (at little avail, however). Or you can use wireless-tools instead of wpa_supplicant.

3.2.4. Troubleshooting

If things do not work, you should check the other end. Is the access point present at all? You can either check from another machine, or emerge wireless-tools and try to scan your neighborhood with iwlist scan.

If /etc/init.d/net.wlan0 start complains about:

network interface wlan0 does not exist
Please verify hardware or kernel module (driver)

Check again your kernel configuration. One possible reason is that you forgot to add support for the IWL 5000 type of card.

As a last resort you should check messages in the syslog /var/log/messages (search for "wlan"), and if you cannot find anything scan the output of dmesg. You should find something like this:

[ 0.516501] iwlagn: Intel(R) Wireless WiFi Link AGN driver for Linux, 1.3.27ks 
[ 0.516609] iwlagn: Copyright(c) 2003-2008 Intel Corporation 

If that is all that the iwlagn driver says to you, the device was not recognized. Check the kernel configuration and make sure that the wireless switch at the front of your E5400 is in "on" positionn (you cannot see the red background). A sane output from dmesg looks like this:

[ 0.516501] iwlagn: Intel(R) Wireless WiFi Link AGN driver for Linux, 1.3.27ks 
[ 0.516609] iwlagn: Copyright(c) 2003-2008 Intel Corporation 
[ 0.516737] iwlagn 0000:0c:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17 
[ 0.516843] iwlagn 0000:0c:00.0: setting latency timer to 64 
[ 0.516884] iwlagn: Detected Intel Wireless WiFi Link 5100AGN REV=0x54 
[ 0.538689] iwlagn: Tunable channels: 13 802.11bg, 24 802.11a channels 
[ 0.538908] iwlagn 0000:0c:00.0: PCI INT A disabled 
[ 0.539040] wmaster0 (iwlagn): not using net_device_ops yet 
[ 0.539288] phy0: Selected rate control algorithm 'iwl-agn-rs' 
[ 0.539368] wlan0 (iwlagn): not using net_device_ops yet 
[ 0.539716] console [netcon0] enabled

A little time later, the driver should try to load the firmware from userspace:

[ 23.845389] iwlagn 0000:0c:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17 
[ 23.845463] iwlagn 0000:0c:00.0: restoring config space at offset 0x1 (was 0x100102, writing 0x100106) 
[ 23.845554] iwlagn 0000:0c:00.0: irq 29 for MSI/MSI-X 
[ 23.845611] iwlagn 0000:0c:00.0: firmware: requesting iwlwifi-5000-1.ucode 
[ 23.956067] iwlagn loaded firmware version 5.4.1.16

And after that you should see how it authenticates with the access point. If the WiFi LED is lit, the kernel driver should have recognized the hardware. Good luck!

3.2.5. Stability

The wireless connectivity is quite unstable here. I use a WRTGL54 1.1 Linksys router, and I often lose the connection to the router. I also have routing problems in the internal network: I can route package from any machine in the internal network to the wireless interface of the E5400 but not back. Routing packets to and from the internet via the router works, however, so it could well be a router problem.

Googling suggests that this is apparently a hardware problem, as it happens with other operating systems as well. I have to do some more testing with other routers, and maybe try it out with the MS-DOS 7 installation on the same machine.

TuxMobil - Linux on Laptops, Notebooks, PDAs and Mobile Phones