# Cant connect with wpa supplicant

## Edder

Hello community,

i'm facing a problem with wpa_supplicant...

I Installed gentoo with the help of the livedvd and there wifi worked just fine.

Cant figure out why it does not work on my gentoo build.

This is my config (but is also does not work with the config wicd generated on livedvd):

```

#Generated by NetworkManager

###### Global Configuration ######

###### Security Configuration ######

network={

   auth_alg=OPEN

   priority=1

   ssid=776972656C6573732D6C616E5F6E6574776F726B

   mode=0

   key_mgmt=WPA-PSK

   psk="verystrongpassword"

}

```

and this is the output of "wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf -d"

```

Initializing interface 'wlan0' conf '/etc/wpa_supplicant/wpa_supplicant.conf' driver 'default' ctrl_interface 'N/A' bridge 'N/A'

Configuration file '/etc/wpa_supplicant/wpa_supplicant.conf' -> '/etc/wpa_supplicant/wpa_supplicant.conf'

Reading configuration file '/etc/wpa_supplicant/wpa_supplicant.conf'

Priority group 1

   id=0 ssid='wireless-lan_network'

WEXT: cfg80211-based driver detected

SIOCGIWRANGE: WE(compiled)=22 WE(source)=21 enc_capa=0xf

  capabilities: key_mgmt 0xf enc 0xf flags 0x0

netlink: Operstate: linkmode=1, operstate=5

Own MAC address: 00:21:6b:5b:d4:98

wpa_driver_wext_set_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0

wpa_driver_wext_set_key: alg=0 key_idx=1 set_tx=0 seq_len=0 key_len=0

wpa_driver_wext_set_key: alg=0 key_idx=2 set_tx=0 seq_len=0 key_len=0

wpa_driver_wext_set_key: alg=0 key_idx=3 set_tx=0 seq_len=0 key_len=0

wpa_driver_wext_set_countermeasures

RSN: flushing PMKID list in the driver

Setting scan request: 0 sec 100000 usec

EAPOL: SUPP_PAE entering state DISCONNECTED

EAPOL: Supplicant port status: Unauthorized

EAPOL: KEY_RX entering state NO_KEY_RECEIVE

EAPOL: SUPP_BE entering state INITIALIZE

EAP: EAP entering state DISABLED

EAPOL: Supplicant port status: Unauthorized

EAPOL: Supplicant port status: Unauthorized

Added interface wlan0

RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])

RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added

RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])

RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added

Wireless event: cmd=0x8b06 len=12

RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])

RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added

Wireless event: cmd=0x8b1a len=16

State: DISCONNECTED -> SCANNING

Starting AP scan for wildcard SSID

Scan requested (ret=0) - scan timeout 5 seconds

EAPOL: disable timer tick

EAPOL: Supplicant port status: Unauthorized

RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])

RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added

Wireless event: cmd=0x8b19 len=16

Received 2553 bytes of scan results (5 BSSes)

BSS: Start scan result update 1

BSS: Add new id 0 BSSID 00:1f:3f:9f:4b:14 SSID 'wireless-lan_network'

BSS: Add new id 1 BSSID 00:12:17:cb:f2:3e SSID 'PSR'

BSS: Add new id 2 BSSID 00:1a:4f:93:aa:28 SSID 'AML'

BSS: Add new id 3 BSSID 00:1f:3f:7f:56:47 SSID 'WLAN-001F3F7F5647'

BSS: Add new id 4 BSSID 00:24:fe:78:ef:fa SSID 'FRITZ!Box Fon WLAN 7112'

New scan results available

Selecting BSS from priority group 1

Try to find WPA-enabled AP

0: 00:1f:3f:9f:4b:14 ssid='wireless-lan_network' wpa_ie_len=0 rsn_ie_len=20 caps=0x11

   selected based on RSN IE

   selected WPA AP 00:1f:3f:9f:4b:14 ssid='wireless-lan_network'

Trying to associate with 00:1f:3f:9f:4b:14 (SSID='wireless-lan_network' freq=2447 MHz)

Cancelling scan request

WPA: clearing own WPA/RSN IE

Automatic auth_alg selection: 0x1

Overriding auth_alg selection: 0x1

RSN: using IEEE 802.11i/D9.0

WPA: Selected cipher suites: group 16 pairwise 16 key_mgmt 2 proto 2

WPA: clearing AP WPA IE

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

WPA: using GTK CCMP

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 04 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

wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)

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

wpa_driver_wext_associate

wpa_driver_wext_set_drop_unencrypted

wpa_driver_wext_set_psk

Setting authentication timeout: 10 sec 0 usec

EAPOL: External notification - EAP success=0

EAPOL: Supplicant port status: Unauthorized

EAPOL: External notification - EAP fail=0

EAPOL: Supplicant port status: Unauthorized

EAPOL: External notification - portControl=Auto

EAPOL: Supplicant port status: Unauthorized

RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])

RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added

Wireless event: cmd=0x8b1a len=16

RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])

RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added

Wireless event: cmd=0x8b06 len=12

RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])

RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added

Wireless event: cmd=0x8b04 len=16

RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])

RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added

Wireless event: cmd=0x8b1a len=36

RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])

RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added

Wireless event: cmd=0x8b1a len=16

RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])

RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added

Wireless event: cmd=0x8b06 len=12

RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])

RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added

Wireless event: cmd=0x8b04 len=16

RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])

RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added

Wireless event: cmd=0x8b1a len=36

RTM_NEWLINK: operstate=0 ifi_flags=0x11003 ([UP][LOWER_UP])

RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added

RTM_NEWLINK: operstate=0 ifi_flags=0x11003 ([UP][LOWER_UP])

RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added

Wireless event: cmd=0x8c08 len=193

AssocResp IE wireless event - hexdump(len=177): 01 08 82 84 8b 0c 12 96 18 24 32 04 30 48 60 6c dd 18 00 50 f2 02 01 01 82 00 03 a4 00 00 27 a4 00 00 42 43 5e 00 62 32 2f 00 dd 09 00 03 7f 01 01 00 00 ff 7f dd 0a 00 03 7f 04 01 00 00 00 00 00 dd 1e 00 90 4c 33 4e 10 1b ff ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2d 1a 4e 10 1b ff ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 dd 1a 00 90 4c 34 08 0f 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 3d 16 08 0f 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

RTM_NEWLINK: operstate=0 ifi_flags=0x11003 ([UP][LOWER_UP])

RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added

Wireless event: cmd=0x8b15 len=24

Wireless event: new AP: 00:1f:3f:9f:4b:14

Association info event

resp_ies - hexdump(len=177): 01 08 82 84 8b 0c 12 96 18 24 32 04 30 48 60 6c dd 18 00 50 f2 02 01 01 82 00 03 a4 00 00 27 a4 00 00 42 43 5e 00 62 32 2f 00 dd 09 00 03 7f 01 01 00 00 ff 7f dd 0a 00 03 7f 04 01 00 00 00 00 00 dd 1e 00 90 4c 33 4e 10 1b ff ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2d 1a 4e 10 1b ff ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 dd 1a 00 90 4c 34 08 0f 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 3d 16 08 0f 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

State: ASSOCIATING -> ASSOCIATED

wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)

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

Associated with 00:00:00:00:00:00

WPA: Association event - clear replay counter

WPA: Clear old PTK

EAPOL: External notification - portEnabled=0

EAPOL: Supplicant port status: Unauthorized

EAPOL: External notification - portValid=0

EAPOL: Supplicant port status: Unauthorized

EAPOL: External notification - EAP success=0

EAPOL: Supplicant port status: Unauthorized

EAPOL: External notification - portEnabled=1

EAPOL: SUPP_PAE entering state CONNECTING

EAPOL: enable timer tick

EAPOL: SUPP_BE entering state IDLE

Setting authentication timeout: 10 sec 0 usec

Cancelling scan request

RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])

RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added

Wireless event: cmd=0x8b15 len=24

Wireless event: new AP: 00:00:00:00:00:00

Disassociation notification

Setting scan request: 0 sec 100000 usec

Added BSSID 00:1f:3f:9f:4b:14 into blacklist

CTRL-EVENT-DISCONNECTED bssid=00:1f:3f:9f:4b:14 reason=0

Disconnect event - remove keys

wpa_driver_wext_set_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0

wpa_driver_wext_set_key: alg=0 key_idx=1 set_tx=0 seq_len=0 key_len=0

wpa_driver_wext_set_key: alg=0 key_idx=2 set_tx=0 seq_len=0 key_len=0

wpa_driver_wext_set_key: alg=0 key_idx=3 set_tx=0 seq_len=0 key_len=0

wpa_driver_wext_set_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0

State: ASSOCIATED -> DISCONNECTED

wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)

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

EAPOL: External notification - portEnabled=0

EAPOL: SUPP_PAE entering state DISCONNECTED

EAPOL: Supplicant port status: Unauthorized

EAPOL: SUPP_BE entering state INITIALIZE

EAPOL: Supplicant port status: Unauthorized

EAPOL: External notification - portValid=0

EAPOL: Supplicant port status: Unauthorized

EAPOL: External notification - EAP success=0

EAPOL: Supplicant port status: Unauthorized

State: DISCONNECTED -> SCANNING

Starting AP scan for wildcard SSID

Scan requested (ret=-1) - scan timeout 30 seconds

Failed to initiate AP scan.

State: SCANNING -> DISCONNECTED

wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)

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

Setting scan request: 1 sec 0 usec

RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])

RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added

EAPOL: Supplicant port status: Unauthorized

State: DISCONNECTED -> SCANNING

Starting AP scan for wildcard SSID

Scan requested (ret=-1) - scan timeout 30 seconds

Failed to initiate AP scan.

State: SCANNING -> DISCONNECTED

wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)

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

Setting scan request: 1 sec 0 usec

EAPOL: Supplicant port status: Unauthorized

State: DISCONNECTED -> SCANNING

Starting AP scan for wildcard SSID

Scan requested (ret=-1) - scan timeout 30 seconds

Failed to initiate AP scan.

State: SCANNING -> DISCONNECTED

wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)

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

Setting scan request: 1 sec 0 usec

CTRL-EVENT-TERMINATING - signal 2 received

Removing interface wlan0

No keys have been configured - skip key clearing

State: DISCONNECTED -> DISCONNECTED

wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)

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

EAPOL: External notification - portEnabled=0

EAPOL: Supplicant port status: Unauthorized

EAPOL: External notification - portValid=0

EAPOL: Supplicant port status: Unauthorized

EAPOL: External notification - EAP success=0

EAPOL: Supplicant port status: Unauthorized

wpa_driver_wext_set_countermeasures

No keys have been configured - skip key clearing

Removed BSSID 00:1f:3f:9f:4b:14 from blacklist (clear)

BSS: Remove id 0 BSSID 00:1f:3f:9f:4b:14 SSID 'wireless-lan_network'

BSS: Remove id 1 BSSID 00:12:17:cb:f2:3e SSID 'PSR'

BSS: Remove id 2 BSSID 00:1a:4f:93:aa:28 SSID 'AML'

BSS: Remove id 3 BSSID 00:1f:3f:7f:56:47 SSID 'WLAN-001F3F7F5647'

BSS: Remove id 4 BSSID 00:24:fe:78:ef:fa SSID 'FRITZ!Box Fon WLAN 7112'

Cancelling scan request

Cancelling authentication timeout

netlink: Operstate: linkmode=0, operstate=6
```

