Unable to connect to wifi with wpa_supplicant

5

2

I try to connect with wifi using wpa_supplicant from command line.
I use Ubuntu 12.04.1, and wpa_supplicant 0.7.3

Here is output of "iwlist wlan0 scan" related to AP I try connect to:

2:          Cell 01 - Address: 00:11:22:33:44:55
3-                    Channel:11
4-                    Frequency:2.462 GHz (Channel 11)
5-                    Quality=35/70  Signal level=-75 dBm  
6-                    Encryption key:on
7-                    ESSID:"NetworkName"
8-                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 9 Mb/s
9-                              18 Mb/s; 36 Mb/s; 54 Mb/s
10-                    Bit Rates:6 Mb/s; 12 Mb/s; 24 Mb/s; 48 Mb/s
11-                    Mode:Master
12-                    Extra:tsf=000004c96af22169
13-                    Extra: Last beacon: 2828ms ago
14-                    IE: Unknown: 00075732575F446176
15-                    IE: Unknown: 010882848B961224486C
16-                    IE: Unknown: 03010B
17-                    IE: Unknown: 2A0104
18-                    IE: Unknown: 32040C183060
19-                    IE: Unknown: 2D1A6E1017FFFF000001000000000000000000000000000000000000
20-                    IE: Unknown: 3D160B000100000000000000000000000000000000000000
21-                    IE: Unknown: 3E0100
22-                    IE: WPA Version 1
23-                        Group Cipher : TKIP
24-                        Pairwise Ciphers (2) : TKIP CCMP
25-                        Authentication Suites (1) : PSK
26-                    IE: Unknown: DD180050F2020101000003A4000027A4000042435E0062322F00
27-                    IE: Unknown: 7F0101
28-                    IE: Unknown: DD07000C4300000000
29-                    IE: Unknown: DD1E00904C336E1017FFFF000001000000000000000000000000000000000000
30-                    IE: Unknown: DD1A00904C340B000100000000000000000000000000000000000000

I use wpa_passphrase for create psk:

user@comp-name:~$ wpa_passphrase "NetworkName" "Password"

This is content of /etc/wpa_supplicant.conf:

network={
    ssid="NetworkName"
    psk=3d2e908171ebc0aca77f9cf0d4fd392ff76bb4236fa20a8718f1de4c92d5b81d
}

I call wpa_supplicant:

user@comp-name:~$ sudo wpa_supplicant -d -iwlan0 -Dwext -Dnl80211 -c/etc/wpa_supplicant.conf

Output:

Initializing interface 'wlan0' conf '/etc/wpa_supplicant.conf' driver 'nl80211' ctrl_interface 'N/A' bridge 'N/A'
Configuration file '/etc/wpa_supplicant.conf' -> '/etc/wpa_supplicant.conf'
Reading configuration file '/etc/wpa_supplicant.conf'
Priority group 0
   id=0 ssid='NetworkName'
netlink: Operstate: linkmode=1, operstate=5
nl80211: Register Action command failed: ret=-114 (Operation already in progress)
nl80211: Register Action match - hexdump(len=1): 06
nl80211: Failed to register Action frame processing - ignore for now
Own MAC address: 00:21:6b:1e:04:0a
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=0x80e4f28 key_idx=0 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=0x80e4f28 key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=0x80e4f28 key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=0x80e4f28 key_idx=3 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=0x80e4f28 key_idx=4 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=0x80e4f28 key_idx=5 set_tx=0 seq_len=0 key_len=0
RSN: flushing PMKID list in the driver
Setting scan request: 0 sec 100000 usec
WPS: UUID based on MAC address - hexdump(len=16): 5e 04 92 17 d9 f6 5a 71 8c c8 9d ec 15 53 ce 94
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
State: DISCONNECTED -> SCANNING
Starting AP scan for wildcard SSID
Scan requested (ret=0) - scan timeout 10 seconds
nl80211: Event message available
nl80211: Scan trigger
EAPOL: disable timer tick
EAPOL: Supplicant port status: Unauthorized
nl80211: Event message available
nl80211: New scan results available
Received scan results (42 BSSes)
BSS: Start scan result update 1
BSS: Add new id 0 BSSID 00:22:3f:ad:8c:8e SSID 'DartyBox_C62E'
New scan results available
Selecting BSS from priority group 0
Try to find WPA-enabled AP
0: 00:22:3f:ad:8c:8e ssid='DartyBox_C62E' wpa_ie_len=28 rsn_ie_len=0 caps=0x411
   skip - SSID mismatch
