WPA2 Connection Problems between Android and DLink DIR-825 running OpenWRT
David Levitan
david
Tue Jul 27 18:01:10 PDT 2010
Hi all,
I recently upgraded to a DIR-825 router (atk9k based), on which I've
installed the trunk build of OpenWRT (with an early-July version of
hostapd). I've been able to setup everything as needed, except for one
major problem. WPA2 connections work with no problems between the router
and a MacBook and a Linux laptop, with both radios. I cannot get a WPA2
negotiation to complete between my Motorola Droid and the router. WPA2
connections worked with my previous router (but which did not use
hostapd), and I don't have any problems connecting to other wireless
networks, both open and secured with WPA2-Enterprise. I've also tried
enabling TKIP as well as AES, with no change, as well as changing
htmode, again, with no change.
The configuration file for hostapd on the 2.4Ghz interface is below,
along with a log from hostapd. Looking through the log, the problem
appears to occur in comparing the second step of the handshake, with one
octet being different. However, I know little about WPA2, and I'm
wondering if anyone has any thoughts on where something is going wrong.
Is it hostapd on the router, or wpa_supplicant on the Droid? Is it
possible to fix with just hostapd on the router (even if it means a
custom build)?
Thanks,
David
Config file:
ctrl_interface=/var/run/hostapd-phy0
driver=nl80211
wmm_ac_bk_cwmin=4
wmm_ac_bk_cwmax=10
wmm_ac_bk_aifs=7
wmm_ac_bk_txop_limit=0
wmm_ac_bk_acm=0
wmm_ac_be_aifs=3
wmm_ac_be_cwmin=4
wmm_ac_be_cwmax=10
wmm_ac_be_txop_limit=0
wmm_ac_be_acm=0
wmm_ac_vi_aifs=2
wmm_ac_vi_cwmin=3
wmm_ac_vi_cwmax=4
wmm_ac_vi_txop_limit=94
wmm_ac_vi_acm=0
wmm_ac_vo_aifs=2
wmm_ac_vo_cwmin=2
wmm_ac_vo_cwmax=3
wmm_ac_vo_txop_limit=47
wmm_ac_vo_acm=0
tx_queue_data3_aifs=7
tx_queue_data3_cwmin=15
tx_queue_data3_cwmax=1023
tx_queue_data3_burst=0
tx_queue_data2_aifs=3
tx_queue_data2_cwmin=15
tx_queue_data2_cwmax=63
tx_queue_data2_burst=0
tx_queue_data1_aifs=1
tx_queue_data1_cwmin=7
tx_queue_data1_cwmax=15
tx_queue_data1_burst=3.0
tx_queue_data0_aifs=1
tx_queue_data0_cwmin=3
tx_queue_data0_cwmax=7
tx_queue_data0_burst=1.5
hw_mode=g
channel=11
ieee80211n=1
ht_capab=[HT20][SHORT-GI-40][TX-STBC][RX-STBC1][DSSS_CCK-40]
interface=wlan0
wpa_passphrase=<psk>
wpa=2
wpa_pairwise=CCMP
ssid=dlevitan
bridge=br-wifi
wmm_enabled=1
bssid=00:18:e7:e6:b5:21
ignore_broadcast_ssid=0
Log:
root at anduin:/tmp# hostapd -P /var/run/wifi-phy0.pid -d
/var/run/hostapd-phy0.conf
Configuration file: /var/run/hostapd-phy0.conf
netlink: Operstate: linkmode=1, operstate=5
nl80211: Add own interface ifindex 10
nl80211: Add own interface ifindex 21
nl80211: New interface mon.wlan0 created: ifindex=25
nl80211: Add own interface ifindex 25
nl80211: Adding interface wlan0 into bridge br-wifi
BSS count 1, BSSID mask 00:00:00:00:00:00 (0 bits)
nl80211: Added 802.11b mode based on 802.11g information
Completing interface initialization
Mode: IEEE 802.11g Channel: 11 Frequency: 2462 MHz
RATE[0] rate=10 flags=0x1
RATE[1] rate=20 flags=0x1
RATE[2] rate=55 flags=0x1
RATE[3] rate=110 flags=0x1
RATE[4] rate=60 flags=0x0
RATE[5] rate=90 flags=0x0
RATE[6] rate=120 flags=0x0
RATE[7] rate=180 flags=0x0
RATE[8] rate=240 flags=0x0
RATE[9] rate=360 flags=0x0
RATE[10] rate=480 flags=0x0
RATE[11] rate=540 flags=0x0
Flushing old station entries
Deauthenticate all stations
wpa_driver_nl80211_set_key: ifindex=21 alg=0 addr=(nil) key_idx=0
set_tx=1 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=21 alg=0 addr=(nil) key_idx=1
set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=21 alg=0 addr=(nil) key_idx=2
set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=21 alg=0 addr=(nil) key_idx=3
set_tx=0 seq_len=0 key_len=0
Using interface wlan0 with hwaddr 00:18:e7:e6:b5:21 and ssid 'dlevitan'
Deriving WPA PSK based on passphrase
SSID - hexdump_ascii(len=8):
64 6c 65 76 69 74 61 6e dlevitan
PSK (ASCII passphrase) - hexdump_ascii(len=36): [REMOVED]
PSK (from passphrase) - hexdump(len=32): [REMOVED]
WPA: group state machine entering state GTK_INIT (VLAN-ID 0)
GMK - hexdump(len=32): [REMOVED]
GTK - hexdump(len=16): [REMOVED]
WPA: group state machine entering state SETKEYSDONE (VLAN-ID 0)
wpa_driver_nl80211_set_key: ifindex=21 alg=3 addr=(nil) key_idx=1
set_tx=1 seq_len=0 key_len=16
nl80211: Set beacon (beacon_set=0)
wlan0: Setup of interface done.
RTM_NEWLINK: operstate=0 ifi_flags=0x1002 ()
nl80211: Interface down
Unknown event 29
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
Unknown event 5
RTM_NEWLINK: operstate=0 ifi_flags=0x1043 ([UP][RUNNING])
nl80211: Interface up
Unknown event 28
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
Unknown event 5
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
Unknown event 5
RTM_NEWLINK: operstate=0 ifi_flags=0x1002 ()
nl80211: Interface down
Unknown event 29
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
Unknown event 5
RTM_NEWLINK: operstate=0 ifi_flags=0x1002 ()
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
Unknown event 5
RTM_NEWLINK: operstate=0 ifi_flags=0x1002 ()
RTM_NEWLINK, IFLA_IFNAME: Interface 'mon.wlan0' added
Unknown event 5
RTM_NEWLINK: operstate=0 ifi_flags=0x1002 ()
RTM_NEWLINK, IFLA_IFNAME: Interface 'mon.wlan0' added
Unknown event 5
RTM_NEWLINK: operstate=0 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
nl80211: Interface up
Unknown event 28
RTM_NEWLINK, IFLA_IFNAME: Interface 'mon.wlan0' added
Unknown event 5
RTM_NEWLINK: operstate=0 ifi_flags=0x1002 ()
nl80211: Interface down
Unknown event 29
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
Unknown event 5
nl80211: Add ifindex 10 for bridge br-wifi
nl80211: Add own interface ifindex 10
RTM_NEWLINK: operstate=0 ifi_flags=0x1002 ()
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
Unknown event 5
RTM_NEWLINK: operstate=0 ifi_flags=0x11003 ([UP][LOWER_UP])
nl80211: Interface up
Unknown event 28
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
Unknown event 5
RTM_NEWLINK: operstate=0 ifi_flags=0x11003 ([UP][LOWER_UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
Unknown event 5
nl80211: Add ifindex 10 for bridge br-wifi
nl80211: Add own interface ifindex 10
RTM_NEWLINK: operstate=0 ifi_flags=0x11003 ([UP][LOWER_UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
Unknown event 5
nl80211: Add ifindex 10 for bridge br-wifi
nl80211: Add own interface ifindex 10
RTM_NEWLINK: operstate=0 ifi_flags=0x11003 ([UP][LOWER_UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
Unknown event 5
mgmt::auth
authentication: STA=00:26:ba:3b:53:91 auth_alg=0 auth_transaction=1
status_code=0 wep=0
New STA
wlan0: STA 00:26:ba:3b:53:91 IEEE 802.11: authentication OK (open system)
wlan0: STA 00:26:ba:3b:53:91 MLME:
MLME-AUTHENTICATE.indication(00:26:ba:3b:53:91, OPEN_SYSTEM)
wlan0: STA 00:26:ba:3b:53:91 MLME:
MLME-DELETEKEYS.request(00:26:ba:3b:53:91)
authentication reply: STA=00:26:ba:3b:53:91 auth_alg=0
auth_transaction=2 resp=0 (IE len=0)
mgmt::auth cb
wlan0: STA 00:26:ba:3b:53:91 IEEE 802.11: authenticated
mgmt::assoc_req
association request: STA=00:26:ba:3b:53:91 capab_info=0x8431
listen_interval=3
Validating WMM IE: OUI 00:50:f2 OUI type 2 OUI sub-type 0 version 1
QoS info 0x0
new AID 1
HT: STA 00:26:ba:3b:53:91 HT Capabilities Info: 0x1030
update_sta_ht STA 00:26:ba:3b:53:91 - 20 MHz HT, num of 20MHz HT STAs 1
hostapd_ht_operation_update current operation mode=0x0
hostapd_ht_operation_update new operation mode=0x0 changes=0
wlan0: STA 00:26:ba:3b:53:91 IEEE 802.11: association OK (aid 1)
mgmt::assoc_resp cb
wlan0: STA 00:26:ba:3b:53:91 IEEE 802.11: associated (aid 1)
wlan0: STA 00:26:ba:3b:53:91 MLME:
MLME-ASSOCIATE.indication(00:26:ba:3b:53:91)
wlan0: STA 00:26:ba:3b:53:91 MLME:
MLME-DELETEKEYS.request(00:26:ba:3b:53:91)
wpa_driver_nl80211_set_key: ifindex=21 alg=0 addr=0x480ac0 key_idx=0
set_tx=1 seq_len=0 key_len=0
addr=00:26:ba:3b:53:91
wlan0: STA 00:26:ba:3b:53:91 WPA: event 1 notification
wpa_driver_nl80211_set_key: ifindex=21 alg=0 addr=0x480ac0 key_idx=0
set_tx=1 seq_len=0 key_len=0
addr=00:26:ba:3b:53:91
wlan0: STA 00:26:ba:3b:53:91 WPA: start authentication
WPA: 00:26:ba:3b:53:91 WPA_PTK entering state INITIALIZE
wpa_driver_nl80211_set_key: ifindex=21 alg=0 addr=0x480ac0 key_idx=0
set_tx=1 seq_len=0 key_len=0
addr=00:26:ba:3b:53:91
wlan0: STA 00:26:ba:3b:53:91 IEEE 802.1X: unauthorizing port
WPA: 00:26:ba:3b:53:91 WPA_PTK_GROUP entering state IDLE
WPA: 00:26:ba:3b:53:91 WPA_PTK entering state AUTHENTICATION
WPA: 00:26:ba:3b:53:91 WPA_PTK entering state AUTHENTICATION2
WPA: 00:26:ba:3b:53:91 WPA_PTK entering state INITPSK
WPA: 00:26:ba:3b:53:91 WPA_PTK entering state PTKSTART
wlan0: STA 00:26:ba:3b:53:91 WPA: sending 1/4 msg of 4-Way Handshake
WPA: Send EAPOL(version=2 secure=0 mic=0 ack=1 install=0 pairwise=8
kde_len=0 keyidx=0 encr=0)
nl80211: Event message available
nl80211: Ignored unknown event (cmd=19)
IEEE 802.1X: 00:26:ba:3b:53:91 TX status - version=2 type=3 length=95 -
ack=1
IEEE 802.1X: 121 bytes from 00:26:ba:3b:53:91
IEEE 802.1X: version=1 type=3 length=117
wlan0: STA 00:26:ba:3b:53:91 WPA: WPA IE from (Re)AssocReq did not match
with msg 2/4
WPA IE in AssocReq - 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 IE in msg 2/4 - hexdump(len=22): 30 14 01 00 00 0f ac 04 01 00 00 0f
ac 04 01 00 00 0f ac 02 3c 00
hostapd_wpa_auth_disconnect: WPA authenticator requests disconnect: STA
00:26:ba:3b:53:91 reason 2
wlan0: STA 00:26:ba:3b:53:91 IEEE 802.11: deauthenticated due to local
deauth request
hostapd_ht_operation_update current operation mode=0x0
hostapd_ht_operation_update new operation mode=0x0 changes=0
mgmt::deauth
deauthentication: STA=00:26:ba:3b:53:91 reason_code=1
Station 00:26:ba:3b:53:91 trying to deauthenticate, but it is not
authenticated.
mgmt::auth
authentication: STA=00:23:6c:7f:1e:fb auth_alg=0 auth_transaction=1
status_code=0 wep=0
New STA
wlan0: STA 00:23:6c:7f:1e:fb IEEE 802.11: authentication OK (open system)
wlan0: STA 00:23:6c:7f:1e:fb MLME:
MLME-AUTHENTICATE.indication(00:23:6c:7f:1e:fb, OPEN_SYSTEM)
wlan0: STA 00:23:6c:7f:1e:fb MLME:
MLME-DELETEKEYS.request(00:23:6c:7f:1e:fb)
authentication reply: STA=00:23:6c:7f:1e:fb auth_alg=0
auth_transaction=2 resp=0 (IE len=0)
mgmt::auth cb
wlan0: STA 00:23:6c:7f:1e:fb IEEE 802.11: did not acknowledge
authentication response
mgmt::auth
authentication: STA=00:26:ba:3b:53:91 auth_alg=0 auth_transaction=1
status_code=0 wep=0
New STA
wlan0: STA 00:26:ba:3b:53:91 IEEE 802.11: authentication OK (open system)
wlan0: STA 00:26:ba:3b:53:91 MLME:
MLME-AUTHENTICATE.indication(00:26:ba:3b:53:91, OPEN_SYSTEM)
wlan0: STA 00:26:ba:3b:53:91 MLME:
MLME-DELETEKEYS.request(00:26:ba:3b:53:91)
authentication reply: STA=00:26:ba:3b:53:91 auth_alg=0
auth_transaction=2 resp=0 (IE len=0)
mgmt::auth cb
wlan0: STA 00:26:ba:3b:53:91 IEEE 802.11: authenticated
mgmt::assoc_req
association request: STA=00:26:ba:3b:53:91 capab_info=0x8431
listen_interval=3
Validating WMM IE: OUI 00:50:f2 OUI type 2 OUI sub-type 0 version 1
QoS info 0x0
new AID 1
HT: STA 00:26:ba:3b:53:91 HT Capabilities Info: 0x1030
update_sta_ht STA 00:26:ba:3b:53:91 - 20 MHz HT, num of 20MHz HT STAs 1
hostapd_ht_operation_update current operation mode=0x0
hostapd_ht_operation_update new operation mode=0x0 changes=0
wlan0: STA 00:26:ba:3b:53:91 IEEE 802.11: association OK (aid 1)
mgmt::assoc_resp cb
wlan0: STA 00:26:ba:3b:53:91 IEEE 802.11: associated (aid 1)
wlan0: STA 00:26:ba:3b:53:91 MLME:
MLME-ASSOCIATE.indication(00:26:ba:3b:53:91)
wlan0: STA 00:26:ba:3b:53:91 MLME:
MLME-DELETEKEYS.request(00:26:ba:3b:53:91)
wpa_driver_nl80211_set_key: ifindex=21 alg=0 addr=0x480b78 key_idx=0
set_tx=1 seq_len=0 key_len=0
addr=00:26:ba:3b:53:91
wlan0: STA 00:26:ba:3b:53:91 WPA: event 1 notification
wpa_driver_nl80211_set_key: ifindex=21 alg=0 addr=0x480b78 key_idx=0
set_tx=1 seq_len=0 key_len=0
addr=00:26:ba:3b:53:91
wlan0: STA 00:26:ba:3b:53:91 WPA: start authentication
WPA: 00:26:ba:3b:53:91 WPA_PTK entering state INITIALIZE
wpa_driver_nl80211_set_key: ifindex=21 alg=0 addr=0x480b78 key_idx=0
set_tx=1 seq_len=0 key_len=0
addr=00:26:ba:3b:53:91
wlan0: STA 00:26:ba:3b:53:91 IEEE 802.1X: unauthorizing port
WPA: 00:26:ba:3b:53:91 WPA_PTK_GROUP entering state IDLE
WPA: 00:26:ba:3b:53:91 WPA_PTK entering state AUTHENTICATION
WPA: 00:26:ba:3b:53:91 WPA_PTK entering state AUTHENTICATION2
WPA: 00:26:ba:3b:53:91 WPA_PTK entering state INITPSK
WPA: 00:26:ba:3b:53:91 WPA_PTK entering state PTKSTART
wlan0: STA 00:26:ba:3b:53:91 WPA: sending 1/4 msg of 4-Way Handshake
WPA: Send EAPOL(version=2 secure=0 mic=0 ack=1 install=0 pairwise=8
kde_len=0 keyidx=0 encr=0)
nl80211: Event message available
nl80211: Ignored unknown event (cmd=19)
IEEE 802.1X: 00:26:ba:3b:53:91 TX status - version=2 type=3 length=95 -
ack=1
IEEE 802.1X: 121 bytes from 00:26:ba:3b:53:91
IEEE 802.1X: version=1 type=3 length=117
wlan0: STA 00:26:ba:3b:53:91 WPA: WPA IE from (Re)AssocReq did not match
with msg 2/4
WPA IE in AssocReq - 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 IE in msg 2/4 - hexdump(len=22): 30 14 01 00 00 0f ac 04 01 00 00 0f
ac 04 01 00 00 0f ac 02 3c 00
hostapd_wpa_auth_disconnect: WPA authenticator requests disconnect: STA
00:26:ba:3b:53:91 reason 2
wlan0: STA 00:26:ba:3b:53:91 IEEE 802.11: deauthenticated due to local
deauth request
hostapd_ht_operation_update current operation mode=0x0
hostapd_ht_operation_update new operation mode=0x0 changes=0
mgmt::deauth
deauthentication: STA=00:26:ba:3b:53:91 reason_code=1
Station 00:26:ba:3b:53:91 trying to deauthenticate, but it is not
authenticated.
^CSignal 2 received - terminating
wlan0: STA 00:23:6c:7f:1e:fb MLME:
MLME-DEAUTHENTICATE.indication(00:23:6c:7f:1e:fb, 1)
wlan0: STA 00:23:6c:7f:1e:fb MLME:
MLME-DELETEKEYS.request(00:23:6c:7f:1e:fb)
Removing station 00:23:6c:7f:1e:fb
hostapd_ht_operation_update current operation mode=0x0
hostapd_ht_operation_update new operation mode=0x0 changes=0
Flushing old station entries
Deauthenticate all stations
nl80211: Remove interface ifindex=25
netlink: Operstate: linkmode=0, operstate=6
More information about the Hostap
mailing list