# [Solved] wpa_supplicant failed to start correctly

## GTXcube

Hello everybody. Today I reinstalled my gentoo but somethings wrong with my wifi. When i try to start wpa_supplicant with this cmd

```
wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf
```

it says:

```
ioctl[SIOCSIWPMKSA]: Invalid argument

ioctl...

Could not read SSID from driver
```

My wpa_supplicant.conf looks like:

```
ap_scan=0

ctrl_interface=DIR=/var/run/wpa_supplicant

network={

   ssid="my network"

   psk="my pass"

   scan_ssid=1

   proto=WPA2

   key_mgmt=WPA-PSK

   group=CCMP TKIP

   pairwise=CCMP TKIP

   priority=5

}
```

And my /etc/conf.d/net looks like this:

```
dns_domin_lo="homenetwork"

nis_domain_lo="my-nisdomain"

modules_wlan0="wpa_supplicant"

wpa_supplicant_wlan0="-Dwext"

config_wlan0="dhcp"
```

When I try to start /etc/init.d/net.wlan0, it says:

```
WARNING: net.wlan0 has already started, but its inactive
```

I use belkin wireless pci card with ath5k chip. wpa_supplicant package has been compiled with dbus, readline and ssl use flags. Where can be a problem ? Before I used cable LAN connection so I have no experience with wifi. Thanks for reply  :Smile: Last edited by GTXcube on Fri Dec 28, 2012 10:06 am; edited 1 time in total

----------

## gabrielg

Hi, GTXcube, I haven't got much experience with your card in particular, but I'll try to help.

First of all, you shouldn't need to run wpa_supplicant manually (although it helps to troubleshoot problems). Are you familiar with this guide? http://wiki.gentoo.org/wiki/Wpa_supplicant

Secondly, are you sure that your card's drivers are configured/loaded properly? Perhaps providing the output of lspci -k could help. Also, check dmesg and /var/log/messages for anything strange regarding your ath5k card. Did you configure your kernel as is explained here? http://www.linuxwireless.org/en/users/Drivers/ath5k#Enabling_ath5k.

Your configuration seems ok from where I stand, if not a little bit excessive - I use WPA2 and setting ssid and psk are enough (wpa_supplicant does the rest for you).

HTH

----------

## GTXcube

1. yes i used this guide

2. yes i did but I am not sure if is kernel config correct

What else should I post guys ?

----------

## gabrielg

Start with your kernel config and version, I have a box with that card and will compare. Use pastebin or similar please.

----------

## GTXcube

Version of my kernel is 3.6.11 and this is my config:

```
http://pastebin.com/dsG1HpJM
```

----------

## gabrielg

Try setting this in your kernel config, recompile, reboot and test:

```

CONFIG_CFG80211_WEXT=y

```

Not sure how experienced you are with kernel config, but you can either do it directly in .config or via the menu - the "/" command is useful while in the config menu, it allows you to search for symbols and tells you where they are, value and description. This one in particular is:

 *Quote:*   

> 
> 
> Symbol: CFG80211_WEXT [=y]                                     
> 
>    Type  : boolean                                                         
> ...

 

The rest seems ok to me.

----------

## wcg

```

wpa_supplicant_wlan0="-Dwext"

```

You may not need this. First, this is the default driver, the one wpa_supplicant

will use if you do not pass it any "-D[driver]" option. Second, there is a file

/etc/conf.d/wpa_supplicant (at least on my system after a fairly recent

wpa_supplicant install) that has a variable in it called:

```

wpa_supplicant_args=""

```

(Still empty for me, as I am not passing any arguments to wpa_supplicant

at boot, but I assume that if you wanted to pass wpa_supplicant a "-D[driver]"

option, that is where you would put it.)

I do not know if changing that will fix your problem. (Could just be another

way to "skin the same cat.")

----------

## _______0

post info of these two things:

```
dmesg
```

and wpa_supplicant in VERBOSE MODE.

Also  make sure your card doesn't require extra firmware.

Could you also post the output of lsusb??

----------

## GTXcube

I just had to activate CONFIG_CFG80211_WEXT=y in my kernel so it works. Sometimes device wlan0 doesnt load adapter but after reboot its ok. I use NetworkManager and it works perfect. Thanks for help guys  :Smile: 

----------