1: 00:11:22:33:44:55 ssid='NetworkName' wpa_ie_len=26 rsn_ie_len=0 caps=0x411
   selected based on WPA IE
   selected WPA AP 00:11:22:33:44:55 ssid='NetworkName'
Automatic auth_alg selection: 0x1
WPA: using IEEE 802.11i/D3.0
WPA: Selected cipher suites: group 8 pairwise 24 key_mgmt 2 proto 1
WPA: set AP WPA IE - hexdump(len=28): dd 1a 00 50 f2 01 01 00 00 50 f2 02 02 00 00 50 f2 02 00 50 f2 04 01 00 00 50 f2 02
WPA: clearing AP RSN IE
WPA: using GTK TKIP
WPA: using PTK CCMP
WPA: using KEY_MGMT WPA-PSK
WPA: not using MGMT group cipher
WPA: Set own WPA IE default - hexdump(len=24): dd 16 00 50 f2 01 01 00 00 50 f2 02 01 00 00 50 f2 04 01 00 00 50 f2 02
FT: Stored MDIE and FTIE from (Re)Association Response - hexdump(len=0):
Cancelling scan request
Trying to authenticate with 00:11:22:33:44:55 (SSID='NetworkName' freq=2462 MHz)
No keys have been configured - skip key clearing
State: SCANNING -> AUTHENTICATING
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
nl80211: Authenticate (ifindex=3)
  * bssid=00:11:22:33:44:55
  * freq=2462
  * SSID - hexdump_ascii(len=7):
     57 32 57 5f 44 61 76                              NetworkName         
  * IEs - hexdump(len=0): [NULL]
  * Auth Type 0
nl80211: Authentication request send successfully
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
nl80211: Event message available
nl80211: MLME event 37
SME: Authentication response: peer=00:11:22:33:44:55 auth_type=0 status_code=0
Trying to associate with 00:11:22:33:44:55 (SSID='NetworkName' freq=2462 MHz)
State: AUTHENTICATING -> ASSOCIATING
wpa_driver_nl80211_set_operstate: operstate 0->0 (DORMANT)
netlink: Operstate: linkmode=-1, operstate=5
WPA: set own WPA/RSN IE - hexdump(len=24): dd 16 00 50 f2 01 01 00 00 50 f2 02 01 00 00 50 f2 04 01 00 00 50 f2 02
nl80211: Associate (ifindex=3)
  * bssid=00:11:22:33:44:55
  * freq=2462
  * SSID - hexdump_ascii(len=7):
     57 32 57 5f 44 61 76                              NetworkName         
  * IEs - hexdump(len=24): dd 16 00 50 f2 01 01 00 00 50 f2 02 01 00 00 50 f2 04 01 00 00 50 f2 02