My wireless card: Intel PRO/Wireless 5100 AGN (with firmware version 2, tested also with the masked firmware version 5)

And in the kernel setup I marked "Intel Wireless WiFi Next Gen AGN -Wireless-N/Advanced-N/Ultimate-N (iwlagn)" as built-in <*> under wireless device drivers

Someone got an idea what the problem could be?

----------

## Quincy

What is the security setting of the network (WPA-PSK or WPA2-PSK)?

wpa_supplicant (at least for me) has no straightforward configuration file. Here are two examples for WPA/WPA2: http://www.thinkwiki.org/wiki/How_to_install_wpa_supplicant#Configuration

----------

## Edder

Thanks for your answer Quincy, as i already said I tested all configurations (the configuration file wicd generated on livedvd for instance).

I'm pretty sure it isnt the config file but i'll test a few configurations, the weird thing though is the according to the log it was associated and disconnected right after it.bv

----------

## Edder

I think I found the problem -> https://bugs.gentoo.org/show_bug.cgi?id=397465

----------

## asobieranski

I agree with Edder. I had the same problem with my iwlagn. I upgraded from 3.0.6 to 3.1.6 and WPA does not work anymore.

I just recompiled my kernel with 

https://bugs.gentoo.org/attachment.cgi?id=297759&action=diff

and everything is fine again.

----------

