arezkibe
arezkibe

Reputation: 13

WiFi Direct (Android 4.0) with multiple (3+) devices Bidirectional

I want to do the same thing as this post : WiFi Direct (Android 4.0) with multiple (3+) devices

but with bidirectionnal messages.

A -> B and B -> A

B -> C and C -> B

Is there a way to do that?

Upvotes: 0

Views: 854

Answers (1)

Yes. You have to create a wifi direct group, and all of your devices have to connect to the group owner device. After this, all devices in this group knows the group owner IP address. Now you have to do these steps:

  • All device (except the group owner) have to send a message (the content of the message is unrelevant) to the group owner. You can do this with the group owner address.

  • Now the group owner receive the message. This is not important, but the socket is! You can get the clients IP address from the socket! Now store that IP adddresses.

  • Now the group owner knows all IP address. So you can send messages to any device, just make a good routing

Upvotes: 1

Related Questions