# [solved] wpa_supplicant not associating

## wobblytickle

Can someone have a quick look at this before I pull what little is left of my hair out.

I have a linksys pcmcia 802.11g card that I've been happily running with ndsiwrapper for ages, first with iwconfig et al. and most recently with wpa_supplicant. I changed my AP point recently (from a Belkin running DD-WRT to a WRT54GS running the same rev (but not micro) of DD-WRT and possibly in a spate of upgrades something has gone awry with the setup. Running wpa_supplicant 0.49 with ndiswrapper 1.11, and what was working now no longer does. Upgrading to 0.54 and 1.17 respectively and still no go.

On loading ndiswrapper and trying wpa_supplicant dmesg says this:

```

olive tmp # wpa_supplicant -Dndiswrapper  -iwlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf  -dd

ndiswrapper version 1.17 loaded (preempt=yes,smp=no)

ndiswrapper: driver bcmwl5 (Linksys,07/17/2003, 3.30.15.0) loaded

PCI: Enabling device 0000:02:00.0 (0000 -> 0002)

ACPI: PCI Interrupt 0000:02:00.0[A] -> Link [LNKA] -> GSI 11 (level, low) -> IRQ 11

PCI: Setting latency timer of device 0000:02:00.0 to 64

ndiswrapper: using irq 11

wlan0: vendor: ''

wlan0: ndiswrapper ethernet device 00:12:17:16:af:1b using driver bcmwl5, 14E4:4320.5.conf

wlan0: encryption modes supported: WEP; TKIP with WPA; AES/CCMP with WPA

ndiswrapper (set_auth_mode:653): setting auth mode to 7 failed (C0010015)

ndiswrapper (set_auth_mode:653): setting auth mode to 7 failed (C0010015)

ndiswrapper (set_auth_mode:653): setting auth mode to 7 failed (C0010015)

```

Running wpa_supplicant in the forground does this over and over:

```
State: ASSOCIATING -> DISCONNECTED

WEXT: Operstate: linkmode=-1, operstate=5

No keys have been configured - skip key clearing

EAPOL: External notification - portEnabled=0

EAPOL: External notification - portValid=0

Setting scan request: 0 sec 0 usec

State: DISCONNECTED -> SCANNING

Starting AP scan (broadcast SSID)

Scan timeout - try to get results

Received 708 bytes of scan results (3 BSSes)

Scan results: 3

Selecting BSS from priority group 0

0: 00:16:b6:1e:d2:65 ssid='chuci' wpa_ie_len=30 rsn_ie_len=26 caps=0x11

   skip - blacklisted

1: 00:90:4b:79:03:91 ssid='Maynardy' wpa_ie_len=24 rsn_ie_len=0 caps=0x11

   skip - SSID mismatch

2: 82:7f:85:9d:ce:07 ssid='mncc' wpa_ie_len=0 rsn_ie_len=0 caps=0x12

   skip - no WPA/RSN IE

No APs found - clear blacklist and try again

Removed BSSID 00:16:b6:1e:d2:65 from blacklist (clear)

Selecting BSS from priority group 0

0: 00:16:b6:1e:d2:65 ssid='chuci' wpa_ie_len=30 rsn_ie_len=26 caps=0x11

   selected based on RSN IE

Trying to associate with 00:16:b6:1e:d2:65 (SSID='chuci' freq=2417 MHz)

Cancelling scan request

WPA: clearing own WPA/RSN IE

Automatic auth_alg selection: 0x1

RSN: using IEEE 802.11i/D9.0

WPA: Selected cipher suites: group 8 pairwise 24 key_mgmt 2

WPA: set AP WPA IE - hexdump(len=30): dd 1c 00 50 f2 01 01 00 00 50 f2 02 02 00 00 50 f2 04 00 50 f2 02 01 00 00 50 f2 02 00 00

WPA: set AP RSN IE - hexdump(len=26): 30 18 01 00 00 0f ac 02 02 00 00 0f ac 04 00 0f ac 02 01 00 00 0f ac 02 00 00

WPA: using GTK TKIP

WPA: using PTK CCMP

WPA: using KEY_MGMT WPA-PSK

WPA: Set own WPA IE default - hexdump(len=22): 30 14 01 00 00 0f ac 02 01 00 00 0f ac 04 01 00 00 0f ac 02 00 00

No keys have been configured - skip key clearing

State: SCANNING -> ASSOCIATING

WEXT: Operstate: linkmode=-1, operstate=5

Association request to the driver failed

Setting authentication timeout: 5 sec 0 usec

EAPOL: External notification - EAP success=0

EAPOL: External notification - EAP fail=0

EAPOL: External notification - portControl=Auto

RSN: Ignored PMKID candidate without preauth flag

Authentication with 00:00:00:00:00:00 timed out.

Added BSSID 00:16:b6:1e:d2:65 into blacklist

State: ASSOCIATING -> DISCONNECTED

WEXT: Operstate: linkmode=-1, operstate=5

No keys have been configured - skip key clearing

EAPOL: External notification - portEnabled=0

EAPOL: External notification - portValid=0

Setting scan request: 0 sec 0 usec

State: DISCONNECTED -> SCANNING

Starting AP scan (broadcast SSID)

CTRL-EVENT-TERMINATING - signal 2 received

Removing interface wlan0

State: SCANNING -> DISCONNECTED

WEXT: Operstate: linkmode=-1, operstate=5

No keys have been configured - skip key clearing

EAPOL: External notification - portEnabled=0

EAPOL: External notification - portValid=0

Failed to disable WPA in the driver.

No keys have been configured - skip key clearing

WEXT: Operstate: linkmode=0, operstate=6

Removed BSSID 00:16:b6:1e:d2:65 from blacklist (clear)

Cancelling scan request

```

