題 無法使用wpa_supplicant連接到wifi


我嘗試使用命令行中的wpa_supplicant連接wifi。
我使用Ubuntu 12.04.1和wpa_supplicant 0.7.3

這是與AP相關的“iwlist wlan0 scan”的輸出我嘗試連接到:

2:          Cell 01 - Address: 00:11:22:33:44:55
3-                    Channel:11
4-                    Frequency:2.462 GHz (Channel 11)
5-                    Quality=35/70  Signal level=-75 dBm  
6-                    Encryption key:on
7-                    ESSID:"NetworkName"
8-                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 9 Mb/s
9-                              18 Mb/s; 36 Mb/s; 54 Mb/s
10-                    Bit Rates:6 Mb/s; 12 Mb/s; 24 Mb/s; 48 Mb/s
11-                    Mode:Master
12-                    Extra:tsf=000004c96af22169
13-                    Extra: Last beacon: 2828ms ago
14-                    IE: Unknown: 00075732575F446176
15-                    IE: Unknown: 010882848B961224486C
16-                    IE: Unknown: 03010B
17-                    IE: Unknown: 2A0104
18-                    IE: Unknown: 32040C183060
19-                    IE: Unknown: 2D1A6E1017FFFF000001000000000000000000000000000000000000
20-                    IE: Unknown: 3D160B000100000000000000000000000000000000000000
21-                    IE: Unknown: 3E0100
22-                    IE: WPA Version 1
23-                        Group Cipher : TKIP
24-                        Pairwise Ciphers (2) : TKIP CCMP
25-                        Authentication Suites (1) : PSK
26-                    IE: Unknown: DD180050F2020101000003A4000027A4000042435E0062322F00
27-                    IE: Unknown: 7F0101
28-                    IE: Unknown: DD07000C4300000000
29-                    IE: Unknown: DD1E00904C336E1017FFFF000001000000000000000000000000000000000000
30-                    IE: Unknown: DD1A00904C340B000100000000000000000000000000000000000000

我使用wpa_passphrase來創建psk:

user@comp-name:~$ wpa_passphrase "NetworkName" "Password"

這是/etc/wpa_supplicant.conf的內容:

network={
    ssid="NetworkName"
    psk=3d2e908171ebc0aca77f9cf0d4fd392ff76bb4236fa20a8718f1de4c92d5b81d
}

我叫wpa_supplicant:

user@comp-name:~$ sudo wpa_supplicant -d -iwlan0 -Dwext -Dnl80211 -c/etc/wpa_supplicant.conf

輸出:

Initializing interface 'wlan0' conf '/etc/wpa_supplicant.conf' driver 'nl80211' ctrl_interface 'N/A' bridge 'N/A'
Configuration file '/etc/wpa_supplicant.conf' -> '/etc/wpa_supplicant.conf'
Reading configuration file '/etc/wpa_supplicant.conf'
Priority group 0
   id=0 ssid='NetworkName'
netlink: Operstate: linkmode=1, operstate=5
nl80211: Register Action command failed: ret=-114 (Operation already in progress)
nl80211: Register Action match - hexdump(len=1): 06
nl80211: Failed to register Action frame processing - ignore for now
Own MAC address: 00:21:6b:1e:04:0a
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=0x80e4f28 key_idx=0 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=0x80e4f28 key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=0x80e4f28 key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=0x80e4f28 key_idx=3 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=0x80e4f28 key_idx=4 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=0x80e4f28 key_idx=5 set_tx=0 seq_len=0 key_len=0
RSN: flushing PMKID list in the driver
Setting scan request: 0 sec 100000 usec
WPS: UUID based on MAC address - hexdump(len=16): 5e 04 92 17 d9 f6 5a 71 8c c8 9d ec 15 53 ce 94
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: Supplicant port status: Unauthorized
EAPOL: KEY_RX entering state NO_KEY_RECEIVE
EAPOL: SUPP_BE entering state INITIALIZE
EAP: EAP entering state DISABLED
EAPOL: Supplicant port status: Unauthorized
EAPOL: Supplicant port status: Unauthorized
Added interface wlan0
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
State: DISCONNECTED -> SCANNING
Starting AP scan for wildcard SSID
Scan requested (ret=0) - scan timeout 10 seconds
nl80211: Event message available
nl80211: Scan trigger
EAPOL: disable timer tick
EAPOL: Supplicant port status: Unauthorized
nl80211: Event message available
nl80211: New scan results available
Received scan results (42 BSSes)
BSS: Start scan result update 1
BSS: Add new id 0 BSSID 00:22:3f:ad:8c:8e SSID 'DartyBox_C62E'
New scan results available
Selecting BSS from priority group 0
Try to find WPA-enabled AP
0: 00:22:3f:ad:8c:8e ssid='DartyBox_C62E' wpa_ie_len=28 rsn_ie_len=0 caps=0x411
   skip - SSID mismatch
1: 00:11:22:33:44:55 ssid='NetworkName' wpa_ie_len=26 rsn_ie_len=0 caps=0x411
   selected based on WPA IE
   selected WPA AP 00:11:22:33:44:55 ssid='NetworkName'
