---
 doc/p2p-overview.txt | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 62 insertions(+)
 create mode 100644 doc/p2p-overview.txt

diff --git a/doc/p2p-overview.txt b/doc/p2p-overview.txt
new file mode 100644
index 0000000..a796df4
--- /dev/null
+++ b/doc/p2p-overview.txt
@@ -0,0 +1,62 @@
+P2P support overview
+********************
+
+This document describes how P2P support inside connman works.
+
+Finding and listing other peers
+===============================
+
+P2P support is generally turned off inside connman. It has to be enable 
explicitly by
+setting a property for for the wifi technology through the 
net.connman.Technology dbus
+interface.
+
+net.connman.Technology.SetProperty("P2P", true)
+
+After P2P support is enabled connman will scan for peers whenever a scan for 
wifi networks
+is scheduled. Either the scan is scheduled manually by the user through calling
+
+net.connman.Technology.Scan()
+
+or by background scanning.
+
+For every found peer a service object will be created and exported through 
dbus so it can
+be accessed like any other service.
+
+Connecting to another peer
+==========================
+
+TODO: Where do we set the intent to become the group owner?
+
+Connecting with another peer works through the Connect method of the 
net.connman.Service
+interface. When a connection should be established one of the client starts 
the group
+formation procedure through calling
+
+net.connman.Service.Connect()
+
+Internally the group formation procedure happens and authentication will done 
through
+WPS and the connman agent interface as described in doc/agent-api.txt (WPS is 
mandatory in
+this case). When the connection is established a group object (see 
doc/group-api.txt) will
+be created and exported through dbus. The group can now be maintained through 
accessing
+the several methods of the net.connman.Group interface.
+
+Inviting another peer to join a existing group
+==============================================
+
+When a group already exists it's possible to invite another avalible peer to 
join this
+group. A invitation procedure can be initiated through calling the Invite 
method of the
+net.connman.Group interface and supplying the dbus path to the service to 
invite.
+
+net.connman.Group.Invite("/service1")
+
+When the invitation process was successfully and the peer connected to the 
group the
+net.connman.Group.PeerAdded signal is send.
+
+Creating a autonoumus group
+===========================
+
+It's possible to create a group without having any peer connected. This is 
called a
+autonoumus group. Creating one is done through the net.connman.Manager 
interface:
+
+net.connman.Manager.CreateGroup()
+
+A group object is created and exported on dbus.
-- 
1.8.1.2

_______________________________________________
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman

Reply via email to