18/06/2014

Wi-Fi Direct Protocol

Setup of a Wi-Fi Direct connection
As Wi-Fi Direct protocol is based on IEEE 802.11 infrastructure mode it inherits its features like quality-of-service and WPA2 security. The big difference is the ability to dynamically decide the role which the device takes on oneself. After detection of other devices and the need to setup a connection, one device is designated as Group Owner (GO). Every other device in the group to be established is a peer-to-peer (P2P) client. A device can connect to multiple groups by using different frequencies or time-sharing the channel. In this case, it is very well possible to take on a dual role within multiple groups but the Wi-Fi Direct protocol does not allow the role of GO to be transferred within the group. When the GO leaves its group, it has to be torn down to establish a new one.
Initialization of Wi-Fi Direct connection
To establish a standard group formation, to protocol is defined in several phases (see Figure). First of all the discovery phase is initiated which itself consist of three stages. When a device is turn on it scans through all available channels in the current frequency to see if there is already an existing group. When this is not the case it continues and will alternate between search and listen stages. In the search stage the device will send probe request in the three 'Social channels' of the 2.4GHz band while in the listen stage it is able to accept incoming probe request from other sources in one of its predefined channels. The time a device spent in either phase is typically random distributed between 100ms and 300ms but can be set to any value which is a trade-off between energy consumption and discovery time.
When two devices detected each other it is time to establish the GO of the group. This is simply done by comparing their GO intention value. As a GO it is his task to support power saving services, run a Dynamic Host Configuration Protocol (DHCP) to provide clients with IP addresses and have the ability to connect to a external network. It sends out periodic beacon messaged to maintain the group connection with its clients. These tasks are done in the Wi-Fi Protected Setup (WPS provisioning) and the Address configuration phases. Alternatively there are two other, more simple, ways to setup a group formation. This could be an autonomous connection where a device immediately becomes the group GO and starts to beacon messages. The other possibility is a persistent connection in which the groups devices store their network credentials so they could quickly form their old group connection again.
Power consumption or energy management becomes of major importance in devices who depend on batteries. The Wi-Fi protocol already supported energy saving modes for P2P clients which is also implemented here. Wi-Fi Direct has two new power saving modes which the P2P GO controls. In the Opportunistic Power Save mode it is the P2P GO which beacons a minimum time frame in which it will stay awake and so can receive data. Only if all the clients finished their uploads the GO can also go to sleep mode. On the other hand, the Notice of Absence power saving mode allows the GO to preserve more energy but the clients are only able to send information in a certain period of time. The GO defines a schedule for its client including the information of the duration of its sleep mode, the time interval between them, when sleep mode will start and how many times this will be.
This schedule and the time frame in which the client can send information are not defined by the Wi-Fi Alliance specifications. It is left to the different companies who utilize Wi-Fi Direct in their products to differentiate from each other in respect to power savings, features and product quality.