1 WiFi P2P Functionality [experimental]
2 *************************************
4 Note: Nothing about WiFi P2P Services is exposed, this is yet to be specified.
9 WiFi P2P is supported as follows:
10 - if hardware and wpa_supplicant supports it, a "p2p" technology will appear
11 in the technology list
12 - "p2p" technology, as for "wifi" technology, supports a Scan() method. Such
13 method will trigger a P2P find process. The results will be available
14 through the Manager interface, comparable to services being available
15 through this same interface after a Scan() on "wifi" technology.
16 - the result of a "p2p" Scan() consists into a list of "peer" objects
17 - it is then possible to access peer information, connecting and disconnecting
24 The UI willing to access to WiFi P2P technology should proceed this way:
25 - Request Manager.GetTechnologies() and figure out from the result if "p2p"
26 technology is provided. What comes next implies this successful case.
27 - Add a listener to signal Manager.PeersChanged(): this signal will provide
28 the results of a "p2p" technology Scan().
29 - From the "p2p" technology object, request a Technology.Scan() method. This
30 will run for a while a P2P find process.
31 - If P2P peers are found, it will be signaled through Manager.PeersChanged().
32 Objects are "Peer" objects. UI might use Manager.GetPeers() instead, if
33 listening to a signal is not the preferred way.
34 - Once selected the proper Peer object, request a Peer.Connect() method on it
35 so it will connect to it. Peer.Disconnect() will disconnect.
40 Through such API, everything is made to hide irrelevant information for the
41 applications, which are:
43 - Everything related to the P2P group and the Group Owner (GO)
44 - All low level peer settings
45 - All Service Request Discovery mechanism
47 Hiding this mean ConnMan will handle it properly behind.
49 For instance, if you connect to a Peer which happens to be a persistent GO
50 ConnMan will notice it and store the Group information for a later connection
51 to speed up such connection.
53 For Service Discovery (SD), this will be handled the same way: silently