This topic is for ConnectCore 6 SOMs that have an Atheros AR6233 wireless MAC. If you are using a ConnectCore 6N SOM that has a Qualcomm QCA6564 wireless MAC, see this topic for ConnectCore 6 Plus, which uses the same Wi-Fi chip. |
Wi-Fi Direct
Wi-Fi Direct is a Wi-Fi standard that allows devices to connect with each other without requiring a Wi-Fi access point. Wi-Fi Direct negotiates the link with a Wi-Fi Protected Setup (WPS) system that assigns each device a limited wireless access point.
Establishing a peer-to-peer (P2P) link has the following phases:
-
P2P discovery, which allows to search for P2P devices in the vicinity
-
P2P group formation, a P2P group is formed with the identification of one of the devices as group owner. A device can either become group owner (GO) autonomously if configured to do so or it can be negotiated between devices with the exchange of GO intents.
-
P2P provisioning, which authenticates the link by using either Push Button Configuration (PBC) or PIN authentication.
-
P2P connection, when the connection between a Group Owner (GO) and a Group Client (GC) is actually established.
P2P interfaces
The Wi-Fi driver on load creates a p2p0
interface that is used by the wpa_supplicant for P2P group formation.
Once a group is formed, virtual p2p-p2p0-N interfaces are created, where N is an index starting at 0.
These virtual interfaces are then used for provisioning.
-
Group additions, find, and connect operations happen on the
p2p0
interface. -
Provisioning occurs on the virtual p2p-p2p0-N interfaces.
See Wireless virtual MAC addresses for more information. Configure the virtual interfaces before attempting to connect more than one device.
Enable P2P on the driver
The p2p0
interface is disabled by default to improve the performance of the wlan0
interface in client infrastructure mode.
Enable P2P interface
Create a virtual interface with the following command:
# iw dev wlan0 interface add p2p0 type managed
Now modify /etc/network/interfaces
and change the p2p0
interface as follows:
auto p2p0
iface p2p0 inet static
address 192.168.43.30
netmask 255.255.255.0
wpa-driver nl80211
wpa-conf /etc/wpa_supplicant_p2p.conf
Now bring up the interface with the following command:
# ifup p2p0
Manual P2P connection setup
The following examples will use two ConnectCore 6 devices to establish P2P connections.
Before running any of the examples, bring up the p2p0
interface on both peers with:
# ifup p2p0
The examples below use wpa-supplicant P2P-specific commands.
For more information about these commands, see the wpa_supplicant and Wi-Fi P2P README.
|
Autonomous GO creation
Create Autonomous Group Owner (GO) and join using PBC method
Peer (GO) ---- PBC --- Peer (GC)
Step | Peer CC61 | Peer CC62 |
---|---|---|
1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
Ctrl+C to exit |
Ctrl+C to exit |
6 |
|
|
7 |
|
|
8 |
|
|
Create Autonomous GO and join using PIN from GO
Peer (GO) ---- PIN --- Peer (GC)
Step | Peer CC61 | Peer CC62 |
---|---|---|
1 |
|
|
2 |
|
|
3 |
|
|
4 |
Ctrl+C to exit |
|
5 |
(shows <pin>) |
|
6 |
|
|
7 |
Ctrl+C to exit |
|
8 |
|
|
9 |
|
|
Create Autonomous GO and join using PIN from GC
Peer (GO) ---- PIN --- Peer (GC)
Step | Peer CC61 | Peer CC62 |
---|---|---|
1 |
|
|
2 |
|
|
3 |
|
|
4 |
(shows <pin>) |
|
5 |
Ctrl+C to exit |
Ctrl+C to exit |
6 |
|
|
7 |
|
|
8 |
|
|
Create Autonomous GO and invite GC using PBC
Peer (GO) ---- PBC --- Peer (GC)
Step | Peer CC61 | Peer CC62 |
---|---|---|
1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
Ctrl+C to exit |
Ctrl+C to exit |
7 |
|
|
8 |
|
|
9 |
|
|
For any of these methods, if you want to use the 5GHz frequency,
issue p2p_group_add freq=5180 in step two.
|
Negotiated GO
Negotiate GO and join using PIN
Peer (GO | GC) ---- PIN --- Peer (GO | GC)
Step | Peer CC61 | Peer CC62 |
---|---|---|
1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
Ctrl+C to exit |
Ctrl+C to exit |
7 |
|
|
8 |
|
|
Negotiate GO and join using PBC
Peer (GO | GC) ---- PBC --- Peer (GO | GC)
Step | Peer CC61 | Peer CC62 |
---|---|---|
1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
Ctrl+C to exit |
Ctrl+C to exit |
7 |
|
|
8 |
|
|