Question

Is it possible ?

Peer-To-Peer connection via WiFi (same Access Point) , how would multiple devices talk on this layer.

Any API available or sources that can be looked into ?

Thanks Yogurt

Was it helpful?

Solution

Try researching the state of Bonjour / Avahi / Zeroconf on android. I'm seeing some pages that indicate people have made some progress for certain purposes but nothing like a generic howto or ready to use library.

OTHER TIPS

The Wi-Fi Alliance on Monday announced that its direct peer-to-peer networking version of WiFi, called WiFi Direct, is now available on several new WiFi devices. The Alliance is also announcing that it has begun the process of certifying devices for WiFi Direct compatibility.

Unless you know the IP address assigned to the other peer already, you'd have to somehow have devices inform other devices that they exist.

Are these devices definitely going to be on the same subnet? If so you can try messing around with having the devices send out 'broadcast' packets. I have no idea if the Android API lets actual applications receive these though.

The more reliable approach would probably be to run some centralised server somewhere that devices register with when they go online, and give their IP address when they register. Then they can query that server for which other devices are nearby and what their IP addresses are. If this is to be a central server out on the wider internet, then it means that unfortunately that the device discovery part isn't peer to peer - there is some privacy implication. Another thing if this is a central server is that you'll have to design the querying process to cope with NAT so that querying for other devices on your local network is restricted to the right network, but that you also get their IP address.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top