Please support VectorLinux!

Author Topic: Can't get WPA encryption to work with my WG511T Netgear Wireless Card  (Read 3252 times)


  • Member
  • *
  • Posts: 6
  I can get the card to pick up all the networks around, but I can't connect to my WPA encrypted router.  I have wpa_supplicant, and have edited all my .conf files but when I go to my VL WLAN manager is says that there is an error and can't run iwconfig and can't start WPA Supplicant.
I've gone through all the how-to's I could find and still no help.
Can anyone help me? Thanks
The KLan manager can't start WPA_supplicant, is there code to redirect that program?
« Last Edit: June 14, 2007, 05:21:40 pm by sarahn25 »


  • Vectorian
  • ****
  • Posts: 1868


  • Member
  • *
  • Posts: 6
So I don't know which driver the card is using.... I haven't figured out how to write scripts yet. But when I put my wireless card in I can ping my router automatically by using ping  I am connected to this router through my MAC through WPA encyption. I am using wpa_supplicant-0.5.8
So when I try to start up WPA by using wpa_supplicant -iath0 -Dwext -c /etc/wpa_supplicant.conf I get:

ctrl_iface exists, but does not allow connections - assuming it was leftover from forced program termination
unlink[ctrl_iface]: not a directory
Could not unlink existing ctrol_iface socket '/var/run/wpa_supplicant/ath0
Failure to initialize control interface'/var/run/wpa_supplicant'.
You may have another wpa_supplicant process already running or the file was left by an unclean termination of wpa_supplicant in which case you will n eed to manually remove this file before starting wpa_supplicant again.
Failed to add interface ath0
WEXT: Operstate: linkmode=-1, operstate=5
No keys have been configured - skip key clearing

I don't know what this means. I have edited modprobe.conf, ifplugd.conf, and wpa_supplicant.conf, and am afraid I might have really messed my conf files up. I also copied the wpa_supplicant file from /usr/sbin directory to /var/run like all the How-To's say.
Can anybody walk me through this?


  • Vectorian
  • ****
  • Posts: 1132
pinging is pinging your system (i.e. localhost), not your router.  Your router's IP address is probably something like or for a Class C network.  First determine what the IP address is of your router and then try pinging it to see if you can reach it.

Aside from that, I have a wifi-radar profile created to connect to my wireless and use wpa_supplicant as well.  My wifi-radar profile specifies IP address (mine is static), ssid, netmask, gateway, dns - that's about it.  I do not use the wpa_supplicant option associated with the wifi-radar profile, however I DO use wpa_supplicant.  I have a wpa_supplicant configuration file that specifies the necessary options and I start it similarly to yours, however slightly different: 'wpa_supplicant -Dwext -ieth1 -c/etc/wpa_supplicant.conf' (I don't use a space between the -c option and configuration path, and also my wireless is eth1 rather than ath0).  I have my wpa_supplicant option added to rc.local for automatic starting during system startup and then I manually enable my wifi-radar after boot.

Any way, that's how I do it and it seems to work.  Maybe this will be of some use.


  • Vectorian
  • ****
  • Posts: 1868
The first thing is that is not from your wireless card.

Change your router to disable WPA for now. Then get your
wireless card to connect to your router. Then try adding
WPA. Currently you have no idea where your failure are.

Until you do know where the failure is then you will not be
able to accomplish your goal.

The way to find if there is an ethernet connection is from using
ifconfig you should see at least 2 interfaces. One being Lo
(means loopback) and eth0 or ath0 or something to that effect.

Ndiswrapper site is a good place to go. Google ndiswrapper.

In this order get ndiswrapper working
Then make sure there is a connection
Enable wpa_supplicant




  • Member
  • *
  • Posts: 6
Oh Man! That was too much!
I finally got my card to work but it required a full reinstall (with the wireless package selected this time).
Then through the package manager I uninstalled the old wpa supplicant.
Make and make install the current Madwifi drivers (removing the old ones)
Then I made sure that the card connected to my open network (I took WPA off my router temporarily)
   I did that by modprobe ath_pci
                          ifconfig ath0 up
                         dhcpcd ath0
                         then pinged to see if it worked, it did
I enabled the WPA encryption back on my router.

Then, with hesitation and hope I installed the current version of wpa_supplicant by
         (in the wpa_supplicant directory)
          cp defconfig .config
          mcedit .config
                        unflagged CONFIG_DRIVER_MADWIFI="y"
                        properly map the correct directory to the madwifi driver, in my case is was CFLAGS +=/root/madwifi-
                        still in the file Make sure that the CONFIG_DRIVER_WEXT="y" is unflagged
Save that and $ make
then cp the wpa_supplicant, wpa_cli and wpa_passphrase to the appropriate directory
In my case it was in /usr/sbin  (when I typed ls all these executable files were in green)
I then typed wpa_passphrase "myessid" "mypassword" (where "myessid" your network name and "mypassword" is your password; don't type the quotes)
then I copied the output on the screen into /etc/wpa_supplicant.conf
                   I made the file from scratch and it just had 4 lines! very simple
Then I started the supplicant
                  wpa_supplicant -Bw -Dwext -iath0 -c/etc/wpa_supplicant.conf
Then I typed
                   dhcpcd ath0
And I was online
I also changed the interface.conf in /etc/wireless to set my ath0 device

I haven't figured out how to get my card to run automatically when I boot up but thats ok cause I'm online!
Thank you to everyone who responded to my post!


  • Administrator
  • Vectorian
  • *****
  • Posts: 1346
  • Registered Linux User #386728
Add whatever commands you used to get your wireless network card started to the end of the /etc/rc.d/rc.local script. Use your favorite text editor, but you MUST be the root user to edit the script. That suggestion has worked for many a VL user who has wireless networking. ;-)

VL 6.0 SOHO latest alpha on one box, VL 5.9 Lite on the other.


  • Vectorian
  • ****
  • Posts: 1868
Glad to see that you have it working. When being new and
not sure what you have changed I found that a reload is better
than to keep spending time on it. Besides it takes about 30 mins.
or so and everything is done.

When you learn more then you will have an install script that makes
it even easier. For example changes to /etc/fstab, /etc/rc.d/rc/local,
and so on can all be done by a simple script.