setup

i'm using:

net-wireless/madwifi-ng-tools-0.9.3.1
net-wireless/hostapd-0.4.9
net-wireless/wpa_supplicant-0.5.7

pc1 is the hostapd access point using madwifi + ap settings set with wlanconfig pc2 is the wpa_supplicant client

problem

in many cases i can't connect to the access point using wpa_supplicant from pc2 and i get the error lines you can find on this page, seek error:

pc2 says (in short):

pc2a ~ # wpa_supplicant -D madwifi -i  ath0 -c /etc/wpa_supplicant/wpa_supplicant.conf
Associated with 00:0f:a3:80:c9:0e
WPA: Failed to get master session key from EAPOL state machines
WPA: Key handshake aborted

pc1 says (in short):

pc1a hostapd # cat z
ath0: STA 00:40:f4:a0:b0:67 IEEE 802.11: associated
ath0: STA 00:40:f4:a0:b0:67 IEEE 802.11: disassociated
ioctl[unknown???]: Invalid argument
ioctl[unknown???]: Invalid argument
ioctl[unknown???]: Invalid argument

i'm not sure what is wrong but in some cases wpa_supplicant can't manage to connect for minutes and after stopping for a while and trying later it's a series of successes. what causes this?

command lines

pc1 # wlanconfig ath0 destroy; wlanconfig ath0 create wlandev wifi0 wlanmode ap
pc1 # hostapd /etc/hostapd/hostapd.conf
pc2 # wpa_supplicant -D madwifi -i ath0 -c /etc/wpa_supplicant/wpa_supplicant.conf

config file wpa_supplicant.conf

pc2a tmp # cat /etc/wpa_supplicant/wpa_supplicant.conf
# This is a network block that connects to any unsecured access point.
# We give it a low priority so any defined blocks are preferred.
network={
        ssid="test"
        #psk="passphrase"
        psk=a8f6fbf02bfbd7ddd27249ac101487ff51c245b2c34c2efe46b6e680b367ee32
}

config file hostapd.conf

pc1a ~ # cat /etc/hostapd/hostapd.conf
interface=ath0
driver=madwifi
logger_syslog=-1
logger_syslog_level=2
logger_stdout=-1
logger_stdout_level=2
debug=0
dump_file=/tmp/hostapd.dump
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
macaddr_acl=0
auth_algs=3
eapol_key_index_workaround=0
eap_server=0
own_ip_addr=127.0.0.1
wpa=1
wpa_key_mgmt=WPA-PSK
wpa_pairwise=CCMP
ssid=test
wpa_group_rekey=600
wpa_gmk_rekey=86400
wpa_psk=a8f6fbf02bfbd7ddd27249ac101487ff51c245b2c34c2efe46b6e680b367ee32

error - multiple tries

pc2a tmp # wpa_supplicant -D wext -i ath0 -c /etc/wpa_supplicant/wpa_supplicant.conf -dd
Initializing interface 'ath0' conf '/etc/wpa_supplicant/wpa_supplicant.conf' driver 'wext' 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'
Line: 3 - start of a new network block
ssid - hexdump_ascii(len=4):
     74 65 73 74                                       test
PSK - hexdump(len=32): [REMOVED]
Priority group 0
   id=0 ssid='test'
Initializing interface (2) 'ath0'
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: KEY_RX entering state NO_KEY_RECEIVE
EAPOL: SUPP_BE entering state INITIALIZE
EAP: EAP entering state DISABLED
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
SIOCGIWRANGE: WE(compiled)=21 WE(source)=13 enc_capa=0xf
  capabilities: key_mgmt 0xf enc 0xf
WEXT: Operstate: linkmode=1, operstate=5
Own MAC address: 00:40:f4:a0:b0:67
wpa_driver_wext_set_wpa
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
wpa_driver_wext_set_drop_unencrypted
Setting scan request: 0 sec 100000 usec
Added interface ath0
RTM_NEWLINK: operstate=0 ifi_flags=0x1002 ()
Wireless event: cmd=0x8b06 len=8
Ignore event for foreign ifindex 11
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'ath0' added
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'ath0' added
RTM_NEWLINK: operstate=0 ifi_flags=0x11003 ([UP][LOWER_UP])
Wireless event: cmd=0x8b15 len=20
Wireless event: new AP: 00:0f:a3:80:c9:0e
State: DISCONNECTED -> ASSOCIATED
wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)
WEXT: Operstate: linkmode=-1, operstate=5
Associated to a new BSS: BSSID=00:0f:a3:80:c9:0e
No keys have been configured - skip key clearing
Network configuration found for the current AP
WPA: No WPA/RSN IE available from association info
WPA: Set cipher suites based on configuration
WPA: Selected cipher suites: group 30 pairwise 24 key_mgmt 3 proto 2
WPA: clearing AP WPA IE
WPA: clearing AP RSN IE
WPA: using GTK CCMP
WPA: using PTK CCMP
WPA: using KEY_MGMT 802.1X
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 01 00 00
EAPOL: External notification - portControl=Auto
Associated with 00:0f:a3:80:c9:0e
WPA: Association event - clear replay counter
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
EAPOL: External notification - portEnabled=1
EAPOL: SUPP_PAE entering state CONNECTING
EAPOL: SUPP_BE entering state IDLE
EAP: EAP entering state INITIALIZE
EAP: EAP 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 'ath0' added
RX EAPOL from 00:0f:a3:80:c9:0e
RX EAPOL - hexdump(len=99): 02 03 00 5f fe 00 8a 00 10 00 00 00 00 00 00 00 02 df 24 cf b2 ba 25 22 62 a5 7a c4 3a bf 6f 4d 1c 95 66 f1 4b 2e 81 a7 06 f5 df b1 6a f8 33 aa 4f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Setting authentication timeout: 70 sec 0 usec
EAPOL: Ignoring WPA EAPOL-Key frame in EAPOL state machines
IEEE 802.1X RX: version=2 type=3 length=95
  EAPOL-Key type=254
  key_info 0x8a (ver=2 keyidx=0 rsvd=0 Pairwise Ack)
  key_length=16 key_data_length=0
  replay_counter - hexdump(len=8): 00 00 00 00 00 00 00 02
  key_nonce - hexdump(len=32): df 24 cf b2 ba 25 22 62 a5 7a c4 3a bf 6f 4d 1c 95 66 f1 4b 2e 81 a7 06 f5 df b1 6a f8 33 aa 4f
  key_iv - hexdump(len=16): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  key_rsc - hexdump(len=8): 00 00 00 00 00 00 00 00
  key_id (reserved) - hexdump(len=8): 00 00 00 00 00 00 00 00
  key_mic - hexdump(len=16): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
