Abhijith V R
Abhijith V R

Reputation: 81

sending messages between clients in Android p2p wifi-direct

If there are three devices A,B and C are connected using Wifi-direct , assuming B is Group Owner.

How can A sends messages to C?On running the Android wifi direct demo ,I noticed that A and C knows about B's IP address.

There is no method avialable to get the IP address of A and C.

To create a small chat application Do I need to create a server at B(Group Owner) ?

Upvotes: 2

Views: 2419

Answers (1)

optimality
optimality

Reputation: 76

Yes, you'll need to create a server at B.

When you create a group, the only IP address anybody knows is the group owner. If you want A and C to communicate, you'll need to have them send their IP addresses to B, then B can send C's address to A and vice-versa.

It's kinda gross. I'm trying to solve this problem too.

I'm thinking that the regular NSD protocol might be promising, but I'm not sure if it will work over wifi direct.

Upvotes: 0

Related Questions