Automatic auth_alg selection: 0x1
WPA: using IEEE 802.11i/D3.0
WPA: Selected cipher suites: group 8 pairwise 24 key_mgmt 2 proto 1
WPA: set AP WPA IE - hexdump(len=28): dd 1a 00 50 f2 01 01 00 00 50 f2 02 02 00 00 50 f2 02 00 50 f2 04 01 00 00 50 f2 02
WPA: clearing AP RSN IE
WPA: using GTK TKIP
WPA: using PTK CCMP
WPA: using KEY_MGMT WPA-PSK
WPA: not using MGMT group cipher
WPA: Set own WPA IE default - hexdump(len=24): dd 16 00 50 f2 01 01 00 00 50 f2 02 01 00 00 50 f2 04 01 00 00 50 f2 02
FT: Stored MDIE and FTIE from (Re)Association Response - hexdump(len=0):
Cancelling scan request
Trying to authenticate with 00:11:22:33:44:55 (SSID='NetworkName' freq=2462 MHz)
No keys have been configured - skip key clearing
State: SCANNING -> AUTHENTICATING
EAPOL: External notification - EAP success=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - EAP fail=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - portControl=Auto
EAPOL: Supplicant port status: Unauthorized
nl80211: Authenticate (ifindex=3)
  * bssid=00:11:22:33:44:55
  * freq=2462
  * SSID - hexdump_ascii(len=7):
     57 32 57 5f 44 61 76                              NetworkName         
  * IEs - hexdump(len=0): [NULL]
  * Auth Type 0
nl80211: Authentication request send successfully
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
nl80211: Event message available
nl80211: MLME event 37
SME: Authentication response: peer=00:11:22:33:44:55 auth_type=0 status_code=0
Trying to associate with 00:11:22:33:44:55 (SSID='NetworkName' freq=2462 MHz)
State: AUTHENTICATING -> ASSOCIATING
wpa_driver_nl80211_set_operstate: operstate 0->0 (DORMANT)
netlink: Operstate: linkmode=-1, operstate=5
WPA: set own WPA/RSN IE - hexdump(len=24): dd 16 00 50 f2 01 01 00 00 50 f2 02 01 00 00 50 f2 04 01 00 00 50 f2 02
nl80211: Associate (ifindex=3)
  * bssid=00:11:22:33:44:55
  * freq=2462
  * SSID - hexdump_ascii(len=7):
     57 32 57 5f 44 61 76                              NetworkName         
  * IEs - hexdump(len=24): dd 16 00 50 f2 01 01 00 00 50 f2 02 01 00 00 50 f2 04 01 00 00 50 f2 02