WPA: RX EAPOL-Key - hexdump(len=99): 02 03 00 5f fe 00 8a 00 10 00 00 00 00 00 00 00 02 df 24 cf b2 ba 25 22 62 a5 7a c4 3a bf 6f 4d 1c 95 66 f1 4b 2e 81 a7 06 f5 df b1 6a f8 33 aa 4f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
State: ASSOCIATED -> 4WAY_HANDSHAKE
WPA: RX message 1 of 4-Way Handshake from 00:0f:a3:80:c9:0e (ver=2)
RSN: msg 1/4 key data - hexdump(len=0):
WPA: Failed to get master session key from EAPOL state machines
WPA: Key handshake aborted
RX EAPOL from 00:0f:a3:80:c9:0e
RX EAPOL - hexdump(len=99): 02 03 00 5f fe 00 8a 00 10 00 00 00 00 00 00 00 03 df 24 cf b2 ba 25 22 62 a5 7a c4 3a bf 6f 4d 1c 95 66 f1 4b 2e 81 a7 06 f5 df b1 6a f8 33 aa 4f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
EAPOL: Ignoring WPA EAPOL-Key frame in EAPOL state machines
IEEE 802.1X RX: version=2 type=3 length=95
  EAPOL-Key type=254
  key_info 0x8a (ver=2 keyidx=0 rsvd=0 Pairwise Ack)
  key_length=16 key_data_length=0
  replay_counter - hexdump(len=8): 00 00 00 00 00 00 00 03
  key_nonce - hexdump(len=32): df 24 cf b2 ba 25 22 62 a5 7a c4 3a bf 6f 4d 1c 95 66 f1 4b 2e 81 a7 06 f5 df b1 6a f8 33 aa 4f
  key_iv - hexdump(len=16): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  key_rsc - hexdump(len=8): 00 00 00 00 00 00 00 00
  key_id (reserved) - hexdump(len=8): 00 00 00 00 00 00 00 00
  key_mic - hexdump(len=16): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
WPA: RX EAPOL-Key - hexdump(len=99): 02 03 00 5f fe 00 8a 00 10 00 00 00 00 00 00 00 03 df 24 cf b2 ba 25 22 62 a5 7a c4 3a bf 6f 4d 1c 95 66 f1 4b 2e 81 a7 06 f5 df b1 6a f8 33 aa 4f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
State: 4WAY_HANDSHAKE -> 4WAY_HANDSHAKE
WPA: RX message 1 of 4-Way Handshake from 00:0f:a3:80:c9:0e (ver=2)
RSN: msg 1/4 key data - hexdump(len=0):
WPA: Failed to get master session key from EAPOL state machines
WPA: Key handshake aborted
EAPOL: startWhen --> 0
EAPOL: SUPP_PAE entering state CONNECTING
EAPOL: txStart
TX EAPOL - hexdump(len=4): 01 01 00 00
RX EAPOL from 00:0f:a3:80:c9:0e
RX EAPOL - hexdump(len=99): 02 03 00 5f fe 00 8a 00 10 00 00 00 00 00 00 00 04 df 24 cf b2 ba 25 22 62 a5 7a c4 3a bf 6f 4d 1c 95 66 f1 4b 2e 81 a7 06 f5 df b1 6a f8 33 aa 4f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
EAPOL: Ignoring WPA EAPOL-Key frame in EAPOL state machines
IEEE 802.1X RX: version=2 type=3 length=95
  EAPOL-Key type=254
  key_info 0x8a (ver=2 keyidx=0 rsvd=0 Pairwise Ack)
  key_length=16 key_data_length=0
  replay_counter - hexdump(len=8): 00 00 00 00 00 00 00 04
  key_nonce - hexdump(len=32): df 24 cf b2 ba 25 22 62 a5 7a c4 3a bf 6f 4d 1c 95 66 f1 4b 2e 81 a7 06 f5 df b1 6a f8 33 aa 4f
  key_iv - hexdump(len=16): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  key_rsc - hexdump(len=8): 00 00 00 00 00 00 00 00
  key_id (reserved) - hexdump(len=8): 00 00 00 00 00 00 00 00
  key_mic - hexdump(len=16): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
WPA: RX EAPOL-Key - hexdump(len=99): 02 03 00 5f fe 00 8a 00 10 00 00 00 00 00 00 00 04 df 24 cf b2 ba 25 22 62 a5 7a c4 3a bf 6f 4d 1c 95 66 f1 4b 2e 81 a7 06 f5 df b1 6a f8 33 aa 4f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
State: 4WAY_HANDSHAKE -> 4WAY_HANDSHAKE
WPA: RX message 1 of 4-Way Handshake from 00:0f:a3:80:c9:0e (ver=2)
RSN: msg 1/4 key data - hexdump(len=0):
WPA: Failed to get master session key from EAPOL state machines
WPA: Key handshake aborted
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
Wireless event: cmd=0x8b15 len=20
Wireless event: new AP: 00:00:00:00:00:00
Setting scan request: 0 sec 100000 usec
Added BSSID 00:0f:a3:80:c9:0e into blacklist
CTRL-EVENT-DISCONNECTED - 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: 4WAY_HANDSHAKE -> DISCONNECTED
wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)
WEXT: Operstate: linkmode=-1, operstate=5
EAPOL: External notification - portEnabled=0
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: SUPP_BE entering state INITIALIZE
EAP: EAP entering state DISABLED
EAPOL: External notification - portValid=0
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'ath0' added
State: DISCONNECTED -> SCANNING
Starting AP scan (broadcast SSID)
Trying to get current scan results first without requesting a new scan to speed up initial association
Received 1327 bytes of scan results (9 BSSes)
Scan results: 9
Selecting BSS from priority group 0
0: 00:0f:a3:80:c9:0e ssid='test' wpa_ie_len=24 rsn_ie_len=0 caps=0x11
   selected based on WPA IE
Trying to associate with 00:0f:a3:80:c9:0e (SSID='test' freq=2412 MHz)
Cancelling scan request
WPA: clearing own WPA/RSN IE
Automatic auth_alg selection: 0x1
WPA: using IEEE 802.11i/D3.0
WPA: Selected cipher suites: group 16 pairwise 16 key_mgmt 2 proto 1
WPA: set AP WPA IE - hexdump(len=24): dd 16 00 50 f2 01 01 00 00 50 f2 04 01 00 00 50 f2 04 01 00 00 50 f2 02
WPA: clearing AP RSN IE
WPA: using GTK CCMP
WPA: using PTK CCMP
WPA: using KEY_MGMT WPA-PSK
WPA: Set own WPA IE default - hexdump(len=24): dd 16 00 50 f2 01 01 00 00 50 f2 04 01 00 00 50 f2 04 01 00 00 50 f2 02
No keys have been configured - skip key clearing
wpa_driver_wext_set_drop_unencrypted
State: SCANNING -> ASSOCIATING
wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)
WEXT: Operstate: linkmode=-1, operstate=5
wpa_driver_wext_associate
Setting authentication timeout: 10 sec 0 usec
EAPOL: External notification - EAP success=0
EAPOL: External notification - EAP fail=0
EAPOL: External notification - portControl=Auto
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
Wireless event: cmd=0x8b06 len=8
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
Wireless event: cmd=0x8b04 len=12
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
Wireless event: cmd=0x8b1a len=12
CTRL-EVENT-TERMINATING - signal 2 received
Removing interface ath0
State: ASSOCIATING -> DISCONNECTED
wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)
WEXT: Operstate: linkmode=-1, operstate=5
No keys have been configured - skip key clearing
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
wpa_driver_wext_set_wpa
wpa_driver_wext_set_drop_unencrypted
wpa_driver_wext_set_countermeasures
No keys have been configured - skip key clearing
Removed BSSID 00:0f:a3:80:c9:0e from blacklist (clear)
Cancelling scan request
Cancelling authentication timeout
WEXT: Operstate: linkmode=0, operstate=6


