Clean up beginning of requesting a profile edit
[wifi-radar.git] / docs / README.WPA-Mini-HOWTO.txt
blob94a13b76e35083aea958267da7d92d817b1c103e
2 #   $Id$
4 #   WPA Mini-HOWTO
5 #       Initial text by Gary Case <gcase@redhat.com>
6 #       2006.09.26 Brian Elliott Finley
7 #       - misc updates
8 #       
11 Here are my directions for installing wpa_supplicant, wifi-radar and all
12 necessary support packages on RHEL4 U2 to enable WPA/WPA2 encrypted
13 wireless ethernet access. 
15 1. Wireless-tools package: I didn't need to update this as the version
16 we ship (v27) was sufficient for use with the latest drivers.
19 2. Wireless-extensions: I didn't update this. The kernel is using v16
20 according to iwconfig --version, which is sufficiently new to support
21 everything we need here.
24 3. Updated wireless card driver, firmware and kernel module precompiled
25 RPMs retrieved from here:
27 http://atrpms.net/dist/el4/ipw2200-testing/
29 Newer driver: ipw2200-1.0.10-36.el4.at
30 Newer firmware: ipw2200-firmware-2.4-7.at
31 Newer kernel module: ipw2200-kmdl-2.6.9-22.0.2.EL-1.0.10-36.el4.at
33 Be sure to get the packages from the "testing" branch, as the regular
34 ones are the same as the one we ship with RHEL 4 (1.0.0). You need the
35 newer driver and associated files to make WPA work. The web page link I
36 posted will take you to the testing packages. 
39 4. WPA Supplicant, found here: http://hostap.epitest.fi/wpa_supplicant/
41 4a. I tried using the precompiled wpa_supplicant RPM packages from the
42 atrpms site, but they were built with all options enabled and needed
43 additional packages to solve dependencies. I decided to build the latest
44 stable version myself (version 0.4.8) instead of playing "find the RPM"
45 to solve the dependencies present in the precompiled package. My home
46 setup is very simple, so all I needed in my .config file were these
47 three lines:
49 CONFIG_IEEE8021X_EAPOL=Y
50 CONFIG_EAP_PSK=y
51 CONFIG_DRIVER_IPW=y
53 If your customer is using PEAP or LEAP or some other external
54 authentication protocol their .config file may vary. All the available
55 options are listed in the README file included in the wpa_supplicant
56 tarball.
58 4b. After building I copied the wpa_cli and wpa_supplicant binaries to
59 /usr/local/bin (the location suggested in the README. Feel free to
60 relocate if desired.). Then I copied the included wpa_supplicant.conf
61 file to /etc/wpa_supplicant/wpa_supplicant.conf. There's a great deal of
62 information and several example configurations in the supplied .conf
63 file. The customer can use the examples to select the proper options for
64 their config file if their network doesn't match my simple WPA2-PSK
65 setup:
67 #Gary's WPA2 home network
68 network={
69         ssid="my-secret-ssid"
70         scan_ssid=0
71         proto=WPA2
72         key_mgmt=WPA-PSK
73         pairwise=CCMP
74         group=CCMP
75         psk="my-secret-pre-shared-key"
76         priority=2
79 Be sure to change the SSID and PSK to the real values for your network.
80 All the other options in the file were left at their default state. 
83 5. WPA Supplicant testing
85 With the configuration set up as described, I could issue this command
86 to bring up the interface:
88 wpa_supplicant -Bw -ieth1 -c/etc/wpa_supplicant/wpa_supplicant.conf
90 (The -Bw option runs the daemon in the background and waits for the
91 interface to be added, if necessary. Have the customer change -ieth1 to
92 match their wireless interface.)
94 This command was then used to get a DHCP address on the card.
96 dhclient eth1
98 I wrote an extremely simple script to do the two commands for me:
100 #!/bin/bash
101 # Script to start WPA Supplicant for secure wireless communication
102 wpa_supplicant -Bw -ieth1 -c/etc/wpa_supplicant/wpa_supplicant.conf
103 sleep 8
104 dhclient eth1
106 If the network connection isn't coming up, check /var/log/messages for
107 errors and try dropping the -B option on wpa_supplicant to have the
108 program output information to stdout.
111 6. Wifi-radar
113 Although it's not needed for wireless or WPA to work, the wifi-radar
114 package can provide users with an alternative method for choosing and
115 connecting to a secure wireless access point. It has no options in the
116 GUI for WPA/WPA2, but it's capable of using a properly configured
117 wpa_supplicant installation to handle the more secure levels of
118 encryption. 
120 6a. After completing steps one through 5 above (step 5 is there to make
121 sure the supplicant is working properly), download and install
122 wifi-radar from the CVS site (directions are present on the CVS site):
124 http://svn.systemimager.org/
126 6b. Edit the configuration file to match your installation. An example
127 setup that works with my home network is shown below. The DEFAULT
128 section is already populated by the installer, but make sure that the
129 interface matches your wireless interface. As in all the other examples,
130 change "my-secret-ssid" to match the SSID in use at your site:
132 [DEFAULT]
133 ifup_required = False
134 auto_profile_order = my-secret-ssid
135 speak_up = False
136 scan_timeout = 5
137 interface = eth1
138 commit_required = False
140 [my-secret-ssid]
141 use_dhcp = yes
142 wpa_driver = ipw
143 use_wpa = yes
144 mode = Auto
146 6c. Edit the /usr/sbin/wifi-radar script to use dhclient instead of
147 dhcpcd:
149 The % DHCP_TIMEOUT section from the DHCP_COMMAND line needed commenting
150 out to make the wifi-radar script work. I suspect there's no timeout
151 value for dhclient or it's implemented differently from dhcpcd.
153 6d. Continue editing the /usr/sbin/wifi-radar script to use
154 wpa_supplicant. You'll need to change the command, conf, and driver
155 lines to match the locations of your command and configuration files as
156 well as the wpa driver you're using in wpa_supplicant.
158 # WPA_SUPPLICANT
159 WPA_SUPPLICANT_COMMAND  = "/usr/local/bin/wpa_supplicant"
160 WPA_SUPPLICANT_KILL_COMMAND=""
161 WPA_SUPPLICANT_CONF="/etc/wpa_supplicant/wpa_supplicant.conf"
162 WPA_DRIVER="ipw"
163 WPA_SUPPLICANT_PIDFILE  = "/var/run/wpa_supplicant.pid"
164 WPA_SUPPLICANT_ARGS     = "-B -i " + INTERFACE + " -c " + WPA_SUPPLICANT_CONF + " -D " + WPA_DRIVER + " -p " + WPA_SUPPLICANT_PIDFILE
167 7. Run wifi-radar
169 After making those script changes, I could run wifi-radar, select the
170 proper SSID and click the "Connect" button to get a DHCP address.