And does very similar things when I try it with -Dwext too

Here's the config:

```
olive tmp # grep -v ^# /etc/wpa_supplicant/wpa_supplicant.conf 

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=0

eapol_version=1

ap_scan=1

fast_reauth=1

network={

   ssid="chuci"

   psk="keygoeshere"

   #auth_alg=OPEN

   #group=CCMP TKIP

   #group=TKIP

   #proto=WPA

   #pairwise=CCMP

}

```

No combination of the above will associate. The router is set to WPA2 mixed mode with TKIP+AES, but WPA with either, or WPA2 with either does this too. Over and over.

Can anyone give me any pointers?Last edited by wobblytickle on Wed Sep 20, 2006 11:34 pm; edited 1 time in total

----------

## opopanax

I just recently had a major problem with this as well, almost identical to yours.  To get it working, I'm not sure what I did--but I do know that the new wpa_supplicant has a "dbus" use flag.  so, if your system is using d-bus, then try recompiling wpa_supplicant with that flag activated either in /etc/make.conf or /etc/portage/package.use.

I did give up on ndiswrapper, which I was only using because wpa_supplicant and madwifi were not cooperating about 6 months ago.  Now they work together like a charm, so if you have an atheros chipset, I'd highly recommend installing madwifi-ng and madwifi-ng-tools.  

Once you do have them installed, add ath_pci to /etc/modules.autoload.d/kernel-2.6, and re-emerge wpa_supplicant.  

Rewrite your /etc/conf.d/net to include ath0 instead of wlan0 for any definitions you have, and use "-Dmadwifi" instead of "-Dndiswrapper".  

Make sure you didn't do anything funky to your /etc/wpa_supplicant.conf.

symlink /etc/init.d/net.lo to /etc/init.d/net.ath0.

rc-update add net.ath0 default    if you want to have this start at boot.

/etc/init.d/net.ath0 start, and you should be good to go.

If you don't have an atheros chip, just try re-merging wpa_supplicant with the dbus support, and see how far that gets you.

Good luck!

----------

## wobblytickle

Well I'm back from my holiday, where I had my laptop and removed all hair from my head. On my travels there were several wireless networks to be seen, some of them without any encryption at all. Even these I was not able to associate with.

Anyway, half an hours trawling here and I have the problem solved. I was hit by https://bugs.gentoo.org/show_bug.cgi?id=147006 too, and the fix there worked for me. ndiswrapper and wpa_supplicant are playing nicely again.

----------

