WPA请求者ERROR WPA:4-Way握手在WiFi Direct设置中失败

时间:2014-05-20 14:56:54

标签: wpa

我正在尝试在两台Linux机器之间设置WiFi Direct。我正在使用Atheros 9k卡来建立连接。我们在这个过程中遇到了一个问题,我希望你们能帮助我。 当我在两个部分中运行WPA Supplicant时,我得到了这个:

wpa_supplicant -B -D nl80211 -i wlan0 -cp2p.conf -d 
wpa_supplicant v2.2-devel
random: Trying to read entropy from /dev/random
Successfully initialized wpa_supplicant
Initializing interface 'wlan0' conf 'p2p.conf' driver 'nl80211' ctrl_interface 'N/A' bridge 'N/A'
Configuration file 'p2p.conf' -> '/root/p2p.conf'
Reading configuration file '/root/p2p.conf'
ctrl_interface='/var/run/wpa_supplicant'
ap_scan=2
update_config=1
device_name='giulia118'
p2p_go_ht40=1
Priority group 0
id=0 ssid='Direct_Network'
nl80211: Could not add multicast membership for vendor events: -2 (No such file or  directory)
rfkill: initial event: idx=0 type=1 op=0 soft=0 hard=0
rfkill: initial event: idx=1 type=1 op=0 soft=0 hard=0
nl80211: Supported cipher 00-0f-ac:1
nl80211: Supported cipher 00-0f-ac:5
nl80211: Supported cipher 00-0f-ac:2
nl80211: Supported cipher 00-0f-ac:4
nl80211: Supported cipher 00-0f-ac:6
nl80211: Using driver-based off-channel TX
nl80211: interface wlan0 in phy phy0
nl80211: Set mode ifindex 4 iftype 2 (STATION)
nl80211: Subscribe to mgmt frames with non-AP handle 0x9fa4380
nl80211: Register frame type=0xd0 nl_handle=0x9fa4380 match=040a
nl80211: Register frame type=0xd0 nl_handle=0x9fa4380 match=040b
nl80211: Register frame type=0xd0 nl_handle=0x9fa4380 match=040c
nl80211: Register frame type=0xd0 nl_handle=0x9fa4380 match=040d
nl80211: Register frame type=0xd0 nl_handle=0x9fa4380 match=090a
nl80211: Register frame type=0xd0 nl_handle=0x9fa4380 match=090b
nl80211: Register frame type=0xd0 nl_handle=0x9fa4380 match=090c
nl80211: Register frame type=0xd0 nl_handle=0x9fa4380 match=090d
nl80211: Register frame type=0xd0 nl_handle=0x9fa4380 match=0409506f9a09
nl80211: Register frame type=0xd0 nl_handle=0x9fa4380 match=7f506f9a09
nl80211: Register frame type=0xd0 nl_handle=0x9fa4380 match=06
nl80211: Register frame type=0xd0 nl_handle=0x9fa4380 match=0a07
nl80211: Register frame type=0xd0 nl_handle=0x9fa4380 match=0a11
netlink: Operstate: ifindex=4 linkmode=1 (userspace-control), operstate=5 (IF_OPER_DORMANT)
nl80211: driver param='(null)'
Add interface wlan0 to a new radio phy0
nl80211: Regulatory information - country=00
nl80211: 2402-2472 @ 40 MHz 20 mBm
nl80211: 2457-2482 @ 20 MHz 20 mBm (no IR)
nl80211: 2474-2494 @ 20 MHz 20 mBm (no OFDM) (no IR)
nl80211: 5170-5250 @ 40 MHz 20 mBm (no IR)
nl80211: 5735-5835 @ 40 MHz 20 mBm (no IR)
nl80211: Added 802.11b mode based on 802.11g information
wlan0: Own MAC address: 04:f0:21:06:1d:14
wpa_driver_nl80211_set_key: ifindex=4 (wlan0) alg=0 addr=(nil) key_idx=0 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=4 (wlan0) alg=0 addr=(nil) key_idx=1 set_tx=0  seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=4 (wlan0) alg=0 addr=(nil) key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=4 (wlan0) alg=0 addr=(nil) key_idx=3 set_tx=0 seq_len=0 key_len=0
wlan0: RSN: flushing PMKID list in the driver
nl80211: Flush PMKIDs
wlan0: Setting scan request: 0.100000 sec
wlan0: WPS: UUID based on MAC address: 94f8bf7f-bad8-5fc8-87c2-05c3afbed265
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: Supplicant port status: Unauthorized
nl80211: Skip set_supp_port(unauthorized) while not associated
EAPOL: KEY_RX entering state NO_KEY_RECEIVE
EAPOL: SUPP_BE entering state INITIALIZE
EAP: EAP entering state DISABLED
P2P: Own listen channel: 6
P2P: Random operating channel: 81:6
P2P: Add operating class 81
P2P: Channels - hexdump(len=11): 01 02 03 04 05 06 07 08 09 0a 0b
P2P: Add operating class 115
P2P: Channels - hexdump(len=4): 24 28 2c 30
P2P: Add operating class 124
P2P: Channels - hexdump(len=4): 95 99 9d a1
P2P: Add operating class 116
P2P: Channels - hexdump(len=2): 24 2c
P2P: Add operating class 117
P2P: Channels - hexdump(len=2): 28 30
P2P: Add operating class 126
P2P: Channels - hexdump(len=2): 95 9d
P2P: Add operating class 127
P2P: Channels - hexdump(len=2): 99 a1
P2P: initialized
P2P: channels: 81:1,2,3,4,5,6,7,8,9,10,11 115:36,40,44,48 124:149,153,157,161 116:36,44 117:40,48 126:149,157 127:153,161
P2P: cli_channels:
wlan0: Added interface wlan0
wlan0: State: DISCONNECTED -> DISCONNECTED
nl80211: Set wlan0 operstate 0->0 (DORMANT)
netlink: Operstate: ifindex=4 linkmode=-1 (no change), operstate=5 (IF_OPER_DORMANT)
Daemonize..