nl80211: Association request send successfully
nl80211: Event message available
nl80211: Ignored unknown event (cmd=19)
nl80211: Event message available
nl80211: MLME event 38
Association info event
resp_ies - hexdump(len=163): 01 08 82 84 8b 96 12 24 48 6c 32 04 0c 18 30 60 dd 18 00 50 f2 02 01 01 00 00 03 a4 00 00 27 a4 00 00 42 43 5e 00 62 32 2f 00 2d 1a 6e 10 17 ff ff 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 3d 16 0b 00 05 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 dd 1e 00 90 4c 33 6e 10 17 ff ff 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 dd 1a 00 90 4c 34 0b 00 05 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 dd 07 00 0c 43 00 00 00 00
freq=2462 MHz
FT: Stored MDIE and FTIE from (Re)Association Response - hexdump(len=0):
State: ASSOCIATING -> ASSOCIATED
wpa_driver_nl80211_set_operstate: operstate 0->0 (DORMANT)
netlink: Operstate: linkmode=-1, operstate=5
Associated to a new BSS: BSSID=00:11:22:33:44:55
No keys have been configured - skip key clearing
Associated with 00:11:22:33:44:55
WPA: Association event - clear replay counter
WPA: Clear old PTK
EAPOL: External notification - portEnabled=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - portValid=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - EAP success=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - portEnabled=1
EAPOL: SUPP_PAE entering state CONNECTING
EAPOL: enable timer tick
EAPOL: SUPP_BE entering state IDLE
Setting authentication timeout: 10 sec 0 usec
Cancelling scan request
RTM_NEWLINK: operstate=0 ifi_flags=0x11003 ([UP][LOWER_UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
RTM_NEWLINK: operstate=0 ifi_flags=0x11003 ([UP][LOWER_UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
RTM_NEWLINK: operstate=0 ifi_flags=0x11003 ([UP][LOWER_UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
nl80211: Event message available
nl80211: Ignore connect event (cmd=46) when using userspace SME
nl80211: Event message available
nl80211: MLME event 40
Disassociation notification
SME: Disassociation event received
SME: Deauthenticate to clear driver state
wpa_driver_nl80211_deauthenticate
nl80211: MLME command failed: ret=-107 (Transport endpoint is not connected)
Setting scan request: 0 sec 100000 usec
Added BSSID 00:11:22:33:44:55 into blacklist
CTRL-EVENT-DISCONNECTED bssid=00:11:22:33:44:55 reason=3
Disconnect event - remove keys
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=0x80e4f28 key_idx=0 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=0x80e4f28 key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=0x80e4f28 key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=0x80e4f28 key_idx=3 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=0x80e4f28 key_idx=4 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=0x80e4f28 key_idx=5 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=0x9137574 key_idx=0 set_tx=0 seq_len=0 key_len=0
   addr=00:11:22:33:44:55
State: ASSOCIATED -> DISCONNECTED
wpa_driver_nl80211_set_operstate: operstate 0->0 (DORMANT)
netlink: Operstate: linkmode=-1, operstate=5
EAPOL: External notification - portEnabled=0
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: Supplicant port status: Unauthorized
EAPOL: SUPP_BE entering state INITIALIZE
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - portValid=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - EAP success=0
EAPOL: Supplicant port status: Unauthorized
nl80211: Event message available
nl80211: Ignore disconnect event when using userspace SME
nl80211: Event message available
nl80211: Ignored unknown event (cmd=20)
nl80211: Event message available
nl80211: MLME event 39
Deauthentication notification
Added BSSID 00:00:00:00:00:00 into blacklist
CTRL-EVENT-DISCONNECTED bssid=00:00:00:00:00:00 reason=3
Disconnect event - remove keys
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=0x80e4f28 key_idx=0 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=0x80e4f28 key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=0x80e4f28 key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=0x80e4f28 key_idx=3 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=0x80e4f28 key_idx=4 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=0x80e4f28 key_idx=5 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=0x9137574 key_idx=0 set_tx=0 seq_len=0 key_len=0
   addr=00:00:00:00:00:00
State: DISCONNECTED -> DISCONNECTED
wpa_driver_nl80211_set_operstate: operstate 0->0 (DORMANT)
netlink: Operstate: linkmode=-1, operstate=5
EAPOL: External notification - portEnabled=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - portValid=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - EAP success=0
EAPOL: Supplicant port status: Unauthorized
State: DISCONNECTED -> SCANNING
Starting AP scan for wildcard SSID
Scan requested (ret=0) - scan timeout 30 seconds
nl80211: Event message available
nl80211: Scan trigger
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
EAPOL: startWhen --> 0
EAPOL: disable timer tick
EAPOL: Supplicant port status: Unauthorized
^CCTRL-EVENT-TERMINATING - signal 2 received
Removing interface wlan0
No keys have been configured - skip key clearing
State: SCANNING -> DISCONNECTED
wpa_driver_nl80211_set_operstate: operstate 0->0 (DORMANT)
netlink: Operstate: linkmode=-1, operstate=5
EAPOL: External notification - portEnabled=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - portValid=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - EAP success=0
EAPOL: Supplicant port status: Unauthorized
No keys have been configured - skip key clearing
Removed BSSID 00:00:00:00:00:00 from blacklist (clear)
Removed BSSID 00:11:22:33:44:55 from blacklist (clear)
BSS: Remove id 0 BSSID 00:22:3f:ad:8c:8e SSID 'DartyBox_C62E'
Cancelling scan request
Cancelling authentication timeout
netlink: Operstate: linkmode=0, operstate=6

有任何想法嗎?


5
2017-10-15 12:05


起源


您是否嘗試過運行wpa_supplicant並增加詳細程度?你用的是什麼硬件?你是否正確生成了psk? # wpa_passphrase "mywireless_ssid" "secretpassphrase"? - dset0x
我嘗試使用wpa_passfrase並更新了/etc/wpa_supplicat.conf,但我有同樣的錯誤......可能我需要在/etc/wpa_supplicat.conf中添加更多信息? - Rodnower
是否加載了接口的驅動程序?增加的詳細程度是否有用?嘗試刪除 -B 在測試和添加時 -Dwext 然後 -Dnl80211 強迫司機。 - dset0x
同樣,但是當我設置-Dnl80211時,“ioctl [SIOCSIWENCODEEXT]:無效參數”消失了。但仍然:WPA:4-Way握手失敗 - 預共享密鑰可能不正確。我將使用-d選項輸出。 - Rodnower


答案:


我之前看過這樣的錯誤消息,但沒有明確的解決方案。您可能想要嘗試的事情是:

  • 的wpa_supplicant.conf(5)。這些示例將為您提供可以嘗試的額外網絡選項的概念。 不要忘記添加雙引號 psk=

  • 使用 -Dnl80211 代替。看來這是你需要的驅動程序。

  • 嘗試使用路由器的網絡模式(B / G / N)。嘗試將其設置為不同的值 因為路由器和無線卡/驅動程序之間可能存在不兼容性。

  • compat的無線 一試。我過去沒有必須自己使用它,但我已經讀過它包含修補程序,修復過去像你這樣的問題。


6
2017-10-15 17:47



感謝名單。我會嘗試所有的:) - Rodnower


我通過關閉NetworkManager在Gentoo中修復它:

/etc/init.d/NetworkManager stop

當兩者都在運行時,它可能與wpa_supplicant衝突。


3
2018-04-05 08:31