0

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!!!!!

1 Answers1

2

First, for those without IEEE Digital Library access, here is a link to the Arxiv PDF of this research: http://arxiv.org/pdf/1412.0880v1.pdf

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.

To implement this, you will need to do the following:

  1. Allow GOs to acquire their Wi-Fi Direct group passphrase/key.
  2. Distribute the passphrase securely to other GOs.
  3. Allow GOs to using a legacy Wi-Fi connection to connect to other GOs.

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.

First, from the documentation, we know that we can start a P2P Group that can accept legacy connections using the WifiP2pManager.createGroup (WifiP2pManager.Channel c, WifiP2pManager.ActionListener listener) method and its details can be fetched using WifiP2pManager.requestGroupInfo (WifiP2pManager.Channel c, WifiP2pManager.GroupInfoListener listener). The onGroupInfoAvailable(WifiP2pGroup group) method of GroupInfoListener allows us to access a WifiP2pGroup object that represents the group. WifiP2pGroup.getPassphrase() 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.

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() 
                }
            }
        });

Having distributed the passsphrase, a GO can connect to another GO programatically, as described in the answer to How to connect to a specific wifi network in Android programmatically?.

Community
  • 1
  • 1
Stephen Naicken
  • 366
  • 2
  • 7