NetworkManager is a powerful tool for setting up a wlan connection, especially if you connect the laptop to multiple access points. One drawback is that the user accounts must be given access to the pass
phrase. Another is that there is no wlan connection in run level 3, because nm-applet is an X application.
If you connect to the same access point all the time, e.g., your own wireless router, a permanent connection via ifcfg might be more convenient. It is controlled by root. All user accounts have wireless access without knowing the underlying details. Further, there is a wireless connection in run level 3. After a lot of trial and error and Google searches, I was able to put together this guide by splicing together one step used in Slackware (from Alienbob's web page) with other steps outlined in this online article
http://home.roadrunner.com/~computer...hwireless.html.
It is assumed that the appropriate kernel module for the wlan card is installed and that
$ iwconfig
shows a viable wlan0 interface. We are using DHCP. (If using static IP, edit ifcfg-wlan0.)
The following steps work on a Compaq Presario F756NR notebook with a Atheros AR242x 802.11abg WLAN card using the ath5k kernel module (without madwifi). I am using 64-bit F12. All commands are executed as root.
1.
Code:
$ yum install wpa_supplicant dhclient
2.
Code:
$ cd /etc/sysconfig && vi wpa_supplicant
Insert the following lines in the above file:
Code:
INTERFACES="-iwlan0"
DRIVERS="-Dwext"
OTHER_ARGS="-f /var/log/wpa_supplicant.log"
3.
Code:
$ cd /etc/wpa_supplicant && vi wpa_supplicant.conf
Insert the following lines, where Your_SSID is obvious and Your_PSK will be generated in step 4:
Code:
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
eapol_version=1
ap_scan=1
fast_reauth=1
network={
# Set scan_ssid=1 if the access point is hidden.
scan_ssid=0
proto=WPA RSN
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP WEP104 WEP40
ssid="Your_SSID"
psk=Your_PSK
}
4. No quotation marks in this command:
Code:
$ /usr/sbin/wpa_passphrase Your_SSID Your_wpa2passphrase >> wpa_supplicant.conf
5. There is now a new "network" code block at the end of wpa_supplicant.conf. Copy the new SSID and PSK lines to the "network" block above at the locations shown in step 3. Delete the new "network" code block:
Code:
$ vi wpa_supplicant.conf
6.
Code:
$ chmod 600 wpa_supplicant.conf
7.
Code:
$ cd /etc/sysconfig/network-scripts && vi ifcfg-wlan0
Insert the following lines in the above file:
Code:
DEVICE=wlan0
ONBOOT=no
TYPE=Wireless
BOOTPROTO=dhcp
8.
Code:
$ service NetworkManager stop
$ chkconfig NetworkManager off
$ service wpa_supplicant start
$ chkconfig wpa_supplicant on
$ service network stop
$ chkconfig network on
9.
Code:
$ cd /etc/rc.d && vi rc.local
Insert the following lines in the above file:
Code:
/bin/sleep 1
/sbin/dhclient wlan0
On reboot, the wireless connection should be established.