AR5213 card with madwifi-bsd, hostapd-0.4.1,wpa_supplicant-0.4.1

Victor Yeo yeosv at ndc.com.tw
Tue Jun 7 01:23:11 EDT 2005


good'day,

I've been trying to get WPA-PSK working on madwifi for 4 days, but failed. I keep getting this error message from hostapd:
"WPA: EAPOL-Key timeout"

Please point out if i make silly mistakes along the way. Thanks.

For hostapd-0.4.1, i modified Makefile and .config

In Makefile:
CC=mipsel-linux-gcc
DIR_WPA_SUPPLICANT=../wpa_supplicant-0.4.1

In .config:
CONFIG_DRIVER_MADWIFI=y
CFLAGS += -I/home/samples/madwifi-bsd
CFLAGS += -I/home/ssl/include
LIBS += -L/home/ssl/lib

In hostapd.conf, i set the following:
interface=ath0
bridge=br0
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
ssid=MyWireless
macaddr_acl=0
auth_algs=3
eapol_key_index_workaround=0
eap_authenticator=0
own_ip_addr=127.0.0.1
wpa=1
wpa_psk=f6ac76d5715d53a12af3f2b040b3f8ac7072a5c35d8fffe2589471796ddd3e5b
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP 
wpa_group_rekey=600
wpa_gmk_rekey=86400

Now comes to wpa_supplicant-0.4.1, i modified .config and Makefile,

In .config
CFLAGS += -I/home/ssl/include
LIBS += -L/home/ssl/lib
CONFIG_DRIVER_MADWIFI=y
CFLAGS += -I/home/samples/madwifi-bsd

In Makefile
CC=mipsel-linux-gcc
CFLAGS += -I../driver/modules -I../utils -I../hostapd-0.4.1 


In wpa_supplicant.conf:
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
network={
 ssid="MyWireless"
 key_mgmt=WPA-PSK
 #psk="secretpass"
 psk=f6ac76d5715d53a12af3f2b040b3f8ac7072a5c35d8fffe2589471796ddd3e5b
 priority=5
 pairwise=TKIP
 group=TKIP
}

Debug message from hostapd:
======================
Configuration file: hostapd.conf
Configure bridge br0 for EAPOL traffic.
madwifi_set_iface_flags: dev_up=0
Using interface ath0 with hwaddr 00:0b:6b:34:88:d0 and ssid 'MyWireless'
madwifi_set_ieee8021x: enabled=1
madwifi_configure_wpa: group key cipher=1
madwifi_configure_wpa: pairwise key ciphers=0x2
madwifi_configure_wpa: key management algorithms=0x2
madwifi_configure_wpa: rsn capabilities=0x0
madwifi_configure_wpa: enable WPA= 0x1
madwifi_set_iface_flags: dev_up=1
ath0: creating bss 00:0b:6b:34:88:d0
br0: port 1(ath0) entering listening state
madwifi_set_privacy: enabled=1
WPA: group state machine entering state GTK_INIT
GMK - hexdump(len=32): b3 28 78 33 46 4a bc 51 84 a9 a0 d4 ab 27 37 78 32 b3 20
35 f8 be 0a 97 29 5d dc 1d 2f ed 7f 63
GTK - hexdump(len=32): 12 b8 93 d2 e2 33 2c 4b 0d 06 be e8 da 58 00 7c 9a 8c 09
cc ae 8e e9 f5 91 71 7b 7b 41 ec 36 e8
WPA: group state machine entering state SETKEYSDONE
madwifi_set_key: alg=TKIP addr=00:00:00:00:00:00 key_idx=1
Flushing old station entries
madwifi_sta_deauth: addr=ff:ff:ff:ff:ff:ff reason_code=3
Deauthenticate all stations
l2_packet_receive - recv: Network is down
Wireless event: cmd=0x8c03 len=20
ath0: STA 00:0b:6b:35:66:d1 IEEE 802.11: associated
  New STA
