wifi direct - How to find Wifip2p groups in android -
i'm trying use wifi-direct connecting multiple devices on wifi in master-slave style (one many)- 1 client creates group using "creategroup" function, , other clients should connect group (manually). when client press on "discover peers" button, want give him list of master peers. , here problem- can't find way differentiate between slave peers , master peer (the 1 initiate creategroup request).
is there way filter out slave peers , keep master peers?
you should discovering services rather peers, though api work better if peer discovery, here's proposal logic: slave:
- start peerdiscovery
- when peers changed event, start service discovery (for service_type defined master)
- add discovered services selection list come (note come 1 one, , i've seen max 5 seconds between discovered services)
with master
- creategroup
- add local service advertise master
- start peer discovery, , make sure monitoring discovery state changes stays on (if goes off, service advertisement not seen slaves)
Comments
Post a Comment