# wpa_supplicant fails to associate with an AP

## leguaan

Hello,

I have problems with wifi.

Connection to an unsecured wifi AP works fine.

```
iwconfig wlan0 essid "default"

dhcpcd wlan0
```

is satisfactory, but when trying to connect to WPA/TKIP protected AP, the computer fails to associate.

I'm using WPA supplicant, and following command

```
# wpa_supplicant -Dndiswrapper -iwlan0 -c/etc/wpa_supplicant.conf
```

gives me this output:

 *Quote:*   

> Trying to associate with 00:11:09:0c:c9:1d (SSID='Net' freq=2462 MHz)
> 
> Association request to the driver failed
> 
> Authentication with 00:00:00:00:00:00 timed out.
> ...

 

and it goes on and on...

I haven't made any changes in wpa_supplicant.conf recently...

the relevant part of it looks like this:

 *Quote:*   

> 
> 
> ctrl_interface=/var/run/wpa_supplicant
> 
> ctrl_interface_group=0
> ...

 

Can anybody help me? What can be wrong?[/code]

----------

## animous

I have the same problem.  My config looks very much like yours.  If you find a solution, please post it!  Thanks.

----------

## kds66

Same problem here. I player with the ap_scan parameter, applying 0, 1 and 2, but nothing works.

----------

## Matrix7

You might find this thread has a solution:

https://forums.gentoo.org/viewtopic-t-513501-highlight-association+request.html

In your /etc/conf.d/net replace:

wpa_supplicant_wlan0="-Dndiswrapper"

with:

wpa_supplicant_wlan0="-Dwext"

Hope this helps.

----------

## big-birdy

Do you use a pc or a notebook? I had the same problem with my notebook. I had to activate the wireless in the bios and installe acer_acpi. 

Now my wireless is fine.

Big-birdy

Sorry for my bad english.   :Embarassed: 

----------

## kds66

I got it finally working. Here's what I have in my config files now.

/etc/conf.d/net:

```

...

modules=( "wpa_supplicant" )

wpa_supplicant_wlan0="-Dwext"

associate_timeout_wlan0=60

```

/etc/wpa_supplicant.conf:

```

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=10

ap_scan=2

update_config=1

network={

    ...

}

```

Apparently, ap_scan must be set to 2. I could not get an association with 0 and 1.

----------

## kds66

The solution in my previous posting works with ndiswrapper-1.28. When I updated to ndiswrapper-1.29 today, wireless support was gone. I am back to 1.28 again. If anybody finds out what to do for 1.29, please drop a line.

----------

## dreadhead

Replacing -Dndiswrappper with -Dwext worked for me with ndiswrapper-1.29 and 1.30 and Netgear WPN111 (Atheros USB)

Thank you!

My configs:

/etc/conf.d/net:

```
modules=( "wpa_supplicant" )

wpa_supplicant_wlan0="-Dwext"

wpa_timeout_wlan0=60

```

/etc/wpa_supplicant.conf:

```
ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=0

eapol_version=1

ap_scan=2

fast_reauth=1

network={

        ssid="myssid"

        scan_ssid=1

        proto=WPA

        key_mgmt=WPA-PSK

        psk="mysecretpassphrase"

        priority=5

}
```

Hope this helps

----------