pc2a tmp # wpa_supplicant -D wext -i ath0 -c /etc/wpa_supplicant/wpa_supplicant.conf -dd
Initializing interface 'ath0' conf '/etc/wpa_supplicant/wpa_supplicant.conf' driver 'wext' 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'
Line: 3 - start of a new network block
ssid - hexdump_ascii(len=4):
     74 65 73 74                                       test
PSK - hexdump(len=32): [REMOVED]
Priority group 0
   id=0 ssid='test'
Initializing interface (2) 'ath0'
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: KEY_RX entering state NO_KEY_RECEIVE
EAPOL: SUPP_BE entering state INITIALIZE
EAP: EAP entering state DISABLED
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
SIOCGIWRANGE: WE(compiled)=21 WE(source)=13 enc_capa=0xf
  capabilities: key_mgmt 0xf enc 0xf
WEXT: Operstate: linkmode=1, operstate=5
Own MAC address: 00:40:f4:a0:b0:67
wpa_driver_wext_set_wpa
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
wpa_driver_wext_set_drop_unencrypted
Setting scan request: 0 sec 100000 usec
Added interface ath0
RTM_NEWLINK: operstate=0 ifi_flags=0x1002 ()
Wireless event: cmd=0x8b06 len=8
Ignore event for foreign ifindex 11
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'ath0' added
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'ath0' added
RTM_NEWLINK: operstate=0 ifi_flags=0x11003 ([UP][LOWER_UP])
Wireless event: cmd=0x8b15 len=20
Wireless event: new AP: 00:0f:a3:80:c9:0e
State: DISCONNECTED -> ASSOCIATED
wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)
WEXT: Operstate: linkmode=-1, operstate=5
Associated to a new BSS: BSSID=00:0f:a3:80:c9:0e
No keys have been configured - skip key clearing
Network configuration found for the current AP
WPA: No WPA/RSN IE available from association info
WPA: Set cipher suites based on configuration
WPA: Selected cipher suites: group 30 pairwise 24 key_mgmt 3 proto 2
WPA: clearing AP WPA IE
WPA: clearing AP RSN IE
WPA: using GTK CCMP
WPA: using PTK CCMP
WPA: using KEY_MGMT 802.1X
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 01 00 00
EAPOL: External notification - portControl=Auto
Associated with 00:0f:a3:80:c9:0e
WPA: Association event - clear replay counter
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
EAPOL: External notification - portEnabled=1
EAPOL: SUPP_PAE entering state CONNECTING
EAPOL: SUPP_BE entering state IDLE
EAP: EAP entering state INITIALIZE
EAP: EAP 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 'ath0' added
RX EAPOL from 00:0f:a3:80:c9:0e
RX EAPOL - hexdump(len=99): 02 03 00 5f fe 00 8a 00 10 00 00 00 00 00 00 00 01 df 24 cf b2 ba 25 22 62 a5 7a c4 3a bf 6f 4d 1c 95 66 f1 4b 2e 81 a7 06 f5 df b1 6a f8 33 aa 50 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Setting authentication timeout: 70 sec 0 usec
EAPOL: Ignoring WPA EAPOL-Key frame in EAPOL state machines
IEEE 802.1X RX: version=2 type=3 length=95
  EAPOL-Key type=254
  key_info 0x8a (ver=2 keyidx=0 rsvd=0 Pairwise Ack)
  key_length=16 key_data_length=0
  replay_counter - hexdump(len=8): 00 00 00 00 00 00 00 01
  key_nonce - hexdump(len=32): df 24 cf b2 ba 25 22 62 a5 7a c4 3a bf 6f 4d 1c 95 66 f1 4b 2e 81 a7 06 f5 df b1 6a f8 33 aa 50
  key_iv - hexdump(len=16): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  key_rsc - hexdump(len=8): 00 00 00 00 00 00 00 00
  key_id (reserved) - hexdump(len=8): 00 00 00 00 00 00 00 00
  key_mic - hexdump(len=16): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
WPA: RX EAPOL-Key - hexdump(len=99): 02 03 00 5f fe 00 8a 00 10 00 00 00 00 00 00 00 01 df 24 cf b2 ba 25 22 62 a5 7a c4 3a bf 6f 4d 1c 95 66 f1 4b 2e 81 a7 06 f5 df b1 6a f8 33 aa 50 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
State: ASSOCIATED -> 4WAY_HANDSHAKE
WPA: RX message 1 of 4-Way Handshake from 00:0f:a3:80:c9:0e (ver=2)
RSN: msg 1/4 key data - hexdump(len=0):
WPA: Failed to get master session key from EAPOL state machines
WPA: Key handshake aborted
RX EAPOL from 00:0f:a3:80:c9:0e
RX EAPOL - hexdump(len=99): 02 03 00 5f fe 00 8a 00 10 00 00 00 00 00 00 00 02 df 24 cf b2 ba 25 22 62 a5 7a c4 3a bf 6f 4d 1c 95 66 f1 4b 2e 81 a7 06 f5 df b1 6a f8 33 aa 50 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
EAPOL: Ignoring WPA EAPOL-Key frame in EAPOL state machines
IEEE 802.1X RX: version=2 type=3 length=95
  EAPOL-Key type=254
  key_info 0x8a (ver=2 keyidx=0 rsvd=0 Pairwise Ack)
  key_length=16 key_data_length=0
  replay_counter - hexdump(len=8): 00 00 00 00 00 00 00 02
  key_nonce - hexdump(len=32): df 24 cf b2 ba 25 22 62 a5 7a c4 3a bf 6f 4d 1c 95 66 f1 4b 2e 81 a7 06 f5 df b1 6a f8 33 aa 50
  key_iv - hexdump(len=16): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  key_rsc - hexdump(len=8): 00 00 00 00 00 00 00 00
  key_id (reserved) - hexdump(len=8): 00 00 00 00 00 00 00 00
  key_mic - hexdump(len=16): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
