Differences between revisions 18 and 19
Revision 18 as of 2008-04-22 10:50:40
Size: 4777
Editor: ?IgnacioMiguel
Comment:
Revision 19 as of 2008-04-22 10:56:24
Size: 3684
Editor: BenArmstrong
Comment: Use "wext" with wpasupp, not "west" (typo) and not "madwifi" (it is deprecated)
Deletions are marked like this. Additions are marked like this.
Line 41: Line 41:

 . [IgnacioMiguel] 04/22/2008 I had to use madwifi instead of west
 . [BenArmstrong] You mean "wext", not "west". Since you made this typo three times editing this page, I wonder if you spelled it correctly in your config? Since you are the only one I've heard of who has had this problem, we need further discussion to find out what is different for you, and that cannot be done in comments in the example. Therefore, I have moved the comment (and have kept only one copy of the comment) to make that easier.
 . [IgnacioMiguel] I'm sorry I had mispelled It (been spanish I was thinking on west cardinal point I suppose)... but using madwifi works too :)
 . [BenArmstrong] The madwifi driver is deprecated, and my experience was that it was slow and unreliable. So if there is a good reason to recommend it, I would like to know why. Have you tried switching back to "wext" (spelling it correctly)?
. [IgnacioMiguel] I'm really sorry, I didn't know that madwifi was deprecated. I've corrected my config file with wext and works fine :( You can close this discussion and delete it.

Instructions for installing the custom madwifi can be found in our [:DebianEeePC/HowTo/Install#head-1e6b527ab177808ee304c69da8da7e44511719c1:Install ?HowTo].

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:

Simple open network

(File: /etc/network/interfaces)
auto ath0
iface ath0 inet dhcp
pre-up ifconfig ath0 up
pre-up iwconfig ath0 essid "router ID"

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. This is our recommended way to configure wifi for the Eee.

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=0
ap_scan=1
fast_reauth=1
eapol_version=1
network={
        ssid="ROUTER ID"
        psk="your password"
        priority=5
}

Then edit /etc/network/interfaces with this:

auto ath0
iface ath0 inet dhcp
wpa-driver wext
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-driver wext
        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=0
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=abcdefg
     id_str="home"
}

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-driver wext
        wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
iface cafe inet dhcp
iface home inet manual
     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.

Tip: Look in the [:DebianEeePC/HowTo/Install#head-322b9ade98a9e61ecd1609bc67f3d3779f9c9820:Troubleshooting] section of the main Install page if you have an error.