<p>First, for those without IEEE Digital Library access, here is a link to the Arxiv PDF of this research: <a href="http://arxiv.org/pdf/1412.0880v1.pdf" rel="nofollow noreferrer">http://arxiv.org/pdf/1412.0880v1.pdf</a></p>

<p>The Wi-Fi Direct specification allows for a legacy device (i.e. a device without Wi-Fi Direct) to connect to a Wi-Fi Direct GO using its Wi-Fi interface. The authors of this research have used this to allow a GO to be a client in another group.  So the GO has clients on the P2P interface and also connects to another GO using its legacy Wi-Fi interface.</p>

<p>To implement this, you will need to do the following:</p>

<ol>
<li>Allow GOs to acquire their Wi-Fi Direct group passphrase/key.</li>
<li>Distribute the passphrase securely to other GOs.</li>
<li>Allow GOs to using a legacy Wi-Fi connection to connect to other GOs.</li>
</ol>

<p>As the paper describes, there will be IP address conflicts, so messaging between all pairs of devices will not be possible at the IP layer, e.g. the client of one GO will not be able to communicate with the client of another.  To overcome this, you will need to implement a messaging layer at the application layer.</p>

<p>First, from the documentation, we know that we can start a P2P Group that can accept legacy connections using the <code>WifiP2pManager.createGroup (WifiP2pManager.Channel c, WifiP2pManager.ActionListener listener)</code> method and its details can be fetched using <code>WifiP2pManager.requestGroupInfo (WifiP2pManager.Channel c, WifiP2pManager.GroupInfoListener listener)</code>.  The <code>onGroupInfoAvailable(WifiP2pGroup group)</code> method of <code>GroupInfoListener</code> allows us to access a <code>WifiP2pGroup</code> object that represents the group.  <code>WifiP2pGroup.getPassphrase()</code> will retrieve the group's passphrase.  Now that we have the passphrase, we can distribute this to other GOs that wish to connect to this group's GO by Wi-Fi.</p>

<pre><code>wifiP2pManager.requestGroupInfo(channel,
            new WifiP2pManager.GroupInfoListener() {
            @Override
            public void onGroupInfoAvailable(WifiP2pGroup group) {
                if(group != null){
                    // clients require these
                    String ssid = group.getNetworkName(),
                    String passphrase = group.getPassphrase() 
                }
            }
        });
</code></pre>

<p>Having distributed the passsphrase, a GO can connect to another GO programatically, as described in the answer to <a href="https://stackoverflow.com/questions/8818290/how-to-connect-to-a-specific-wifi-network-in-android-programmatically">How to connect to a specific wifi network in Android programmatically?</a>.</p>
How to implement the inter-group communication in wifi direct network?
<p>I have read an article named "Content-centric Routing in wifi direct multi-group networks",in this article,it told us the method to implement inter-group communication ,but I couldn't implement it with program in android device ,if some one who has interest in this problem ,please contact me!!!!!</p>