WPA: RX EAPOL-Key - hexdump(len=99): 02 03 00 5f fe 00 8a 00 10 00 00 00 00 00 00 00 02 df 24 cf b2 ba 25 22 62 a5 7a c4 3a bf 6f 4d 1c 95 66 f1 4b 2e 81 a7 06 f5 df b1 6a f8 33 aa 50 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
State: 4WAY_HANDSHAKE -> 4WAY_HANDSHAKE
WPA: RX message 1 of 4-Way Handshake from 00:0f:a3:80:c9:0e (ver=2)
RSN: msg 1/4 key data - hexdump(len=0):
WPA: Failed to get master session key from EAPOL state machines
WPA: Key handshake aborted
RX EAPOL from 00:0f:a3:80:c9:0e
RX EAPOL - hexdump(len=99): 02 03 00 5f fe 00 8a 00 10 00 00 00 00 00 00 00 03 df 24 cf b2 ba 25 22 62 a5 7a c4 3a bf 6f 4d 1c 95 66 f1 4b 2e 81 a7 06 f5 df b1 6a f8 33 aa 50 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
EAPOL: Ignoring WPA EAPOL-Key frame in EAPOL state machines
IEEE 802.1X RX: version=2 type=3 length=95
  EAPOL-Key type=254
  key_info 0x8a (ver=2 keyidx=0 rsvd=0 Pairwise Ack)
  key_length=16 key_data_length=0
  replay_counter - hexdump(len=8): 00 00 00 00 00 00 00 03
  key_nonce - hexdump(len=32): df 24 cf b2 ba 25 22 62 a5 7a c4 3a bf 6f 4d 1c 95 66 f1 4b 2e 81 a7 06 f5 df b1 6a f8 33 aa 50
  key_iv - hexdump(len=16): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  key_rsc - hexdump(len=8): 00 00 00 00 00 00 00 00
  key_id (reserved) - hexdump(len=8): 00 00 00 00 00 00 00 00
  key_mic - hexdump(len=16): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
WPA: RX EAPOL-Key - hexdump(len=99): 02 03 00 5f fe 00 8a 00 10 00 00 00 00 00 00 00 03 df 24 cf b2 ba 25 22 62 a5 7a c4 3a bf 6f 4d 1c 95 66 f1 4b 2e 81 a7 06 f5 df b1 6a f8 33 aa 50 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
State: 4WAY_HANDSHAKE -> 4WAY_HANDSHAKE
WPA: RX message 1 of 4-Way Handshake from 00:0f:a3:80:c9:0e (ver=2)
RSN: msg 1/4 key data - hexdump(len=0):
WPA: Failed to get master session key from EAPOL state machines
WPA: Key handshake aborted
EAPOL: startWhen --> 0
EAPOL: SUPP_PAE entering state CONNECTING
EAPOL: txStart
TX EAPOL - hexdump(len=4): 01 01 00 00
RX EAPOL from 00:0f:a3:80:c9:0e
RX EAPOL - hexdump(len=99): 02 03 00 5f fe 00 8a 00 10 00 00 00 00 00 00 00 04 df 24 cf b2 ba 25 22 62 a5 7a c4 3a bf 6f 4d 1c 95 66 f1 4b 2e 81 a7 06 f5 df b1 6a f8 33 aa 50 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
EAPOL: Ignoring WPA EAPOL-Key frame in EAPOL state machines
IEEE 802.1X RX: version=2 type=3 length=95
  EAPOL-Key type=254
  key_info 0x8a (ver=2 keyidx=0 rsvd=0 Pairwise Ack)
  key_length=16 key_data_length=0
  replay_counter - hexdump(len=8): 00 00 00 00 00 00 00 04
  key_nonce - hexdump(len=32): df 24 cf b2 ba 25 22 62 a5 7a c4 3a bf 6f 4d 1c 95 66 f1 4b 2e 81 a7 06 f5 df b1 6a f8 33 aa 50
  key_iv - hexdump(len=16): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  key_rsc - hexdump(len=8): 00 00 00 00 00 00 00 00
  key_id (reserved) - hexdump(len=8): 00 00 00 00 00 00 00 00
  key_mic - hexdump(len=16): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
WPA: RX EAPOL-Key - hexdump(len=99): 02 03 00 5f fe 00 8a 00 10 00 00 00 00 00 00 00 04 df 24 cf b2 ba 25 22 62 a5 7a c4 3a bf 6f 4d 1c 95 66 f1 4b 2e 81 a7 06 f5 df b1 6a f8 33 aa 50 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
State: 4WAY_HANDSHAKE -> 4WAY_HANDSHAKE
WPA: RX message 1 of 4-Way Handshake from 00:0f:a3:80:c9:0e (ver=2)
RSN: msg 1/4 key data - hexdump(len=0):
WPA: Failed to get master session key from EAPOL state machines
WPA: Key handshake aborted
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
Wireless event: cmd=0x8b15 len=20
Wireless event: new AP: 00:00:00:00:00:00
Setting scan request: 0 sec 100000 usec
Added BSSID 00:0f:a3:80:c9:0e into blacklist
CTRL-EVENT-DISCONNECTED - 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: 4WAY_HANDSHAKE -> DISCONNECTED
wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)
WEXT: Operstate: linkmode=-1, operstate=5
EAPOL: External notification - portEnabled=0
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: SUPP_BE entering state INITIALIZE
EAP: EAP entering state DISABLED
EAPOL: External notification - portValid=0
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'ath0' added
State: DISCONNECTED -> SCANNING
Starting AP scan (broadcast SSID)
Trying to get current scan results first without requesting a new scan to speed up initial association
Received 1327 bytes of scan results (9 BSSes)
Scan results: 9
Selecting BSS from priority group 0
0: 00:0f:a3:80:c9:0e ssid='test' wpa_ie_len=24 rsn_ie_len=0 caps=0x11
   selected based on WPA IE
