Translations: ?French German Italian Portuguese

This document covers configuration of wifi. It assumes you have already installed the appropriate wifi driver for your model of EeePC. See ../Install and ../../Models for further details.

Hardware-specific configuration

WiFi configuration differs depending on which model of EeePC you own. Older models (701, 900, 900A) use the Atheros AR242x chip. Some models (1000HE, 1002HA, 10005HA, 1001PX) use the Atheros AR928x. Please read the section below which corresponds with your hardware. (FixMe: The models with Ralink and ?RealTek chipsets are not discussed in detail here. Is that because everything automagically works?)

Atheros AR242x b/g drivers (701, 900, 900A)

Note: This section (AR242x) is only for older EeePC models such as the 701, 900, 900A. Please skip to the next section if you have a 1000HE, 1002HA, or 1005HA.

If you have a model with an Atheros AR242x wireless b/g adapter, you have a choice between two kernel drivers: madwifi and ath5k.

madwifi (Lenny)

Historically the madwifi driver has been used. In addition to being not entirely free software, the madwifi driver apparently has some limitations. For information on why the madwifi driver is not free, see ../../FreeYourEee

If you experience problems with madwifi, such as inability to connect to wireless networks after resume, you may want to upgrade to newer kernel and use ath5k driver (see the next section).

ath5k (Lenny backports, post-Lenny kernels)

ath5k is the newer, free, driver for Atheros cards. Unfortunately, Lenny 2.6.26 kernel contains the driver which will not work with AR242x. The ath5k driver loads, creates a wlan0 interface, but does not list any access points.

To get a newer driver you can either

ath5k (Squeeze)

ath5k as included in the current 2.6.32 kernel (as of June 2011) works

Atheros AR928x b/g/n driver (1000HE, 1002HA, 1005HA, 1001PX, etc.)

Note: This section (AR928x) is only for EeePC models with the Atheros AR928x chip, such as the 1000HE, 1001PX, 1002HA, 1005HA, and 1008HA. If you have an older EeePC, please see the previous section.

ath9k (Lenny backports, post-Lenny kernels)

If you run Lenny, you'll need a kernel backport, as the Lenny kernel does not include this driver. See ../Upgrade#A2.6.29UpgradeIssues.2BAC8-tips.

If you run Squeeze/Sid, which contain a kernel >=2.6.30, then ath9k is included. All you need to do is use one of the following wifi configuration methods using the interface name wlan0.

On an EEE 901, with 2.6.26-1-686, the wireless module is the rt2860sta module. Using the function keys to disable the wireless works correctly. Re-enabling the wireless using the function however may not work unless the kernel module 'pciehp' was loaded with certain options set.

On an EEE 1000H you must install firmware-ralink.

You should install eeepc-acpi-scripts from http://eeepc.debian.net/.

Asus EEE PC 1001-HA model has ?RaLink RT3090 Wireless 802.11n 1T/1R PCIe modprobe rt3090sta was not enough, because /etc/Wireless/RT2860STA/RT2860STA.dat was missing (yes, the 3090 driver-module was looking for this 2860 file).

I got it working by

http://wiki.debian.org/rt2860sta provides lotsof info, and probably a better method than I used (I discovered it after I got it working).

Network configurators

There are three ways to configure your wireless network. New users are recommend to use Gnome's NetworkManager. Wicd, another GUI wifi configuration, is very simple and is a good choice for people who do not want to (or cannot) run NetworkManager. For more advanced users, there is always the option of editing the configuration files directly. All three methods are discussed below.

The following instructions were written for models using the madwifi driver, and therefore refer to ath0 as the wireless device name.

If you're using…

You have kernel…

Read ath0 as…

ath5k or ath9k

any

wlan0

rt2860sta

2.6.31 or older

ra0

2.6.32 or newer

wlan0