然后我运行wpa_cli并使用命令在pbc(Pusg按钮控件)中创建p2p组,并且失败连接的最终消息是:

第一台设备:

<3>WPS-AP-AVAILABLE-PBC 
<3>SME: Trying to authenticate with 04:f0:21:06:1d:1f (SSID='DIRECT-Mj' freq=2412 MHz)
<3>Trying to associate with 04:f0:21:06:1d:1f (SSID='DIRECT-Mj' freq=2412 MHz)
<3>Associated with 04:f0:21:06:1d:1f
<3>CTRL-EVENT-EAP-STARTED EAP authentication started
<3>CTRL-EVENT-EAP-STATUS status='started' parameter=''
<3>CTRL-EVENT-EAP-PROPOSED-METHOD vendor=14122 method=1
<3>CTRL-EVENT-EAP-STATUS status='accept proposed method' parameter='WSC'
<3>CTRL-EVENT-EAP-METHOD EAP vendor 14122 method 1 (WSC) selected
<3>WPS-CRED-RECEIVED 
<3>WPS-SUCCESS 
<3>P2P-GROUP-FORMATION-SUCCESS 
<3>CTRL-EVENT-EAP-STATUS status='completion' parameter='failure'
<3>CTRL-EVENT-EAP-FAILURE EAP authentication failed
<3>CTRL-EVENT-DISCONNECTED bssid=04:f0:21:06:1d:1f reason=3 locally_generated=1
<3>SME: Trying to authenticate with 04:f0:21:06:1d:1f (SSID='DIRECT-Mj' freq=2412 MHz)
<3>Trying to associate with 04:f0:21:06:1d:1f (SSID='DIRECT-Mj' freq=2412 MHz)
<3>CTRL-EVENT-REGDOM-CHANGE init=DRIVER type=WORLD
<3>Associated with 04:f0:21:06:1d:1f
<3>CTRL-EVENT-DISCONNECTED bssid=04:f0:21:06:1d:1f reason=2
<3>WPA: 4-Way Handshake failed - pre-shared key may be incorrect
<3>CTRL-EVENT-REGDOM-CHANGE init=DRIVER type=WORLD
<3>CTRL-EVENT-SCAN-STARTED 
<3>CTRL-EVENT-SCAN-RESULTS 
<3>WPS-AP-AVAILABLE 
<3>P2P-GROUP-FORMATION-FAILURE 
<3>P2P-GROUP-REMOVED wlan0 client reason=FORMATION_FAILED

第二台设备:

