Install Required Software’s
iw and wpa_supplicant userspace command line tools are required in-order to perform wi-fi Direct / p2p operations on Ubuntu Linux.
sudo apt-get update && sudo apt-get install iw
wpa_supplicant version 1.x:
sudo apt-get install wpa-supplicant or
#for Latest Ubuntu
sudo apt-get install wpasupplicant
Wireless Adapter Supports Wi-Fi Direct
To verify the p2p Group/Client support for your Wireless Adapter use iw command as a sudo/root
$ sudo iw list
Grep and check for following block to see the supported modes for your wi-fi adapter.
Supported interface modes:
- * IBSS
- * managed
- * monitor
- * AP
- * P2P-GO
- * P2P-Client
If you see P2P-GO(Group Owner) and P2P-Client, then your wireless NIC supports Wi-Fi Direct.
The following commands are used with wpa_cli.
For full list of commands please check this post: wpa_supplicant and wpa_cli
wpa_cli commands will used with wpa_supplicant daemon for wi-fi Direct connection establishments.
Wi-Fi Direct Connection Methods
In-order to establish the connection there are different types of connection methods, they are
- PBC – Push Button Control method
- PIN – Secret PIN number method
- Invite – Invitation Method