Tuesday, 20 August 2013

How to connect to wifi through wpa_supplicant and wicd-cli (in particular get connected to eduroam in australia)


iw(list/config) can only handle WEP.
You need wpa-supplicant for this.
sudo apt-get install wpasupplicant
In /etc/wpa_supplicant.conf you put your ssid and password.
gksu gedit /etc/wpa_supplicant.conf 
Example:
network={
            ssid="ssid_name"
             psk="password"
}
Assuming your interface is wlan0 you can connect to it with...
wpa_supplicant -B -iwlan0 -c/etc/wpa_supplicant.conf -Dwext && dhclient wlan0
C--------------------------------

Now I have a case for connecting it in eduroam in australia.

first, make a file named as "wpa_supplicant.conf" on the desktop.


ctrl_interface=/var/run/wpa_supplicant
eapol_version=1
ap_scan=1
fast_reauth=1
network={
 ssid="eduroam"
 scan_ssid=1
 key_mgmt=WPA-EAP WPA-NONE IEEE8021X
 eap=PEAP
 phase2="auth=PAP auth=MSCHAPV2"
 identity="PUT YOUR account name here"
 password="PUT YOUR password here"
priority=2
auth_alg=OPEN
}
 be aware that you need to put account name and password in the file

then run
# wpa_supplicant -c /home/chenming/Desktop/wpa_supplicant.conf -iwlan0 -Dwext
# dhclient wlan0
enjoy!
##-----------------------------another comments ------------------------

in scientific linux distro, the current version is 6.4, which only support wicd 1.7.0, however, it has been found that this wicd 1.7.0 does not work well with eduroam. if one has to stick SL, compile wicd 1.7.2 from source is required, I did that in SL and found it is be very buggy, in particular, when using wicd-gtk to specify connectionn type and passwork and so on, the window can not be closed. then I decided to use wicd-cli, a command line based app to connect the 1.7.2 to eduroam. So far from the man page, I can't see any thing that is equivalent to -c in wpa_supplicant which specifiy the connection type and these sort of things. however, those information is needed for complex eduroam. so I dicided to stop and just wait when redhat update to 7.

No comments:

Post a Comment