I have been working on the Linux side of an effort to connect to a Windows 10 machine using the sample apps from Microsoft to connect via Wi-Fi direct. We are experiencing a disconnect shortly after connect but the reason for the deauthentication is unknown (1).
I have put the config file contents below and a section of the log output where the issue occurs.
The supplicant is started using:
wpa_supplicant -iwlan0 -Dnl80211 -c/etc/wcm/wpa_supplicant.conf -t
We control the supplicant via an executable we have made that interacts with the supplicant as wpa_cli does. A p2p-find is performed and when the invitation/pbc request from the Windows 10 machine is received, we respond with:
p2p-connect 18:1d:ea:b0:96:a0 pbc persistent=0
where the MAC address is peer address from the Windows 10 request.
If you look in the log output at the bottom of this pst you can see the station (Windows 10 machine) connects and then disconnects shortly afterward.
wpa_supplicant.conf contents:
ctrl_interface=/var/run/wpa_supplicant
ap_scan=1
device_type=1-0050F204-1
country=US
max_num_sta=1
eapol_version=2
ignore_old_scan_res=1
bss_max_count=300
persistent_reconnect=0
config_methods=virtual_push_button
p2p_go_ht40=1
p2p_go_vht=0
p2p_go_intent=15
p2p_oper_channel=0
p2p_go_max_inactivity=10
p2p_group_idle=0
network={
ssid="bigbadvoodoo"
psk="something_clever"
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP
group=CCMP
mode=3
auth_alg=OPEN
disabled=2
}
device_name=bigbadvoodoo
wpa_supplicant verbose logging where we see the Windows 10 machine connected and then shortly thereafter disconnected related to some authentication issue:
1616506718.133447: WPA: Received EAPOL-Key from 1a:1d:ea:b0:96:9f key_info=0x30a type=2 mic_len=16 key_data_length=0
1616506718.133480: WPA: EAPOL-Key header (ending before Key MIC) - hexdump(len=77): 02 03 0a 00 00 00 00 00 00 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
1616506718.133618: WPA: EAPOL-Key Key MIC - hexdump(len=16): 1c e6 2a 13 05 a6 88 9d ba c7 4d 2c 36 2d b3 eb
1616506718.133664: WPA: Received Key Nonce - hexdump(len=32): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
1616506718.133734: WPA: Received Replay Counter - hexdump(len=8): 00 00 00 00 00 00 00 02
1616506718.133780: hostapd_logger: STA 1a:1d:ea:b0:96:9f - received EAPOL-Key frame (4/4 Pairwise)
1616506718.133811: WPA: EAPOL-Key MIC using HMAC-SHA1
1616506718.133878: WPA: 1a:1d:ea:b0:96:9f WPA_PTK entering state PTKINITDONE
1616506718.133969: wpa_driver_nl80211_set_key: ifindex=11 (p2p-wlan0-0) alg=3 addr=0x745e10 key_idx=0 set_tx=1 seq_len=0 key_len=16
1616506718.134031: nl80211: KEY_DATA - hexdump(len=16): [REMOVED]
1616506718.134061: addr=1a:1d:ea:b0:96:9f
1616506718.134584: P2P: Canceled P2P group formation timeout on data connection
1616506718.134635: p2p-wlan0-0: P2P: Marking group formation completed on GO on first data connection
1616506718.134706: p2p-wlan0-0: AP-STA-CONNECTED 1a:1d:ea:b0:96:9f p2p_dev_addr=18:1d:ea:b0:96:a0
1616506718.134744: CTRL-DEBUG: ctrl_sock-sendmsg: sock=29 sndbuf=163840 outq=0 send_len=65
1616506718.134842: CTRL_IFACE monitor sent successfully to /tmp/wpa_ctrl_2071-47\x00
1616506718.134884: AP-STA-CONNECTED 1a:1d:ea:b0:96:9f p2p_dev_addr=18:1d:ea:b0:96:a0
1616506718.134918: nl80211: Set STA flags - ifname=p2p-wlan0-0 addr=1a:1d:ea:b0:96:9f total_flags=0x67 flags_or=0x1 flags_and=0xffffffff authorized=1
1616506718.136727: hostapd_logger: STA 1a:1d:ea:b0:96:9f - authorizing port
1616506718.136813: hostapd_logger: STA 1a:1d:ea:b0:96:9f - pairwise key handshake completed (RSN)
1616506718.392067: nl80211: Event message available
1616506718.392231: nl80211: BSS Event 59 (NL80211_CMD_FRAME) received for p2p-wlan0-0
1616506718.392276: nl80211: MLME event 59 (NL80211_CMD_FRAME) on p2p-wlan0-0(3a:0b:3c:e8:81:0a) A1=3a:0b:3c:e8:81:0a A2=1a:1d:ea:b0:96:9f
1616506718.392326: nl80211: MLME event frame - hexdump(len=26): c0 00 2c 00 3a 0b 3c e8 81 0a 1a 1d ea b0 96 9f 3a 0b 3c e8 81 0a c0 ba 01 00
1616506718.392408: nl80211: Frame event
1616506718.392437: nl80211: RX frame da=3a:0b:3c:e8:81:0a sa=1a:1d:ea:b0:96:9f bssid=3a:0b:3c:e8:81:0a freq=5180 ssi_signal=-37 fc=0xc0 seq_ctrl=0xbac0 stype=12 (
WLAN_FC_STYPE_DEAUTH) len=26
1616506718.392497: p2p-wlan0-0: Event RX_MGMT (18) received
1616506718.392553: p2p-wlan0-0: mgmt::deauth
1616506718.392604: p2p-wlan0-0: deauthentication: STA=1a:1d:ea:b0:96:9f reason_code=1
1616506718.392664: p2p-wlan0-0: AP-STA-DISCONNECTED 1a:1d:ea:b0:96:9f p2p_dev_addr=18:1d:ea:b0:96:a0
1616506718.392703: CTRL-DEBUG: ctrl_sock-sendmsg: sock=29 sndbuf=163840 outq=0 send_len=68
1616506718.392804: CTRL_IFACE monitor sent successfully to /tmp/wpa_ctrl_2071-47\x00
1616506718.392846: AP-STA-DISCONNECTED 1a:1d:ea:b0:96:9f p2p_dev_addr=18:1d:ea:b0:96:a0