Tuesday, March 6, 2007

How to get ipw2200 and wpa to work

1) Open a terminal window and type:
Code:
wpa_passphrase your_ssid your_psk
Note: your_ssid is the name of your wireless network (a.k.a. SSID) and your_psk is the password you want to use to protect your network. (Look below for an example).

2) Now copy the psk string you got as output.

3) Type:
Code:
sudo gedit /etc/wpa_supplicant.conf
Then paste this as follow:
Code:
ctrl_interface=/var/run/wpa_supplicant
#ap_scan=2

network={
ssid="your_ssid"
scan_ssid=1
proto=WPA RSN
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP
psk=your_psk
}
Note: your_psk is the psk string you got from step 1.

Here is an example:
Code:
luca@laptop1:~$ wpa_passphrase mywlan thisisthepassword
network={
ssid="mywlan"
#psk="thisisthepassword"
psk=b22ec921c254c73f99b31b76ff876692ecde36839a1f2d92150829e6afcb5515
}
The red string is what you have to paste into /etc/wpa_supplicant.conf as your_psk (without quotes obviously). So you'll have something like this:
Code:
ctrl_interface=/var/run/wpa_supplicant
#ap_scan=2

network={
ssid="mywlan"
scan_ssid=1
proto=WPA RSN
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP
psk=b22ec921c254c73f99b31b76ff876692ecde36839a1f2d92150829e6afcb5515
4) Save the file and close Gedit.

5) Now we have to make wpa_supplicant load when system boots, so go back to the terminal window and type:
Code:
sudo gedit /etc/network/interfaces
6) Add the following lines in the part regarding your wireless card, as in the example below:
Code:
pre-up wpa_supplicant -Bw -Dwext -ieth0 -c/etc/wpa_supplicant.conf
post-down killall -q wpa_supplicant
Note: "eth0" is your wireless device and "wext" is the driver; this is a kind of generic driver, so it should work with most wireless cards. If it doesn't, please try another driver, such as hostap, ndiswrapper, etc.
Here is an example:
Code:
iface eth0 inet static
address 192.168.1.15
netmask 255.255.255.0
wireless-essid my_essid
gateway 192.168.1.1
pre-up wpa_supplicant -Bw -Dwext -ieth0 -c/etc/wpa_supplicant.conf
post-down killall -q wpa_supplicant
7) Now run wpa_supplicant:
Code:
sudo wpa_supplicant -Bw -Dwext -i eth0 -c/etc/wpa_supplicant.conf
You should be online!



Troubleshooting:

You can run wpa_supplicant with -dd flag for a detailed debug output.

1) If you don't manage to connect to the AccessPoint, try to uncomment line 2 in /etc/wpa_supplicant.conf.
2) If that doesn't help, try change its value to 0 or 1.
3) If you get troubles while authenticating, try removing "RSN" and/or "CCMP" strings from /etc/wpa_supplicant.conf.

source: http://www.ubuntuforums.org/showthread.php?t=263136

No comments:

Your Ad Here