<3>AP-ENABLED 
<3>CTRL-EVENT-CONNECTED - Connection to 04:f0:21:06:1d:1f completed [id=1 id_str=]
<3>P2P-GROUP-STARTED wlan0 GO ssid="DIRECT-Mj" freq=2412 passphrase="ZPHbkRAf"   go_dev_addr=04:f0:21:06:1d:1f
wps_pbc
> OK
<3>WPS-PBC-ACTIVE 
<3>P2P-PROV-DISC-PBC-REQ 04:f0:21:06:1d:14 p2p_dev_addr=04:f0:21:06:1d:14  pri_dev_type=1-0050F204-1 name='giulia118' config_methods=0x108 dev_capab=0x21  group_capab=0x0 group=wlan0
<3>WPS-ENROLLEE-SEEN 04:f0:21:06:1d:14 94f8bf7f-bad8-5fc8-87c2-05c3afbed265 1-0050F204-1 0x2108 4 1 [giulia118]
<3>CTRL-EVENT-EAP-STARTED 04:f0:21:06:1d:14
<3>CTRL-EVENT-EAP-PROPOSED-METHOD vendor=0 method=1
<3>CTRL-EVENT-EAP-PROPOSED-METHOD vendor=14122 method=254
<3>WPS-REG-SUCCESS 04:f0:21:06:1d:14 94f8bf7f-bad8-5fc8-87c2-05c3afbed265
<3>WPS-PBC-DISABLE 
<3>WPS-SUCCESS 
<3>CTRL-EVENT-EAP-FAILURE 04:f0:21:06:1d:14
<3>WPS-ENROLLEE-SEEN 04:f0:21:06:1d:14 94f8bf7f-bad8-5fc8-87c2-05c3afbed265 1-0050F204-1 0x2108 0 0 [giulia118]

我的配置(p2p.conf)文件的内容是:

第一台设备:

ctrl_interface=/var/run/wpa_supplicant

ap_scan=2
fast_reauth=1
update_config=1
device_name=giulia116
device_type=1-0050F204-1
p2p_go_ht40=1

network={
    ssid="Direct_Network"
    psk="12345678"
    proto=RSN WPA
    key_mgmt=WPA-PSK
    pairwise=CCMP TKIP
    group=CCMP TKIP
}

第二台设备:

ctrl_interface=/var/run/wpa_supplicant
ap_scan=2
update_config=1
device_name=giulia118
device_type=1-0050F204-1
p2p_go_ht40=1

network={
    ssid="Direct_Network"
    psk="12345678"
    key_mgmt=WPA-PSK
    group=CCMP TKIP
}

的ifconfig:

eth0      Link encap:Ethernet  HWaddr 00:0d:b9:2e:1b:88  
          inet addr:192.168.97.116  Bcast:192.168.97.255  Mask:255.255.255.0
          inet6 addr: fe80::20d:b9ff:fe2e:1b88/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2949 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1840 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:321032 (321.0 KB)  TX bytes:268766 (268.7 KB)
          Interrupt:10 Base address:0xe000 

eth1      Link encap:Ethernet  HWaddr 00:0d:b9:2e:1b:89  
          inet addr:172.16.0.235  Bcast:172.16.0.255  Mask:255.255.255.0
          inet6 addr: fe80::20d:b9ff:fe2e:1b89/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:163951 errors:0 dropped:0 overruns:0 frame:0
          TX packets:35 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:17016272 (17.0 MB)  TX bytes:4093 (4.0 KB)
          Interrupt:15 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

mon.wlan0 Link encap:UNSPEC  HWaddr 04-F0-21-06-1D-1F-30-30-00-00-00-00-00-00-00-00  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:716 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:104534 (104.5 KB)  TX bytes:0 (0.0 B)

wlan0     Link encap:Ethernet  HWaddr 04:f0:21:06:1d:1f  
          inet6 addr: fe80::6f0:21ff:fe06:1d1f/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:13 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:2154 (2.1 KB)  TX bytes:576 (576.0 B)

.config:

CONFIG_DRIVER_NL80211=y
CONFIG_READLINE=y
CONFIG_CTRL_IFACE=y
CONFIG_WPS=y
CONFIG_WPS2=y
CONFIG_P2P=y
CONFIG_AP=y

#CONFIG_DRIVER_WEXT=y
#CONFIG_DRIVER_BSD=y
#CONFIG_DRIVER_NDIS=y
CONFIG_IEEE8021X_EAPOL=y
#CONFIG_EAP_MD5=y
#CONFIG_EAP_MSCHAPV2=y
CONFIG_EAP_TLS=y
CONFIG_EAP_PEAP=y
#CONFIG_EAP_TTLS=y
#CONFIG_EAP_GTC=y
#CONFIG_EAP_OTP=y
#CONFIG_EAP_SIM=y
#CONFIG_EAP_AKA=y
CONFIG_EAP_PSK=y
#CONFIG_EAP_SAKE=y
#CONFIG_EAP_GPSK=y
#CONFIG_EAP_PAX=y
CONFIG_EAP_LEAP=y
#CONFIG_EAP_IKEV2=y
#CONFIG_PCSC=y 

该错误似乎与“4-Way Handshake”失败有关。可能是预共享密钥不正确吗?为什么我要“删除组”? 我很感激有关此事的任何建议。

提前谢谢大家!

0 个答案:

没有答案