Trying to associate with 00:0f:a3:80:c9:0e (SSID='test' freq=2412 MHz)
Cancelling scan request
WPA: clearing own WPA/RSN IE
Automatic auth_alg selection: 0x1
WPA: using IEEE 802.11i/D3.0
WPA: Selected cipher suites: group 16 pairwise 16 key_mgmt 2 proto 1
WPA: set AP WPA IE - hexdump(len=24): dd 16 00 50 f2 01 01 00 00 50 f2 04 01 00 00 50 f2 04 01 00 00 50 f2 02
WPA: clearing AP RSN IE
WPA: using GTK CCMP
WPA: using PTK CCMP
WPA: using KEY_MGMT WPA-PSK
WPA: Set own WPA IE default - hexdump(len=24): dd 16 00 50 f2 01 01 00 00 50 f2 04 01 00 00 50 f2 04 01 00 00 50 f2 02
No keys have been configured - skip key clearing
wpa_driver_wext_set_drop_unencrypted
State: SCANNING -> ASSOCIATING
wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)
WEXT: Operstate: linkmode=-1, operstate=5
wpa_driver_wext_associate
Setting authentication timeout: 10 sec 0 usec
EAPOL: External notification - EAP success=0
EAPOL: External notification - EAP fail=0
EAPOL: External notification - portControl=Auto
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
Wireless event: cmd=0x8b06 len=8
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
Wireless event: cmd=0x8b04 len=12
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
Wireless event: cmd=0x8b1a len=12
CTRL-EVENT-TERMINATING - signal 2 received
Removing interface ath0
State: ASSOCIATING -> DISCONNECTED
wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)
WEXT: Operstate: linkmode=-1, operstate=5
No keys have been configured - skip key clearing
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
wpa_driver_wext_set_wpa
wpa_driver_wext_set_drop_unencrypted
wpa_driver_wext_set_countermeasures
No keys have been configured - skip key clearing
Removed BSSID 00:0f:a3:80:c9:0e from blacklist (clear)
Cancelling scan request
Cancelling authentication timeout
WEXT: Operstate: linkmode=0, operstate=6


pc2a tmp # wpa_supplicant -D madwifi -i ath0 -c /etc/wpa_supplicant/wpa_supplicant.conf
Associated with 00:0f:a3:80:c9:0e
WPA: Failed to get master session key from EAPOL state machines
WPA: Key handshake aborted
WPA: Failed to get master session key from EAPOL state machines
WPA: Key handshake aborted
CTRL-EVENT-TERMINATING - signal 2 received



pc2a tmp # wpa_supplicant -D madwifi -i ath0 -c /etc/wpa_supplicant/wpa_supplicant.conf
Trying to associate with 00:0f:a3:80:c9:0e (SSID='test' freq=2412 MHz)
ioctl[IEEE80211_IOCTL_SETMLME]: Invalid argument
Association request to the driver failed
Associated with 00:0f:a3:80:c9:0e
WPA: Key negotiation completed with 00:0f:a3:80:c9:0e [PTK=CCMP GTK=CCMP]
CTRL-EVENT-CONNECTED - Connection to 00:0f:a3:80:c9:0e completed (auth) [id=0 id_str=]
CTRL-EVENT-TERMINATING - signal 2 received