nl80211: Association request send successfully
nl80211: Event message available
nl80211: Ignored unknown event (cmd=19)
nl80211: Event message available
nl80211: MLME event 38
Association info event
resp_ies - hexdump(len=163): 01 08 82 84 8b 96 12 24 48 6c 32 04 0c 18 30 60 dd 18 00 50 f2 02 01 01 00 00 03 a4 00 00 27 a4 00 00 42 43 5e 00 62 32 2f 00 2d 1a 6e 10 17 ff ff 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 3d 16 0b 00 05 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 dd 1e 00 90 4c 33 6e 10 17 ff ff 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 dd 1a 00 90 4c 34 0b 00 05 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 dd 07 00 0c 43 00 00 00 00
freq=2462 MHz
FT: Stored MDIE and FTIE from (Re)Association Response - hexdump(len=0):
State: ASSOCIATING -> ASSOCIATED
wpa_driver_nl80211_set_operstate: operstate 0->0 (DORMANT)
netlink: Operstate: linkmode=-1, operstate=5
Associated to a new BSS: BSSID=00:11:22:33:44:55
No keys have been configured - skip key clearing
Associated with 00:11:22:33:44:55
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=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
RTM_NEWLINK: operstate=0 ifi_flags=0x11003 ([UP][LOWER_UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
nl80211: Event message available
nl80211: Ignore connect event (cmd=46) when using userspace SME
nl80211: Event message available
nl80211: MLME event 40
Disassociation notification
SME: Disassociation event received
SME: Deauthenticate to clear driver state
wpa_driver_nl80211_deauthenticate
nl80211: MLME command failed: ret=-107 (Transport endpoint is not connected)
Setting scan request: 0 sec 100000 usec
Added BSSID 00:11:22:33:44:55 into blacklist
CTRL-EVENT-DISCONNECTED bssid=00:11:22:33:44:55 reason=3
Disconnect event - remove keys
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=0x80e4f28 key_idx=0 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=0x80e4f28 key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=0x80e4f28 key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=0x80e4f28 key_idx=3 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=0x80e4f28 key_idx=4 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=0x80e4f28 key_idx=5 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=0x9137574 key_idx=0 set_tx=0 seq_len=0 key_len=0
   addr=00:11:22:33:44:55
State: ASSOCIATED -> DISCONNECTED
wpa_driver_nl80211_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
nl80211: Event message available
nl80211: Ignore disconnect event when using userspace SME
nl80211: Event message available
nl80211: Ignored unknown event (cmd=20)
nl80211: Event message available
nl80211: MLME event 39
Deauthentication notification
Added BSSID 00:00:00:00:00:00 into blacklist
CTRL-EVENT-DISCONNECTED bssid=00:00:00:00:00:00 reason=3
Disconnect event - remove keys
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=0x80e4f28 key_idx=0 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=0x80e4f28 key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=0x80e4f28 key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=0x80e4f28 key_idx=3 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=0x80e4f28 key_idx=4 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=0x80e4f28 key_idx=5 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=0x9137574 key_idx=0 set_tx=0 seq_len=0 key_len=0
   addr=00:00:00:00:00:00
State: DISCONNECTED -> DISCONNECTED
wpa_driver_nl80211_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
State: DISCONNECTED -> SCANNING
Starting AP scan for wildcard SSID
Scan requested (ret=0) - scan timeout 30 seconds
nl80211: Event message available
nl80211: Scan trigger
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
EAPOL: startWhen --> 0
EAPOL: disable timer tick
EAPOL: Supplicant port status: Unauthorized
^CCTRL-EVENT-TERMINATING - signal 2 received
Removing interface wlan0
No keys have been configured - skip key clearing
State: SCANNING -> DISCONNECTED
wpa_driver_nl80211_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
No keys have been configured - skip key clearing
Removed BSSID 00:00:00:00:00:00 from blacklist (clear)
Removed BSSID 00:11:22:33:44:55 from blacklist (clear)
BSS: Remove id 0 BSSID 00:22:3f:ad:8c:8e SSID 'DartyBox_C62E'
Cancelling scan request
Cancelling authentication timeout
netlink: Operstate: linkmode=0, operstate=6

Any ideas?

Rodnower

Posted 2012-10-15T12:05:02.120

Reputation: 1 739

1Have you tried running wpa_supplicant with increased verbosity? What hardware are you using? Are you generating the psk correctly with # wpa_passphrase "mywireless_ssid" "secretpassphrase"? – dset0x – 2012-10-15T12:10:39.353

I tried use wpa_passfrase and updated /etc/wpa_supplicat.conf, but I have same error... May be I need put more information in /etc/wpa_supplicat.conf? – Rodnower – 2012-10-15T13:57:24.320

Is the driver for your interface loaded? Did increased verbosity return anything useful? Try removing -B while testing and add -Dwext and then -Dnl80211 to force a driver. – dset0x – 2012-10-15T14:03:16.730

The same, but "ioctl[SIOCSIWENCODEEXT]: Invalid argument" disappear when I set -Dnl80211. But still: WPA: 4-Way Handshake failed - pre-shared key may be incorrect. I will put output with -d option. – Rodnower – 2012-10-15T16:40:38.640

Answers

6

I have seen such error messages before but no definite solution. Things you might want to try are:

  • Read wpa_supplicant.conf(5). The examples will give you an idea of extra network options you can experiment with. Don't forget to add double quotes for psk=.

  • Use -Dnl80211 instead. It appears that this is the driver you need.

  • Experiment with your router's network modes (B/G/N). Try setting it to different values since incompatibilities between the router and the wireless card / driver might exist.

  • Give compat-wireless a try. I have not had to use it myself in the past but I have read that it contains patches with fixes for problems like yours in the past.

dset0x

Posted 2012-10-15T12:05:02.120

Reputation: 1 897

Thanx. I will try all of it :) – Rodnower – 2012-10-20T11:40:03.493

3

I fixed it in Gentoo by shutting down the NetworkManager:

/etc/init.d/NetworkManager stop

It may conflict with wpa_supplicant when both are running.

gentoo

Posted 2012-10-15T12:05:02.120

Reputation: 31