Ubuntu 12.04.2,3.2.0-49-generic,来自 saucy 的 x64 hostapd(hostapd_1.0-3ubuntu2_amd64)
已经尝试过精确更新,但无济于事。
您可以在下面的调试输出中看到,hostapd 将 EAPOL-Key 请求发送到客户端,但没有收到任何回复......
我试过了:
- 仅限 WPA
- WPA + WPA2
- 从 0.7.6 开始的多个 hostapd 版本
我尝试连接的站点是一台笔记本电脑 (w7) 和一部 iPhone 3S
hostapd.conf:
interface=wlan0
bridge=br0
driver=nl80211
ssid=McWilliamTest
country_code=AU
hw_mode=g
channel=11
wme_enabled=1
ieee80211n=1
ht_capab=[HT40-][SHORT-GI-40][DSSS_CCK-40]
eapol_key_index_workaround=0
eap_server=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=3
wpa_passphrase=test1234
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
macaddr_acl=0
logger_syslog=-1
logger_syslog_level=2
ctrl_interface_group=0
ctrl_interface=/var/run/hostapd
...并从 hostapd -d /etc/hostapd/hostapd.conf 记录:
WPA: 70:f1:a1:ee:bd:53 WPA_PTK entering state INITIALIZE
wpa_driver_nl80211_set_key: ifindex=5 alg=0 addr=0x22d6ca0 key_idx=0 set_tx=1 seq_len=0 key_len=0
addr=70:f1:a1:ee:bd:53
wlan0: STA 70:f1:a1:ee:bd:53 IEEE 802.1X: unauthorizing port
mgmt::deauth cb
STA 70:f1:a1:ee:bd:53 acknowledged deauth
Removing STA 70:f1:a1:ee:bd:53 from kernel driver
wlan0: STA 70:f1:a1:ee:bd:53 MLME: MLME-DEAUTHENTICATE.indication(70:f1:a1:ee:bd:53, 2)
wlan0: STA 70:f1:a1:ee:bd:53 MLME: MLME-DELETEKEYS.request(70:f1:a1:ee:bd:53)
wpa_driver_nl80211_set_key: ifindex=5 alg=0 addr=0x22d6ca0 key_idx=0 set_tx=1 seq_len=0 key_len=0
addr=70:f1:a1:ee:bd:53
nl80211: Event message available
nl80211: Delete station 70:f1:a1:ee:bd:53
mgmt::auth
authentication: STA=70:f1:a1:ee:bd:53 auth_alg=0 auth_transaction=1 status_code=0 wep=0
wlan0: STA 70:f1:a1:ee:bd:53 IEEE 802.11: authentication OK (open system)
wlan0: STA 70:f1:a1:ee:bd:53 WPA: event 0 notification
wpa_driver_nl80211_set_key: ifindex=5 alg=0 addr=0x22d6ca0 key_idx=0 set_tx=1 seq_len=0 key_len=0
addr=70:f1:a1:ee:bd:53
wlan0: STA 70:f1:a1:ee:bd:53 MLME: MLME-AUTHENTICATE.indication(70:f1:a1:ee:bd:53, OPEN_SYSTEM)
wlan0: STA 70:f1:a1:ee:bd:53 MLME: MLME-DELETEKEYS.request(70:f1:a1:ee:bd:53)
wpa_driver_nl80211_set_key: ifindex=5 alg=0 addr=0x22d6ca0 key_idx=0 set_tx=1 seq_len=0 key_len=0
addr=70:f1:a1:ee:bd:53
authentication reply: STA=70:f1:a1:ee:bd:53 auth_alg=0 auth_transaction=2 resp=0 (IE len=0)
mgmt::auth cb
wlan0: STA 70:f1:a1:ee:bd:53 IEEE 802.11: authenticated
mgmt::reassoc_req
reassociation request: STA=70:f1:a1:ee:bd:53 capab_info=0x611 listen_interval=2 current_ap=00:1c:10:1b:68:22
Validating WMM IE: OUI 00:50:f2 OUI type 2 OUI sub-type 0 version 1 QoS info 0x0
old AID 1
update_sta_no_ht STA 70:f1:a1:ee:bd:53 - no HT, num of non-HT stations 1
hostapd_ht_operation_update current operation mode=0x17
hostapd_ht_operation_update new operation mode=0x17 changes=0
wlan0: STA 70:f1:a1:ee:bd:53 IEEE 802.11: association OK (aid 1)
mgmt::reassoc_resp cb
wlan0: STA 70:f1:a1:ee:bd:53 IEEE 802.11: associated (aid 1)
wlan0: STA 70:f1:a1:ee:bd:53 MLME: MLME-REASSOCIATE.indication(70:f1:a1:ee:bd:53)
wlan0: STA 70:f1:a1:ee:bd:53 MLME: MLME-DELETEKEYS.request(70:f1:a1:ee:bd:53)
wpa_driver_nl80211_set_key: ifindex=5 alg=0 addr=0x22d6ca0 key_idx=0 set_tx=1 seq_len=0 key_len=0
addr=70:f1:a1:ee:bd:53
wlan0: STA 70:f1:a1:ee:bd:53 WPA: event 1 notification
wpa_driver_nl80211_set_key: ifindex=5 alg=0 addr=0x22d6ca0 key_idx=0 set_tx=1 seq_len=0 key_len=0
addr=70:f1:a1:ee:bd:53
IEEE 802.1X: Ignore STA - 802.1X not enabled or forced for WPS
WPA: 70:f1:a1:ee:bd:53 WPA_PTK entering state AUTHENTICATION2
WPA: Assign ANonce - hexdump(len=32): 1e 04 83 e5 4e 02 47 68 d1 d0 1c cb a6 4d 4c 94 7d 70 09 a1 3d e5 40 0f 33 16 8c 4d 73 5d 23 a5
WPA: 70:f1:a1:ee:bd:53 WPA_PTK entering state INITPSK
WPA: 70:f1:a1:ee:bd:53 WPA_PTK entering state PTKSTART
wlan0: STA 70:f1:a1:ee:bd:53 WPA: sending 1/4 msg of 4-Way Handshake
WPA: Send EAPOL(version=1 secure=0 mic=0 ack=1 install=0 pairwise=8 kde_len=0 keyidx=0 encr=0)
WPA: Use EAPOL-Key timeout of 100 ms (retry counter 1)
nl80211: Event message available
nl80211: New station 70:f1:a1:ee:bd:53
wlan0: STA 70:f1:a1:ee:bd:53 WPA: EAPOL-Key timeout
WPA: 70:f1:a1:ee:bd:53 WPA_PTK entering state PTKSTART
wlan0: STA 70:f1:a1:ee:bd:53 WPA: sending 1/4 msg of 4-Way Handshake
WPA: Send EAPOL(version=1 secure=0 mic=0 ack=1 install=0 pairwise=8 kde_len=0 keyidx=0 encr=0)
WPA: Use EAPOL-Key timeout of 1000 ms (retry counter 2)
wlan0: STA 70:f1:a1:ee:bd:53 WPA: EAPOL-Key timeout
WPA: 70:f1:a1:ee:bd:53 WPA_PTK entering state PTKSTART
wlan0: STA 70:f1:a1:ee:bd:53 WPA: sending 1/4 msg of 4-Way Handshake
WPA: Send EAPOL(version=1 secure=0 mic=0 ack=1 install=0 pairwise=8 kde_len=0 keyidx=0 encr=0)
WPA: Use EAPOL-Key timeout of 1000 ms (retry counter 3)
wlan0: STA 70:f1:a1:ee:bd:53 WPA: EAPOL-Key timeout
WPA: 70:f1:a1:ee:bd:53 WPA_PTK entering state PTKSTART
wlan0: STA 70:f1:a1:ee:bd:53 WPA: sending 1/4 msg of 4-Way Handshake
WPA: Send EAPOL(version=1 secure=0 mic=0 ack=1 install=0 pairwise=8 kde_len=0 keyidx=0 encr=0)
WPA: Use EAPOL-Key timeout of 1000 ms (retry counter 4)
wlan0: STA 70:f1:a1:ee:bd:53 WPA: EAPOL-Key timeout
WPA: 70:f1:a1:ee:bd:53 WPA_PTK entering state PTKSTART
wlan0: STA 70:f1:a1:ee:bd:53 WPA: PTKSTART: Retry limit 4 reached
WPA: 70:f1:a1:ee:bd:53 WPA_PTK entering state DISCONNECT
hostapd_wpa_auth_disconnect: WPA authenticator requests disconnect: STA 70:f1:a1:ee:bd:53 reason 2
wlan0: STA 70:f1:a1:ee:bd:53 WPA: event 3 notification
wpa_driver_nl80211_set_key: ifindex=5 alg=0 addr=0x22d6ca0 key_idx=0 set_tx=1 seq_len=0 key_len=0
addr=70:f1:a1:ee:bd:53
WPA: wpa_sm_step() called recursively
WPA: 70:f1:a1:ee:bd:53 WPA_PTK entering state DISCONNECTED
答案1
几天前,我遇到了与 hostapd_1.0-3+b1_armhf.deb 类似的问题,当我在我的 ap(raspberry pi)上设置 wpa 时,即使密码输入正确,连接也总是通过密码验证失败。
尝试了较新的版本(hostapd_2.1-0ubuntu4_armhf.deb)后,问题消失了。我不知道这个问题的原因,看起来是由 hostapd 本身引起的,而不是你的配置。
您可以尝试较新版本的 hostapd,希望它能在设备上运行。