pc2a tmp # wpa_supplicant -D madwifi -i ath0 -c /etc/wpa_supplicant/wpa_supplicant.conf
Trying to associate with 00:0f:a3:80:c9:0e (SSID='test' freq=2412 MHz)
ioctl[IEEE80211_IOCTL_SETMLME]: Invalid argument
Association request to the driver failed
Associated with 00:0f:a3:80:c9:0e
WPA: Key negotiation completed with 00:0f:a3:80:c9:0e [PTK=CCMP GTK=CCMP]
CTRL-EVENT-CONNECTED - Connection to 00:0f:a3:80:c9:0e completed (auth) [id=0 id_str=]
c^[[ACTRL-EVENT-TERMINATING - signal 2 received


pc2a tmp # wpa_supplicant -D madwifi -i ath0 -c /etc/wpa_supplicant/wpa_supplicant.conf
Trying to associate with 00:0f:a3:80:c9:0e (SSID='test' freq=2412 MHz)
ioctl[IEEE80211_IOCTL_SETMLME]: Invalid argument
Association request to the driver failed
Associated with 00:0f:a3:80:c9:0e
WPA: Key negotiation completed with 00:0f:a3:80:c9:0e [PTK=CCMP GTK=CCMP]
CTRL-EVENT-CONNECTED - Connection to 00:0f:a3:80:c9:0e completed (auth) [id=0 id_str=]
CTRL-EVENT-TERMINATING - signal 2 received



pc2a tmp # wpa_supplicant -D madwifi -i ath0 -c /etc/wpa_supplicant/wpa_supplicant.conf
Trying to associate with 00:0f:a3:80:c9:0e (SSID='test' freq=2412 MHz)
ioctl[IEEE80211_IOCTL_SETMLME]: Invalid argument
Association request to the driver failed
Associated with 00:0f:a3:80:c9:0e
WPA: Key negotiation completed with 00:0f:a3:80:c9:0e [PTK=CCMP GTK=CCMP]
CTRL-EVENT-CONNECTED - Connection to 00:0f:a3:80:c9:0e completed (auth) [id=0 id_str=]
CTRL-EVENT-TERMINATING - signal 2 received



pc2a tmp # wpa_supplicant -D madwifi -i ath0 -c /etc/wpa_supplicant/wpa_supplicant.conf
Trying to associate with 00:0f:a3:80:c9:0e (SSID='test' freq=2412 MHz)
ioctl[IEEE80211_IOCTL_SETMLME]: Invalid argument
Association request to the driver failed
Associated with 00:0f:a3:80:c9:0e
WPA: Key negotiation completed with 00:0f:a3:80:c9:0e [PTK=CCMP GTK=CCMP]
CTRL-EVENT-CONNECTED - Connection to 00:0f:a3:80:c9:0e completed (auth) [id=0 id_str=]
WPA: Group rekeying completed with 00:0f:a3:80:c9:0e [GTK=CCMP]
CTRL-EVENT-TERMINATING - signal 2 received



pc2a tmp # wpa_supplicant -D madwifi -i ath0 -c /etc/wpa_supplicant/wpa_supplicant.conf
Trying to associate with 00:0f:a3:80:c9:0e (SSID='test' freq=2412 MHz)
ioctl[IEEE80211_IOCTL_SETMLME]: Invalid argument
Association request to the driver failed
Associated with 00:0f:a3:80:c9:0e
WPA: Key negotiation completed with 00:0f:a3:80:c9:0e [PTK=CCMP GTK=CCMP]
CTRL-EVENT-CONNECTED - Connection to 00:0f:a3:80:c9:0e completed (auth) [id=0 id_str=]
CTRL-EVENT-TERMINATING - signal 2 received



pc2a tmp # wpa_supplicant -D madwifi -i ath0 -c /etc/wpa_supplicant/wpa_supplicant.conf -dd
Initializing interface 'ath0' conf '/etc/wpa_supplicant/wpa_supplicant.conf' driver 'madwifi' 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'
Line: 3 - start of a new network block
ssid - hexdump_ascii(len=4):
     74 65 73 74                                       test
PSK - hexdump(len=32): [REMOVED]
Priority group 0
   id=0 ssid='test'
Initializing interface (2) 'ath0'
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: KEY_RX entering state NO_KEY_RECEIVE
EAPOL: SUPP_BE entering state INITIALIZE
EAP: EAP entering state DISABLED
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
SIOCGIWRANGE: WE(compiled)=21 WE(source)=13 enc_capa=0xf
  capabilities: key_mgmt 0xf enc 0xf
WEXT: Operstate: linkmode=1, operstate=5
Own MAC address: 00:40:f4:a0:b0:67
wpa_driver_madwifi_del_key: keyidx=0
wpa_driver_madwifi_del_key: keyidx=1
wpa_driver_madwifi_del_key: keyidx=2
wpa_driver_madwifi_del_key: keyidx=3
wpa_driver_madwifi_set_countermeasures: enabled=0
wpa_driver_madwifi_set_drop_unencrypted: enabled=1
Setting scan request: 0 sec 100000 usec
Added interface ath0
RTM_NEWLINK: operstate=0 ifi_flags=0x1002 ()
Wireless event: cmd=0x8b06 len=8
Ignore event for foreign ifindex 11
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'ath0' added
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'ath0' added

error 2

pc2 ~ # wpa_supplicant -D wext -i ath0 -c /etc/wpa_supplicant/wpa_supplicant.conf
WPA: No wpa_ie set - cannot generate msg 2/4
Associated with 00:40:f4:a0:b0:5f
WPA: Failed to get master session key from EAPOL state machines
WPA: Key handshake aborted
WPA: Failed to get master session key from EAPOL state machines
WPA: Key handshake aborted
WPA: Failed to get master session key from EAPOL state machines
WPA: Key handshake aborted

success

State: DISCONNECTED -> SCANNING
Starting AP scan (broadcast SSID)
Trying to get current scan results first without requesting a new scan to speed up initial association
Received 573 bytes of scan results (3 BSSes)
Scan results: 3
Selecting BSS from priority group 0
0: 00:0f:a3:80:c9:0e ssid='test' wpa_ie_len=24 rsn_ie_len=0 caps=0x11
   selected based on WPA IE
Trying to associate with 00:0f:a3:80:c9:0e (SSID='test' freq=2412 MHz)
Cancelling scan request
WPA: clearing own WPA/RSN IE
Automatic auth_alg selection: 0x1
WPA: using IEEE 802.11i/D3.0
WPA: Selected cipher suites: group 16 pairwise 16 key_mgmt 2 proto 1
WPA: set AP WPA IE - hexdump(len=24): dd 16 00 50 f2 01 01 00 00 50 f2 04 01 00 00 50 f2 04 01 00 00 50 f2 02
WPA: clearing AP RSN IE
WPA: using GTK CCMP
WPA: using PTK CCMP
WPA: using KEY_MGMT WPA-PSK
WPA: Set own WPA IE default - hexdump(len=24): dd 16 00 50 f2 01 01 00 00 50 f2 04 01 00 00 50 f2 04 01 00 00 50 f2 02
No keys have been configured - skip key clearing
wpa_driver_madwifi_set_drop_unencrypted: enabled=1
State: SCANNING -> ASSOCIATING
wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)
WEXT: Operstate: linkmode=-1, operstate=5
wpa_driver_madwifi_associate
ioctl[IEEE80211_IOCTL_SETMLME]: Invalid argument
wpa_driver_madwifi_associate: SETMLME[ASSOC] failed
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
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
Wireless event: cmd=0x8b1a len=12
RTM_NEWLINK: operstate=0 ifi_flags=0x11003 ([UP][LOWER_UP])
Wireless event: cmd=0x8b15 len=20
Wireless event: new AP: 00:0f:a3:80:c9:0e
State: ASSOCIATING -> ASSOCIATED
wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)
WEXT: Operstate: linkmode=-1, operstate=5
Associated to a new BSS: BSSID=00:0f:a3:80:c9:0e
No keys have been configured - skip key clearing
Associated with 00:0f:a3:80:c9:0e
WPA: Association event - clear replay counter
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
EAPOL: External notification - EAP success=0
EAPOL: External notification - portEnabled=1
EAPOL: SUPP_PAE entering state CONNECTING
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 'ath0' added
RX EAPOL from 00:0f:a3:80:c9:0e
RX EAPOL - hexdump(len=99): 02 03 00 5f fe 00 8a 00 10 00 00 00 00 00 00 00 01 df 24 cf b2 ba 25 22 62 a5 7a c4 3a bf 6f 4d 1c 95 66 f1 4b 2e 81 a7 06 f5 df b1 6a f8 33 aa 59 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Setting authentication timeout: 10 sec 0 usec
IEEE 802.1X RX: version=2 type=3 length=95
  EAPOL-Key type=254
  key_info 0x8a (ver=2 keyidx=0 rsvd=0 Pairwise Ack)
  key_length=16 key_data_length=0
  replay_counter - hexdump(len=8): 00 00 00 00 00 00 00 01
  key_nonce - hexdump(len=32): df 24 cf b2 ba 25 22 62 a5 7a c4 3a bf 6f 4d 1c 95 66 f1 4b 2e 81 a7 06 f5 df b1 6a f8 33 aa 59
  key_iv - hexdump(len=16): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  key_rsc - hexdump(len=8): 00 00 00 00 00 00 00 00
  key_id (reserved) - hexdump(len=8): 00 00 00 00 00 00 00 00
  key_mic - hexdump(len=16): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
WPA: RX EAPOL-Key - hexdump(len=99): 02 03 00 5f fe 00 8a 00 10 00 00 00 00 00 00 00 01 df 24 cf b2 ba 25 22 62 a5 7a c4 3a bf 6f 4d 1c 95 66 f1 4b 2e 81 a7 06 f5 df b1 6a f8 33 aa 59 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
State: ASSOCIATED -> 4WAY_HANDSHAKE
WPA: RX message 1 of 4-Way Handshake from 00:0f:a3:80:c9:0e (ver=2)
WPA: Renewed SNonce - hexdump(len=32): f9 93 e0 ae fc 66 4f 7f f6 f0 5b 1a 88 e6 ec ad 8a eb 16 d0 8c 24 66 b3 80 c4 3f 14 5c 12 db 92
WPA: PMK - hexdump(len=32): [REMOVED]
WPA: PTK - hexdump(len=64): [REMOVED]
WPA: WPA IE for msg 2/4 - hexdump(len=24): dd 16 00 50 f2 01 01 00 00 50 f2 04 01 00 00 50 f2 04 01 00 00 50 f2 02
WPA: Sending EAPOL-Key 2/4
WPA: TX EAPOL-Key - hexdump(len=123): 01 03 00 77 fe 01 0a 00 10 00 00 00 00 00 00 00 01 f9 93 e0 ae fc 66 4f 7f f6 f0 5b 1a 88 e6 ec ad 8a eb 16 d0 8c 24 66 b3 80 c4 3f 14 5c 12 db 92 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 49 a1 86 02 eb b6 1d bb 35 e0 b2 29 08 06 c6 52 00 18 dd 16 00 50 f2 01 01 00 00 50 f2 04 01 00 00 50 f2 04 01 00 00 50 f2 02
RX EAPOL from 00:0f:a3:80:c9:0e
RX EAPOL - hexdump(len=123): 02 03 00 77 fe 01 ca 00 10 00 00 00 00 00 00 00 02 df 24 cf b2 ba 25 22 62 a5 7a c4 3a bf 6f 4d 1c 95 66 f1 4b 2e 81 a7 06 f5 df b1 6a f8 33 aa 59 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 8a 84 82 44 1e 0b 29 d9 07 3f 70 7c fa 05 01 bc 00 18 dd 16 00 50 f2 01 01 00 00 50 f2 04 01 00 00 50 f2 04 01 00 00 50 f2 02
IEEE 802.1X RX: version=2 type=3 length=119
  EAPOL-Key type=254
  key_info 0x1ca (ver=2 keyidx=0 rsvd=0 Pairwise Install Ack MIC)
  key_length=16 key_data_length=24
  replay_counter - hexdump(len=8): 00 00 00 00 00 00 00 02
  key_nonce - hexdump(len=32): df 24 cf b2 ba 25 22 62 a5 7a c4 3a bf 6f 4d 1c 95 66 f1 4b 2e 81 a7 06 f5 df b1 6a f8 33 aa 59
  key_iv - hexdump(len=16): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  key_rsc - hexdump(len=8): 00 00 00 00 00 00 00 00
  key_id (reserved) - hexdump(len=8): 00 00 00 00 00 00 00 00
  key_mic - hexdump(len=16): 8a 84 82 44 1e 0b 29 d9 07 3f 70 7c fa 05 01 bc
