Scenarios covered by 'Wi-Fi direct':
Wi-Fi CERTIFIED Wi-Fi Direct® is a certification mark for devices supporting a technology that enables Wi-Fi devices to connect directly,
making it simple and convenient to do things like print, share, sync and display.
Products bearing the Wi-Fi Direct certification mark can connect to one another without joining a traditional home, office or hotspot network.
System setup: RaspberryPi 3 Model B Plus Rev 1.3
OS: 2018-11-13-raspbian-stretch-full.imgs
I'll use WPA supplicant service for network setup. It's a network service supporting WEP, WPA and WPA2; It implements key negotiation with a WPA authenticator and it controls the roaming and IEEE 802.11 authentication/association of the wireless driver.
$ sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
the file should look like:
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1 country=US ap_scan=1 device_name=RPi_3_1 device_type=1-0050F204-1 driver_param=use_p2p_group_interface=1 driver_param=p2p_device=1 #log/debug settings p2p_listen_reg_class=81 p2p_listen_channel=1 p2p_oper_reg_class=81 p2p_oper_channel=1 # p2p_go_intent=1 p2p_go_ht40=12. kill wpa_supplicant service if it's already started.
$ sudo killall wpa_supplicant
3. delete wlan0 setup file if it's already setup
$ sudo rm /var/run/wpa_supplicant/wlan0
4. start wpa_supplicant service:
$ sudo wpa_supplicant -B -i wlan0 -D nl80211 -c /etc/wpa_supplicant/wpa_supplicant.conf
$ reboot
$ sudo wpa_cli -i wlan0
6. create group(access point)
We'll use command line interface for AP related commands
> p2p_group_add
AP creation. p2p-wlan0-0 interface created OK
$ wpa_cli -i p2p-wlan0-0
# generate a connection pin
> wps_pin any
# or a specific pin: 1234
> wps_pin any 1234
$ sudo wpa_cli -i wlan0
# inside the console we need to join the group
> p2p_connect < hw_address_for_p2p-wlan0-0 of the RPi1 > <pin created, in this case 1234> join
client joining AP. p2p-wlan0-0 interface created OK
IF we have ip than everything is ok and, on the server side(RPI1) we can see the connected devices:
$ sudo arp -a
If you need some guidance in engineering field or you're seeking for some help don't hesitate to write me.