  Wi-Fi Direct is a promising technology for the support of device-to-device
communications (D2D) on commercial mobile devices. However, the standard
as-it-is is not sufficient to support the real deployment of networking
solutions entirely based on D2D such as opportunistic networks. In fact, WiFi
Direct presents some characteristics that could limit the autonomous creation
of D2D connections among users' personal devices. Specifically, the standard
explicitly requires the user's authorization to establish a connection between
two or more devices, and it provides a limited support for inter-group
communication. In some cases, this might lead to the creation of isolated
groups of nodes which cannot communicate among each other. In this paper, we
propose a novel middleware-layer protocol for the efficient configuration and
management of WiFi Direct groups (WiFi Direct Group Manager, WFD-GM) to enable
autonomous connections and inter-group communication. This enables
opportunistic networks in real conditions (e.g., variable mobility and network
size). WFD-GM defines a context function that takes into account heterogeneous
parameters for the creation of the best group configuration in a specific time
window, including an index of nodes' stability and power levels. We evaluate
the protocol performances by simulating three reference scenarios including
different mobility models, geographical areas and number of nodes. Simulations
are also supported by experimental results related to the evaluation in a real
testbed of the involved context parameters. We compare WFD-GM with the
state-of-the-art solutions and we show that it performs significantly better
than a Baseline approach in scenarios with medium/low mobility, and it is
comparable with it in case of high mobility, without introducing additional
overhead.
