I'm trying to connect android and Raspberry PI using WIFI Direct. It is connected successfully but it's the disconnect after 10 seconds automatically.
My configuration file is as per below
/etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=/var/run/wpa_supplicant
country=IN
ap_scan=1
device_name=rasberry
device_type=1-0050F204-1
driver_param=use_p2p_group_interface=1
p2p_go_intent=15
p2p_go_ht40=1
p2p_listen_reg_class=81
p2p_listen_channel=1
p2p_oper_reg_class=81
p2p_oper_channel=1
network={
ssid="DIRECT-Ke"
bssid=52:6d:c8:0d:bf:4c
psk="Y2s38gWz"
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP
auth_alg=OPEN
mode=3
disabled=2
}
network={
ssid="DIRECT-Wx"
bssid=62:cf:4f:8d:2d:d0
psk="rm9CdjHH"
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP
auth_alg=OPEN
mode=3
disabled=2
}
network={
ssid="DIRECT-ZY"
bssid=66:38:5e:c6:c0:38
psk="nR5wfpTa"
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP
auth_alg=OPEN
mode=3
disabled=2
}
My Commands are as per below.
root@raspberrypi:/home/pi#
root@raspberrypi:/home/pi# pkill wpa_supplicant
root@raspberrypi:/home/pi#
root@raspberrypi:/home/pi#
root@raspberrypi:/home/pi# wpa_supplicant -B -iwlan0 -Dnl80211 -c /etc/wpa_supplicant/wpa_supplicant.conf
Successfully initialized wpa_supplicant
root@raspberrypi:/home/pi# wpa_cli -iwlan0 p2p_group_add persistent
OK
root@raspberrypi:/home/pi# ifconfig
eth0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether b8:27:eb:98:b2:af txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
p2p-wlan0-0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::7afe:3a80:7306:daac prefixlen 64 scopeid 0x20<link>
ether aa:5c:a2:ac:60:88 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 13 bytes 2236 (2.1 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlan0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether b8:27:eb:cd:e7:fa txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
root@raspberrypi:/home/pi#
root@raspberrypi:/home/pi# wpa_cli -ip2p-wlan0-0 wps_pin any 0000
0000root@raspberrypi:/home/pi#
root@raspberrypi:/home/pi#
root@raspberrypi:/home/pi#
root@raspberrypi:/home/pi# wpa_cli
wpa_cli v2.8-devel
Copyright (c) 2004-2019, Jouni Malinen <[email protected]> and contributors
This software may be distributed under the terms of the BSD license.
See README for more details.
Selected interface 'p2p-wlan0-0'
Interactive mode
<3>RX-PROBE-REQUEST sa=8a:a3:03:ae:de:ff signal=0
<3>RX-PROBE-REQUEST sa=8a:a3:03:ae:de:ff signal=0
<3>RX-PROBE-REQUEST sa=8a:a3:03:ae:de:ff signal=0
<3>RX-PROBE-REQUEST sa=8a:a3:03:ae:de:ff signal=0
<3>RX-PROBE-REQUEST sa=8a:a3:03:ae:de:ff signal=0
<3>RX-PROBE-REQUEST sa=8a:a3:03:ae:de:ff signal=0
<3>WPS-ENROLLEE-SEEN 16:ad:ad:44:6d:08 52069f7c-c906-589a-8745-74c79d7d0d35 0-00000000-0 0x3148 0 1 [ ]
<3>RX-PROBE-REQUEST sa=16:ad:ad:44:6d:08 signal=0
<3>WPS-ENROLLEE-SEEN 16:ad:ad:44:6d:08 52069f7c-c906-589a-8745-74c79d7d0d35 0-00000000-0 0x3148 0 1 [ ]
<3>RX-PROBE-REQUEST sa=16:ad:ad:44:6d:08 signal=0
<3>WPS-ENROLLEE-SEEN 16:ad:ad:44:6d:08 52069f7c-c906-589a-8745-74c79d7d0d35 0-00000000-0 0x3148 0 1 [ ]
<3>RX-PROBE-REQUEST sa=16:ad:ad:44:6d:08 signal=0
<3>CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
<3>CTRL-EVENT-EAP-STARTED 8a:a3:03:ae:5e:ff
<3>CTRL-EVENT-EAP-PROPOSED-METHOD vendor=0 method=1
<3>CTRL-EVENT-EAP-PROPOSED-METHOD vendor=14122 method=254
<3>WPS-REG-SUCCESS 8a:a3:03:ae:5e:ff 52069f7c-c906-589a-8745-74c79d7d0d35
<3>WPS-SUCCESS
<3>CTRL-EVENT-EAP-FAILURE 8a:a3:03:ae:5e:ff
<3>CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
<3>AP-STA-CONNECTED 8a:a3:03:ae:5e:ff p2p_dev_addr=8a:a3:03:ae:de:ff
> p2p_peers
8a:a3:03:ae:de:ff
>
>
>
>
> status
bssid=aa:5c:a2:ac:60:88
freq=2412
ssid=DIRECT-NU
id=0
mode=P2P GO
pairwise_cipher=CCMP
group_cipher=CCMP
key_mgmt=WPA2-PSK
wpa_state=COMPLETED
ip_address=169.254.68.39
p2p_device_address=aa:5c:a2:ac:e0:88
address=aa:5c:a2:ac:60:88
uuid=a745cd13-965d-5f14-ba81-c7e7e99f8391
<3>AP-STA-DISCONNECTED 8a:a3:03:ae:5e:ff p2p_dev_addr=8a:a3:03:ae:de:ff
<3>RX-PROBE-REQUEST sa=8a:a3:03:ae:de:ff signal=0
<3>RX-PROBE-REQUEST sa=8a:a3:03:ae:de:ff signal=0
<3>RX-PROBE-REQUEST sa=8a:a3:03:ae:de:ff signal=0
Requested-Log of wpa_supplicant run in for ground
root@raspberrypi:/home/pi# systemctl stop [email protected]
root@raspberrypi:/home/pi# /sbin/wpa_supplicant -c/etc/wpa_supplicant/wpa_supplicant-wlan0.conf -Dnl80211 -iwlan0
Successfully initialized wpa_supplicant
P2P-DEVICE-FOUND fe:31:25:c7:57:0b p2p_dev_addr=fe:31:25:c7:57:0b pri_dev_type=10-0050F204-5 name='Redmi 9i' config_methods=0x188 dev_capab=0x25 group_capab=0x0 new=1
P2P-PROV-DISC-SHOW-PIN fe:31:25:c7:57:0b 22929280 p2p_dev_addr=fe:31:25:c7:57:0b pri_dev_type=10-0050F204-5 name='Redmi 9i' config_methods=0x188 dev_capab=0x25 group_capab=0x0
P2P-FIND-STOPPED
P2P-GO-NEG-SUCCESS role=GO freq=2437 ht40=1 peer_dev=fe:31:25:c7:57:0b peer_iface=fe:31:25:c7:57:0b wps_method=Display
p2p-wlan0-0: Could not connect to kernel driver
Using interface p2p-wlan0-0 with hwaddr 2e:2c:5b:36:89:20 and ssid "DIRECT-Q0"
p2p-wlan0-0: interface state UNINITIALIZED->ENABLED
p2p-wlan0-0: AP-ENABLED
p2p-wlan0-0: CTRL-EVENT-CONNECTED - Connection to 2e:2c:5b:36:89:20 completed [id=0 id_str=]
p2p-wlan0-0: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
p2p-wlan0-0: CTRL-EVENT-EAP-STARTED fe:31:25:c7:57:0b
p2p-wlan0-0: CTRL-EVENT-EAP-PROPOSED-METHOD vendor=0 method=1
p2p-wlan0-0: CTRL-EVENT-EAP-PROPOSED-METHOD vendor=14122 method=254
p2p-wlan0-0: WPS-REG-SUCCESS fe:19:99:55:90:cb 4daa84b5-06ad-56ec-974c-9e9c804bac43
P2P-GROUP-FORMATION-SUCCESS
P2P-GROUP-STARTED p2p-wlan0-0 GO ssid="DIRECT-Q0" freq=2437 go_dev_addr=2e:2c:5b:36:09:20
p2p-wlan0-0: WPS-SUCCESS
p2p-wlan0-0: CTRL-EVENT-EAP-FAILURE fe:31:25:c7:57:0b
p2p-wlan0-0: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
p2p-wlan0-0: AP-STA-CONNECTED fe:31:25:c7:57:0b p2p_dev_addr=fe:31:25:c7:57:0b
AP-STA-CONNECTED fe:31:25:c7:57:0b p2p_dev_addr=fe:31:25:c7:57:0b
p2p-wlan0-0: AP-STA-DISCONNECTED fe:31:25:c7:57:0b p2p_dev_addr=fe:31:25:c7:57:0b
AP-STA-DISCONNECTED fe:31:25:c7:57:0b p2p_dev_addr=fe:31:25:c7:57:0b