Reputation: 121
Upon requestPeers() or at the discoverPeers() I want to get the peer count of each device available, so that each device will have the peer counts of the devices, they can connect to.
Then I can call the createGroup() method in the device with highest peer count to make the WiFi-Direct group more efficient!
This is just an idea I came up with, is it possible to do?
if so how can I exchange the peer count among the device available?
Upvotes: 0
Views: 277
Reputation: 136
For the first quesiton, this is my experience.
I have two different devices A and B.
I have tried to set groupOwnerIntent on one of my devices, but it does not work as I thought.
No matter which one I set, A is always the GO.
The Wifi p2p spec said, Wifi Direct computes the GO intent and negotiates which device shall be the GO in the phase of peer discovery.
I think there shall be not only GO intent but also other attributes to determine the GO.
Maybe the GO intent works when the two devices are the same. I am not sure.
For the second question, I think you should connect them first to compute which device has the most number of available peer.
Upvotes: 1