WPA on Slackware 10.1-Netgear WG511v2

For many months now, after buying my notebook, i had been using 128-bit wireless encryption on my wireless card (Netgear WG511v2 Made in Taiwan). The reason i did that was i didn’t have any idea that i could use WPA. Someone had told me that the pc card i was using on my notebook came with the Marvel Chipset and wasn’t possible setting up WPA. Busy with work, i gave up setting up WPA encryption between the AP and the card. I finally, posted a question on linuxquestion.org to find a solution for this. I got lucky, after posting a few times, i now have configured WPA successfully and am using it. It works perfect, no drops in connection.

Here’s how i managed to do it. I’m running Slackware 10.1 (kernel 2.6.10) on an IBM Thinkpad i1300. The AP is a wireless netgear (WGR614 v5) router converted to a cascading AP. I also run a Linksys BEFSR wired router to which this AP is connected to.
I was using ndiswrapper under Linux with the netgear drivers.

So here goes:
1.Download wpa_supplicant from http://hostap.epitest.fi/wpa_supplicant/
2.Untar the wpa_supplicant archive
3.Make a .config file with these declarations:

CONFIG_DRIVER_NDISWRAPPER=y
CONFIG_WIRELESS_EXTENSION=y
CONFIG_CTRL_IFACE=y

4.Save the file
5.do a “make” in the directory. Now the wpa_supplicant should be compiled and made.
6.Copy wpa_supplicant and wpa_cli to /usr/local/sbin or wherever your executables are.
7.Make the wpa_supplicant.conf file and put it in /etc. Here’s the sample wpa_supplicant configuration i’m using

ap_scan=2 #This is for wpa_supplicant not to scan for AP’s when you’re not #broadcasting the ssid on the AP
network={
ssid=”your-ssid”
psk=”yoursecret code from the AP”
pairwise=TKIP
group=TKIP
key_mgmt=WPA-PSK
proto=WPA
}
8.When you’re finished creating the configuration file, run this:

root~#wpa_supplicant -B -Dndiswrapper -iwlan0 -c/etc/wpa_supplicant.conf -dd (the
-B switch is to daemonize the process)
root~#dhcpcd wlan0

9.You should be up and running at this point.

PS: Make sure you do a firmware upgrade on the router otherwise your connection will drop every now and then.

Also when you need to stop the connection do a killall wpa_supplicant before you do ifconfig wlan0 down and rmmod ndisrapper. On my notebook when i need to hibernate this is the script that shuts down the wlan interface without giving me any hiccups later on:

ifconfig wlan0 down
killall wpa_supplicant
rmmod ndiswrapper

If i don’t do this, later on when i bring the notebook out of hibernation and try to bring up the ndiswrapper up, it usually gives me a Segmentation Fault message. so i kill the connection and remove the module from the kernel before going to hibernate.
The kill wpa_supplicant is to kill the daemon so that way when i come out of hibernation it doesn’t conflict with the new daemon process.

~ by brokenflea on July 28, 2005.

Leave a Reply

You must be logged in to post a comment.