Hi all,
I've been using openwrt for several years now, running WhiteRussian on a WRT54GS. For various reasons, I decided to upgrade both the hardware and the software (to trunk as of yesterday), and picked out the D-Link DIR-825. Configuration has gone fine (some ipsec problems, but they're dealt with now), but I'm still having issues with establishing a WPA2 connection from my Motorola Droid. The phone worked fine with the WRT54GS/WhiteRussian set up, and it's able to connect to the new D-Link if the network is open. It is not able to connect if WPA is active.
I have been able to connect with both a Macbook and my linux laptop on both 2.4 and 5 GHz bands with no issues. I've tried changing the encryption settings between psk2+tkip+aes and psk2 (the latter is what I'd prefer to leave it at) with no change in my ability to connect with the Droid. I've tried switching the 2.4Ghz radio to 11g instead of 11ng, with no effect. I've also tried changing channels, and changing the htmode on the 2.4 radio, again, with no effect. This appears to be purely between wpa_supplicant on the android and hostapd on the router.
I'm hoping someone here can make better sense out of this than I can. This is probably a bug with Android, but getting it to work is essential to me, and I'm hoping there's some way to fix this on the openwrt side. I've tried downgrading wpad-mini to backfire and backfire betas, with no change in the results. I am running shorewall-lite, but all wireless access is open, and I don't think it should interfere.
My /etc/config/wireless and hostapd output are below. If anyone has any advice or can provide any help, I would most appreciate it. In my research, I've run across some references that this may be a problem with the eapol version (2 vs. 1), but I haven't been able to downgrade hostapd to use eapol version 1, so don't know if this is on the right track or not.
Thanks,
David
First, my /etc/config/wireless:
config wifi-device radio0
option type mac80211
option channel 11
option macaddr 00:18:e7:e6:b5:21
option hwmode 11ng
option htmode HT20
list ht_capab SHORT-GI-40
list ht_capab TX-STBC
list ht_capab RX-STBC1
list ht_capab DSSS_CCK-40
config wifi-iface
option device radio0
option network wifi
option mode ap
option ssid dlevitan
option encryption psk2
option key <psk>
config wifi-device radio1
option type mac80211
option channel 36
option macaddr 00:18:e7:e6:b5:22
option hwmode 11na
option htmode HT40+
list ht_capab SHORT-GI-40
list ht_capab TX-STBC
list ht_capab RX-STBC1
list ht_capab DSSS_CCK-40
config wifi-iface
option device radio1
option network wifi
option mode ap
option ssid dlevitann
option encryption psk2
option key <psk>
And running hostapd in debug mode:
root@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