I'm trying to make wifi-direct connection between Android and Linux. I'm using rtl8188au.
I found some tips about wifi direct by using wpa_supplicant, so I get wpa_supplicant v2.0. and this is what I did for wifi-direct.
1.Compiled rtl8288au driver, activated nl80211.
2.Compiled wpa_supplicant and wpa_cli for nl80211.
3.Run wpa_supplicant on linux, with option -Dnl80211. success.
4.Set ip address for wlan0.
5.Run wpa_cli, and try to connect to android device.
The connection can made success at once, but disconnected soon.
Here is wpa_cli logs.
wpa_cli -p /var/run/wpa_supplicant
> p2p_find
OK
<3>P2P-DEVICE-FOUND e6:fa:ed:8a:5e:e8 p2p_dev_addr=e6:fa:ed:8a:5e:e8
pri_dev_type=10-0050F204-5 name='[Phone] Kulong' config_methods=0x188
dev_capab=0x25 group_capab=0x0
>
>
> p2p_connect e6:fa:ed:8a:5e:e8 pbc
OK
<3>P2P-FIND-STOPPED
<3>P2P-DEVICE-FOUND e6:fa:ed:8a:5e:e8 p2p_dev_addr=e6:fa:ed:8a:5e:e8
pri_dev_type=10-0050F204-5 name='[Phone] Kulong' config_methods=0x80
dev_capab=0x25 group_capab=0x8
<3>P2P-GO-NEG-SUCCESS
<3>CTRL-EVENT-STATE-CHANGE id=-1 state=3 BSSID=00:00:00:00:00:00 SSID=
<3>CTRL-EVENT-CONNECTED - Connection to 38:1d:d9:d4:db:70 completed (auth)
[id=0 id_str=]
<3>CTRL-EVENT-STATE-CHANGE id=0 state=9 BSSID=38:1d:d9:d4:db:70 SSID=DIRECT-4J
<3>CTRL-EVENT-EAP-STARTED e6:fa:ed:8a:de:e8
<3>CTRL-EVENT-EAP-PROPOSED-METHOD vendor=0 method=1
<3>CTRL-EVENT-EAP-PROPOSED-METHOD vendor=14122 method=254
<3>WPS-REG-SUCCESS e6:fa:ed:8a:de:e8 2d96823c-8a30-5dd0-a267-e3adae8b1564
<3>P2P-GROUP-FORMATION-SUCCESS
<3>P2P-GROUP-STARTED wlan0 GO ssid="DIRECT-4J" freq=2412
passphrase="xZbKV6sF" go_dev_addr=38:1d:d9:d4:db:70
<3>WPS-SUCCESS
<3>CTRL-EVENT-EAP-FAILURE e6:fa:ed:8a:de:e8
<3>AP-STA-CONNECTED e6:fa:ed:8a:de:e8 p2p_dev_addr=e6:fa:ed:8a:5e:e8
<3>AP-STA-DISCONNECTED e6:fa:ed:8a:de:e8 p2p_dev_addr=e6:fa:ed:8a:5e:e8
<3>P2P-DEVICE-LOST p2p_dev_addr=e6:fa:ed:8a:5e:e8
Is there anything wrong?
If so, what should I do for complete wifi-direct connection?