Wifi Direct Group Owner Intention

2019-05-30 11:01发布

问题:

Can someone explain me how android performs Group Owner Negotiation? In particular how does android perform GO request/reply exchange? Thanks!

回答1:

You should set the Intention before connecting to the other WiFi p2p enabled devices. You do not need to do anything else regarding the GO negotiation. It means that you perform the discovery and then, you request to connect to one of the peers that is discovered. Then it would be the android API responsibility to perform the negotiation phase.



回答2:

You can decide who becomes group owner by this line of code :

config.groupOwnerIntent = x; 

Where x is from 0 to 15. 0 representing least intention to become owner while 15 represents the highest.

Reference