WPA: RX EAPOL-Key - hexdump(len=123): 02 03 00 77 fe 01 ca 00 10 00 00 00 00 00 00 00 02 df 24 cf b2 ba 25 22 62 a5 7a c4 3a bf 6f 4d 1c 95 66 f1 4b 2e 81 a7 06 f5 df b1 6a f8 33 aa 59 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 8a 84 82 44 1e 0b 29 d9 07 3f 70 7c fa 05 01 bc 00 18 dd 16 00 50 f2 01 01 00 00 50 f2 04 01 00 00 50 f2 04 01 00 00 50 f2 02
State: 4WAY_HANDSHAKE -> 4WAY_HANDSHAKE
WPA: RX message 3 of 4-Way Handshake from 00:0f:a3:80:c9:0e (ver=2)
WPA: IE KeyData - hexdump(len=24): dd 16 00 50 f2 01 01 00 00 50 f2 04 01 00 00 50 f2 04 01 00 00 50 f2 02
WPA: Sending EAPOL-Key 4/4
WPA: TX EAPOL-Key - hexdump(len=99): 01 03 00 5f fe 01 0a 00 10 00 00 00 00 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 eb 6c 09 0e eb e7 df 9f d8 f9 2f 19 b7 86 22 cc 00 00
WPA: Installing PTK to the driver.
WPA: RSC - hexdump(len=6): 00 00 00 00 00 00
wpa_driver_madwifi_set_key: alg=CCMP key_idx=0 set_tx=1 seq_len=6 key_len=16
State: 4WAY_HANDSHAKE -> GROUP_HANDSHAKE
RX EAPOL from 00:0f:a3:80:c9:0e
RX EAPOL - hexdump(len=123): 02 03 00 77 fe 03 92 00 10 00 00 00 00 00 00 00 03 df 24 cf b2 ba 25 22 62 a5 7a c4 3a bf 6f 4d 1c 95 66 f1 4b 2e 81 a7 06 f5 df b1 6a f8 33 aa 57 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 8f 97 04 17 d2 66 17 2c 61 ad e5 4c 3f 16 73 04 00 18 48 36 0a f1 95 93 90 31 a6 19 6a a5 b8 76 49 fd fd a3 ea 83 42 f6 56 6b
IEEE 802.1X RX: version=2 type=3 length=119
  EAPOL-Key type=254
  key_info 0x392 (ver=2 keyidx=1 rsvd=0 Group Ack MIC Secure)
  key_length=16 key_data_length=24
  replay_counter - hexdump(len=8): 00 00 00 00 00 00 00 03
  key_nonce - hexdump(len=32): df 24 cf b2 ba 25 22 62 a5 7a c4 3a bf 6f 4d 1c 95 66 f1 4b 2e 81 a7 06 f5 df b1 6a f8 33 aa 57
  key_iv - hexdump(len=16): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  key_rsc - hexdump(len=8): 01 00 00 00 00 00 00 00
  key_id (reserved) - hexdump(len=8): 00 00 00 00 00 00 00 00
  key_mic - hexdump(len=16): 8f 97 04 17 d2 66 17 2c 61 ad e5 4c 3f 16 73 04
WPA: RX EAPOL-Key - hexdump(len=123): 02 03 00 77 fe 03 92 00 10 00 00 00 00 00 00 00 03 df 24 cf b2 ba 25 22 62 a5 7a c4 3a bf 6f 4d 1c 95 66 f1 4b 2e 81 a7 06 f5 df b1 6a f8 33 aa 57 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 8f 97 04 17 d2 66 17 2c 61 ad e5 4c 3f 16 73 04 00 18 48 36 0a f1 95 93 90 31 a6 19 6a a5 b8 76 49 fd fd a3 ea 83 42 f6 56 6b
WPA: RX message 1 of Group Key Handshake from 00:0f:a3:80:c9:0e (ver=2)
State: GROUP_HANDSHAKE -> GROUP_HANDSHAKE
WPA: Group Key - hexdump(len=16): [REMOVED]
WPA: Installing GTK to the driver (keyidx=1 tx=0).
WPA: RSC - hexdump(len=6): 01 00 00 00 00 00
wpa_driver_madwifi_set_key: alg=CCMP key_idx=1 set_tx=0 seq_len=6 key_len=16
WPA: Sending EAPOL-Key 2/2
WPA: TX EAPOL-Key - hexdump(len=99): 01 03 00 5f fe 03 12 00 10 00 00 00 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 93 94 e1 c5 fd a2 95 06 b1 c0 a1 7e a5 ae 29 50 00 00
WPA: Key negotiation completed with 00:0f:a3:80:c9:0e [PTK=CCMP GTK=CCMP]
Cancelling authentication timeout
State: GROUP_HANDSHAKE -> COMPLETED
CTRL-EVENT-CONNECTED - Connection to 00:0f:a3:80:c9:0e completed (auth) [id=0 id_str=]
wpa_driver_wext_set_operstate: operstate 0->1 (UP)
WEXT: Operstate: linkmode=-1, operstate=6
EAPOL: External notification - portValid=1
EAPOL: External notification - EAP success=1
EAPOL: SUPP_PAE entering state AUTHENTICATING
EAPOL: SUPP_BE entering state SUCCESS
EAP: EAP entering state DISABLED
EAPOL: SUPP_PAE entering state AUTHENTICATED
EAPOL: SUPP_BE entering state IDLE
RTM_NEWLINK: operstate=1 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'ath0' added
EAPOL: startWhen --> 0
CTRL-EVENT-TERMINATING - signal 2 received
Removing interface ath0
State: COMPLETED -> DISCONNECTED
wpa_driver_wext_set_operstate: operstate 1->0 (DORMANT)
WEXT: Operstate: linkmode=-1, operstate=5
wpa_driver_madwifi_deauthenticate
wpa_driver_madwifi_del_key: keyidx=0
wpa_driver_madwifi_del_key: keyidx=1
wpa_driver_madwifi_del_key: keyidx=2
wpa_driver_madwifi_del_key: keyidx=3
wpa_driver_madwifi_del_key: keyidx=0
EAPOL: External notification - portEnabled=0
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: SUPP_BE entering state INITIALIZE
EAPOL: External notification - portValid=0
wpa_driver_madwifi_set_drop_unencrypted: enabled=0
wpa_driver_madwifi_set_countermeasures: enabled=0
No keys have been configured - skip key clearing
Cancelling scan request
Cancelling authentication timeout
WEXT: Operstate: linkmode=0, operstate=6

