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.
2.Code:$ yum install wpa_supplicant dhclient
Insert the following lines in the above file:Code:$ cd /etc/sysconfig && vi wpa_supplicant
3.Code:INTERFACES="-iwlan0" DRIVERS="-Dwext" OTHER_ARGS="-f /var/log/wpa_supplicant.log"
Insert the following lines, where Your_SSID is obvious and Your_PSK will be generated in step 4:Code:$ cd /etc/wpa_supplicant && vi wpa_supplicant.conf
4. No quotation marks in this command: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 }
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:$ /usr/sbin/wpa_passphrase Your_SSID Your_wpa2passphrase >> wpa_supplicant.conf
6.Code:$ vi wpa_supplicant.conf
7.Code:$ chmod 600 wpa_supplicant.conf
Insert the following lines in the above file:Code:$ cd /etc/sysconfig/network-scripts && vi ifcfg-wlan0
8.Code:DEVICE=wlan0 ONBOOT=no TYPE=Wireless BOOTPROTO=dhcp
9.Code:$ service NetworkManager stop $ chkconfig NetworkManager off $ service wpa_supplicant start $ chkconfig wpa_supplicant on $ service network stop $ chkconfig network on
Insert the following lines in the above file:Code:$ cd /etc/rc.d && vi rc.local
On reboot, the wireless connection should be established.Code:/bin/sleep 1 /sbin/dhclient wlan0


Reply With Quote