ath0: STA 00:0b:6b:35:66:d1 WPA: event 1 notification
madwifi_sta_clear_stats: addr=00:0b:6b:35:66:d1
ath0: STA 00:0b:6b:35:66:d1 WPA: start authentication
WPA: 00:0b:6b:35:66:d1 WPA_PTK entering state INITIALIZE
madwifi_del_key: addr=00:0b:6b:35:66:d1 key_idx=0
ath0: STA 00:0b:6b:35:66:d1 IEEE 802.1X: unauthorizing port
madwifi_set_sta_authorized: addr=00:0b:6b:35:66:d1 authorized=0
WPA: 00:0b:6b:35:66:d1 WPA_PTK_GROUP entering state IDLE
WPA: 00:0b:6b:35:66:d1 WPA_PTK entering state AUTHENTICATION
WPA: 00:0b:6b:35:66:d1 WPA_PTK entering state AUTHENTICATION2
WPA: 00:0b:6b:35:66:d1 WPA_PTK entering state INITPSK
WPA: 00:0b:6b:35:66:d1 WPA_PTK entering state PTKSTART
ath0: STA 00:0b:6b:35:66:d1 WPA: sending 1/4 msg of 4-Way Handshake
TX EAPOL - hexdump(len=113): 00 0b 6b 35 66 d1 00 0b 6b 34 88 d0 88 8e 02 03 00
5f fe 00 89 00 20 00 00 00 00 00 00 00 01 03 76 08 af c9 2d 79 c4 9e 3f 88 04 48
 ad c4 66 4d 8b 7a c7 14 90 14 15 80 cb ed e0 5f 96 d0 66 00 00 00 00 00 00 00 0
0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ath0: STA 00:0b:6b:35:66:d1 WPA: EAPOL-Key timeout
WPA: 00:0b:6b:35:66:d1 WPA_PTK entering state PTKSTART
ath0: STA 00:0b:6b:35:66:d1 WPA: sending 1/4 msg of 4-Way Handshake
TX EAPOL - hexdump(len=113): 00 0b 6b 35 66 d1 00 0b 6b 34 88 d0 88 8e 02 03 00
5f fe 00 89 00 20 00 00 00 00 00 00 00 02 03 76 08 af c9 2d 79 c4 9e 3f 88 04 48
 ad c4 66 4d 8b 7a c7 14 90 14 15 80 cb ed e0 5f 96 d0 66 00 00 00 00 00 00 00 0
0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ath0: STA 00:0b:6b:35:66:d1 WPA: EAPOL-Key timeout
WPA: 00:0b:6b:35:66:d1 WPA_PTK entering state PTKSTART
ath0: STA 00:0b:6b:35:66:d1 WPA: sending 1/4 msg of 4-Way Handshake
TX EAPOL - hexdump(len=113): 00 0b 6b 35 66 d1 00 0b 6b 34 88 d0 88 8e 02 03 00
5f fe 00 89 00 20 00 00 00 00 00 00 00 03 03 76 08 af c9 2d 79 c4 9e 3f 88 04 48
 ad c4 66 4d 8b 7a c7 14 90 14 15 80 cb ed e0 5f 96 d0 66 00 00 00 00 00 00 00 0
0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ath0: STA 00:0b:6b:35:66:d1 WPA: EAPOL-Key timeout
WPA: 00:0b:6b:35:66:d1 WPA_PTK entering state PTKSTART
ath0: STA 00:0b:6b:35:66:d1 WPA: sending 1/4 msg of 4-Way Handshake
TX EAPOL - hexdump(len=113): 00 0b 6b 35 66 d1 00 0b 6b 34 88 d0 88 8e 02 03 00
5f fe 00 89 00 20 00 00 00 00 00 00 00 04 03 76 08 af c9 2d 79 c4 9e 3f 88 04 48
 ad c4 66 4d 8b 7a c7 14 90 14 15 80 cb ed e0 5f 96 d0 66 00 00 00 00 00 00 00 0