solution

edit your wpa_supplicant.conf file and add those two lines:

proto=WPA
key_mgmt=WPA-PSK

router2a ~ # cat /etc/wpa_supplicant/wpa_supplicant.conf

# This is a network block that connects to any unsecured access point.
# We give it a low priority so any defined blocks are preferred.
network={

        # if the two options below are not set, i get strange errors
        proto=WPA
        key_mgmt=WPA-PSK
        #pairwise=CCMP

        ssid="test"
        #psk="passphrase"
        psk=a8f6fbf02bfbd7ddd27249ac101487ff51c245b2c34c2efe46b6e680b367ee32
}

notes

config file hacks

using the same hostapd.conf from above but with this wpa_supplicant.conf

network={

        # if the two options below are not set, i get strange errors
        proto=WPA
        #key_mgmt=WPA-PSK
        #pairwise=CCMP

        ssid="test"
        #psk="passphrase"
        psk=a8f6fbf02bfbd7ddd27249ac101487ff51c245b2c34c2efe46b6e680b367ee32
} 

i get:

router2a ~ # wpa_supplicant -D wext -i  ath0 -c /etc/wpa_supplicant/wpa_supplicant.conf
Trying to associate with 00:40:f4:a0:b0:5f (SSID='test' freq=2412 MHz)
Associated with 00:40:f4:a0:b0:5f
WPA: Key negotiation completed with 00:40:f4:a0:b0:5f [PTK=CCMP GTK=CCMP] 
CTRL-EVENT-CONNECTED - Connection to 00:40:f4:a0:b0:5f completed (auth) [id=0  id_str=]
CTRL-EVENT-TERMINATING - signal 2 received

router2a ~ # wpa_supplicant -D wext -i ath0 -c /etc/wpa_supplicant/wpa_supplicant.conf
Associated with 00:40:f4:a0:b0:5f
WPA: Failed to get master session key from EAPOL state machines
WPA: Key handshake aborted
WPA: Failed to get master session key from EAPOL state machines
WPA: Key handshake aborted
WPA: Failed to get master session key from EAPOL state machines
WPA: Key handshake aborted

using the same hostapd.conf as above + using this wpa_supplicant.conf:

network={

        # if the two options below are not set, i get strange errors
        #proto=WPA
        key_mgmt=WPA-PSK
        #pairwise=CCMP

        ssid="test"
        #psk="passphrase"
        psk=a8f6fbf02bfbd7ddd27249ac101487ff51c245b2c34c2efe46b6e680b367ee32
} 

i get:

router2a ~ # wpa_supplicant -D wext -i ath0 -c /etc/wpa_supplicant/wpa_supplicant.conf
Trying to associate with 00:40:f4:a0:b0:5f (SSID='test' freq=2412 MHz)
Associated with 00:40:f4:a0:b0:5f
WPA: Key negotiation completed with 00:40:f4:a0:b0:5f [PTK=CCMP GTK=CCMP]
CTRL-EVENT-CONNECTED - Connection to 00:40:f4:a0:b0:5f completed (auth) [id=0  id_str=]
CTRL-EVENT-TERMINATING - signal 2 received

router2a ~ # wpa_supplicant -D wext -i  ath0 -c /etc/wpa_supplicant/wpa_supplicant.conf
Associated with 00:40:f4:a0:b0:5f
WPA: 4-Way Handshake failed - pre-shared key may be incorrect
CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
Trying to associate with 00:40:f4:a0:b0:5f (SSID='test' freq=2412 MHz)
Authentication with 00:00:00:00:00:00 timed out.
Trying to associate with 00:40:f4:a0:b0:5f (SSID='test' freq=2412 MHz)
Authentication with 00:00:00:00:00:00 timed out.
Trying to associate with 00:40:f4:a0:b0:5f (SSID='test' freq=2412 MHz)
Authentication with 00:00:00:00:00:00 timed out.
Trying to associate with 00:40:f4:a0:b0:5f (SSID='test' freq=2412 MHz)
Authentication with 00:00:00:00:00:00 timed out.
Trying to associate with 00:40:f4:a0:b0:5f (SSID='test' freq=2412 MHz)
Authentication with 00:00:00:00:00:00 timed out.

comparing -D wext vs -D madwifi

pc2 wpa_supplicant # wpa_supplicant -D madwifi -i ath0 -c /etc/wpa_supplicant/wpa_supplicant.conf
Trying to associate with 00:40:f4:a0:b0:5f (SSID='test' freq=2412 MHz)
ioctl[IEEE80211_IOCTL_SETMLME]: Invalid argument
Association request to the driver failed
Associated with 00:40:f4:a0:b0:5f
WPA: Key negotiation completed with 00:40:f4:a0:b0:5f [PTK=CCMP GTK=CCMP]
CTRL-EVENT-CONNECTED - Connection to 00:40:f4:a0:b0:5f completed (auth) [id=0  id_str=] 
CTRL-EVENT-TERMINATING - signal 2 received
pc2 wpa_supplicant # wpa_supplicant -D wext -i  ath0 -c /etc/wpa_supplicant/wpa_supplicant.conf
Trying to associate with 00:40:f4:a0:b0:5f (SSID='test' freq=2412 MHz)
Associated with 00:40:f4:a0:b0:5f
WPA: Key negotiation completed with 00:40:f4:a0:b0:5f [PTK=CCMP GTK=CCMP]
CTRL-EVENT-CONNECTED - Connection to 00:40:f4:a0:b0:5f completed (auth) [id=0 id_str=]
Powered by MediaWiki