无法连接 wpa_supplicant

无法连接 wpa_supplicant

我尝试使用 wpa_supplicant 连接 wifi(WPA2)

root@bamt-miner:~# iwlist wlan0 scan
wlan0     Scan completed :
          Cell 01 - Address: AC:F1:DF:24:93:D6
                    Protocol:802.11b/g/n
                    ESSID:"MYWIFI"
                    Mode:Managed
                    Channel:1
                    Quality:52/100  Signal level:-69 dBm  Noise level:-95 dBm
                    Encryption key:on
                    Bit Rates:150 Mb/s
                    IE: WPA Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : CCMP TKIP
                        Authentication Suites (1) : PSK
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : CCMP TKIP
                        Authentication Suites (1) : PSK

root@bamt-miner:~# wpa_supplicant -Dwext  -iwlan0 -c/etc/wpa_supplicant.conf
ioctl[SIOCGIWSCAN]: Resource temporarily unavailable
Associated with ac:f1:df:24:93:d6
CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
Trying to associate with ac:f1:df:24:93:d6 (SSID='MYWIFI' freq=2412 MHz)
Associated with ac:f1:df:24:93:d6
CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
Authentication with 00:00:00:00:00:00 timed out.
Trying to associate with ac:f1:df:24:93:d6 (SSID='MYWIFI' freq=2412 MHz)
Associated with ac:f1:df:24:93:d6
CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
^CCTRL-EVENT-TERMINATING - signal 2 received
root@bamt-miner:~#

root@bamt-miner:~# iwlist scan
wlan0     Interface doesn't support scanning : Network is down

/etc/wpa_supplicant.conf 内容

network={
        ssid="MYWIFI"
        #psk="paleta2001fido"
        psk=3e0389388ee7dbe34f81753b0fb4ff2a5efa1fbc922b346c920ed396a772c9ed
        key_mgmt=WPA-PSK
}

有任何想法吗?

谢谢!

答案1

您正在关联,然后在完成四次握手之前断开连接(我没有看到 802.11 身份验证步骤,但这可能是因为没有它您就无法关联)。
我大胆猜测这是由以下原因之一造成的:

1) 您的 PSK 不正确(很可能)。2
) 由于某种原因,您已被 AP 列入黑名单(尝试重新启动 AP,或等待一段时间)。3
) AP 上存在错误。目前尚不清楚 DISCONNECT 事件是否是因为 AP 正在解除您的关联/取消认证,还是请求者本身正在断开连接。如果请求者在超时内未收到握手的 M1,则可能会这样做,而这又可能是因为 AP 处于奇怪的状态。再次重置它以清除。

一次 wireshark 捕获,最好是从监控模式下的独立 wifi 卡获取的空中跟踪,或者最坏的情况下是从 bamt-miner 机器本身获取的捕获,捕获其 wifi 接口将有助于更好地了解正在发生的事情。您还可以在 dmesg 中获得一些有用的驱动程序日志。
希望对您有所帮助!

相关内容