New users are recommended to use NetworkManager unless your model uses rt2860sta. Delete eth0 and ath0 configuration from /etc/network/interfaces, install network-manager and network-manager-gnome (or network-manager-kde) packages, and add your user to netdev group. The GNOME applet works with any window manager, so long as it has a notification area (e.g. LXDE's lxpanel has one).

sudo aptitude install network-manager network-manager-gnome
sudo adduser <yourusername> netdev

(You'll need to log out and in again for adduser to take effect.)

If network-manager and network-manager-gnome is available but wireless network card (ath0) does not show up, try deleting lines in /etc/network/interfaces that refers to ath0 and eth0 and run:

sudo dpkg-reconfigure network-manager
sudo dpkg-reconfigure network-manager-gnome

Wicd: lightweight alternative GUI network manager

For a more lightweight GUI network manager, although it is still rather new to Debian, wicd is a good alternative. Wicd is a network manager without GNOME dependencies, usable also with XFCE, Fluxbox, etc. It also plays nicely with rt2860sta. To install wicd on Lenny, see WiFi/HowToUse#wicd.

Once installed, launch wicd-client to show the tray icon in your desktop.

/etc/network and wpa_supplicant (for experts)

Simple open network

If you're impatient and want to configure for wifi without encryption to a single access point, you can simply set it up as follows:

Install the wireless-tools package.

# /etc/network/interfaces
auto ath0
iface ath0 inet dhcp
wireless-essid router ID

If spaces are used in the ESSID, do not surround them with quotes.

However, beware that particularly with the rt2860 driver, configuring wifi with this method is prone to failure. It doesn't ... (FixMe: explain here what problems may arise.)

Wpa supplicant with PSK

A more elegant solution to connect to one or more access points either with or without encryption is to use wpasupplicant. If any of the following is unclear or does not work for you, please check the documentation in /usr/share/doc/wpasupplicant/ for details.

First, you have to "aptitude install wpasupplicant".

To configure for wifi to single access point with WPA(2)-PSK encryption, open a text file and paste this and save it as /etc/wpa_supplicant/wpa_supplicant.conf:

ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=netdev
ap_scan=1
fast_reauth=1
eapol_version=1
network={
        ssid="ROUTER ID"
        psk="your password" # or psk=0123456789abcdef
        priority=5
}

Note: some parameters take double-quotes and some don't as shown above, e.g. if psk is a hex key don't use double-quotes, but if it is a passphrase, do. Also remember to type in the parameters EXACTLY as above; the config file parser (as of 2010-02-13) does not accept lines of the form "parameter = " (do not add a space around the equal sign).

Note: make sure to stop network-manager, which is installed during default-installation, before using wpa_supplicant.

Then edit /etc/network/interfaces with this:

auto ath0
iface ath0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

Reboot and you have wifi :)

Wpa supplicant in roaming mode

For multiple access points, you'll want "roaming" mode. Starting with the previous example, in /etc/network/interfaces, change 'auto ath0' to 'allow-hotplug ath0', change 'wpa-conf' to 'wpa-roam'. Also change 'iface ath0 inet dhcp' to 'iface ath0 inet manual' and add a default connection method 'iface default inet dhcp'. When you're all done, your /etc/network/interfaces should look something like this:

auto lo
iface lo inet loopback
iface eth0 inet dhcp
allow-hotplug ath0
iface ath0 inet manual
        wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp

Now we are ready to define additional networks in /etc/wpa_supplicant/wpa_supplicant.conf. For example:

network={
        key_mgmt=NONE
}

This is a catch-all that will associate with any open access point within range using dhcp to connect.

You can add additional specific networks, each with their own ssid and specify either the type of encryption to use or specify key_mgmt=NONE for either no encryption or WEP. We can also assign id strings to these networks, so that if, for example, your home network is static, and the local cafe is dhcp, we can alter our files like so.

For WEP, you specify the key as follows:

ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=netdev
ap_scan=1
fast_reauth=1
eapol_version=1
network={
     ssid="cafe"
     key_mgmt=NONE
     wep_key0=FFEEDD001122
     id_str="cafe"
}
network={
     ssid="home-router"
     psk="your password" # or psk=0123456789abcdef
     id_str="home"
}

Note: some parameters take double-quotes and some don't as shown above, e.g. if psk is a hex key don't use double-quotes, but if it is a passphrase, do.

And edit our /etc/network/interfaces as follows

auto lo
iface lo inet loopback
iface eth0 inet dhcp
allow-hotplug ath0
iface ath0 inet manual
        wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
iface cafe inet dhcp
iface home inet static
     address 192.168.1.5
     netmask 255.255.255.0
     network 192.168.1.0
     broadcast 192.168.1.255
     gateway 192.168.1.1

Tip: If you have trouble connecting to a network because it does not broadcast its ssid, add 'scan_ssid=1' to its network stanza. If this does not help, try unhiding the SSID; it may be caused by a bug in ath5k, see this discussion: http://kerneltrap.org/mailarchive/linux-ath5k-devel/2009/1/2/4590654

Tip: Look in the ../Troubleshooting section if you have an error. Also see /usr/share/doc/wpasupplicant/ docs for more details.

Tip: Once you have a working configuration, you can use wpagui to easily add, delete, select and scan for networks. wpagui is a small, neat program that could do for all your needs, without forcing you to manually edit your configuration every time you connect to a new network.