0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
WPA: 00:0b:6b:35:66:d1 WPA_PTK entering state DISCONNECT
madwifi_sta_deauth: addr=00:0b:6b:35:66:d1 reason_code=2
WPA: 00:0b:6b:35:66:d1 WPA_PTK entering state DISCONNECTED
WPA: 00:0b:6b:35:66:d1 WPA_PTK entering state INITIALIZE
madwifi_del_key: addr=00:0b:6b:35:66:d1 key_idx=0
ioctl[IEEE80211_IOCTL_DELKEY]: Invalid argument
ath0: STA 00:0b:6b:35:66:d1 IEEE 802.1X: unauthorizing port
madwifi_set_sta_authorized: addr=00:0b:6b:35:66:d1 authorized=0
ioctl[IEEE80211_IOCTL_SETMLME]: Invalid argument
ath0: STA 00:0b:6b:35:66:d1 IEEE 802.11: deauthenticated due to local deauth req
uest
...


Debug message from wpa_supplicant:
============================
Initializing interface 'ath0' conf 'wpa_supplicant.conf' driver 'madwifi'
Configuration file 'wpa_supplicant.conf' -> '/home/wpa_supplicant.conf'
Reading configuration file '/home/wpa_supplicant.conf'
ctrl_interface='/var/run/wpa_supplicant'
ctrl_interface_group=0
Priority group 5
   id=0 ssid='MyWireless'
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
ioctl[SIOCSIWPMKSA]: Operation not supported
br0: port 1(ath0) entering listening state
br0: port 1(ath0) entering listening state
Own MAC address: 00:0b:6b:35:66:d1
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
Wireless event: cmd=0x8b06 len=8
RTM_NEWLINK, IFLA_IFNAME: Interface 'ath0' added
RTM_NEWLINK, IFLA_IFNAME: Interface 'ath0' added
State: DISCONNECTED -> SCANNING
Starting AP scan (broadcast SSID)
Wireless event: cmd=0x8b1a len=12
Wireless event: cmd=0x8b19 len=12
Received 763 bytes of scan results (5 BSSes)
Scan results: 5
Selecting BSS from priority group 5
0: 00:0b:6b:34:88:d0 ssid='MyWireless' wpa_ie_len=24 rsn_ie_len=0 caps=0x11
   selected
Trying to associate with 00:0b:6b:34:88:d0 (SSID='MyWireless' freq=2457 MHz)
Cancelling scan request
Automatic auth_alg selection: 0x1
WPA: using IEEE 802.11i/D3.0
WPA: Selected cipher suites: group 8 pairwise 8 key_mgmt 2
WPA: using GTK TKIP
WPA: using PTK TKIP
WPA: using KEY_MGMT WPA-PSK
WPA: Own WPA IE - hexdump(len=24): dd 16 00 50 f2 01 01 00 00 50 f2 02 01 00 00
50 f2 02 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_madwifi_associate
Setting authentication timeout: 5 sec 0 usec
EAPOL: External notification - EAP success=0
EAPOL: External notification - EAP fail=0
EAPOL: External notification - portControl=Auto
Wireless event: cmd=0x8b1a len=23
Wireless event: cmd=0x8b15 len=20
Wireless event: new AP: 00:0b:6b:34:88:d0
State: ASSOCIATING -> ASSOCIATED
Association event - clear replay counter
Associated to a new BSS: BSSID=00:0b:6b:34:88:d0
No keys have been configured - skip key clearing
Associated with 00:0b:6b:34:88:d0
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: txStart
WPA: drop TX EAPOL in non-IEEE 802.1X mode (type=1 len=0)
EAPOL: SUPP_BE entering state IDLE
EAP: EAP entering state INITIALIZE
EAP: EAP entering state IDLE
Setting authentication timeout: 10 sec 0 usec
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:0b:6b:34:88:d0 into blacklist
State: ASSOCIATED -> DISCONNECTED
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
EAPOL: External notification - EAP success=0
CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.shmoo.com/pipermail/hostap/attachments/20050607/b8ca8de1/attachment.htm 


More information about the HostAP mailing list