... | @@ -332,6 +332,24 @@ In short, Bluetooth Mesh doesn't appear to be usable for creating smartphone-bas |
... | @@ -332,6 +332,24 @@ In short, Bluetooth Mesh doesn't appear to be usable for creating smartphone-bas |
|
|
|
|
|
## Wi-Fi
|
|
## Wi-Fi
|
|
|
|
|
|
|
|
Devices that are connected to the same LAN may be able to discover each other using IP multicast and then connect to each other using TCP or UDP.
|
|
|
|
|
|
|
|
Discovery can be achieved using a variety of protocols, for example:
|
|
|
|
|
|
|
|
* [multicast DNS (mDNS)](http://www.multicastdns.org/) and [DNS service discovery (DNS-SD)](http://www.dns-sd.org/)
|
|
|
|
* [Universal Plug and Play (UPnP)](https://en.wikipedia.org/wiki/Universal_Plug_and_Play)
|
|
|
|
* [Local Service Discovery (LSD)](https://www.bittorrent.org/beps/bep_0014.html)
|
|
|
|
|
|
|
|
On Android, the Network Service Discovery (NSD) API provides service advertising and discovery on the local network via mDNS/DNS-SD and UPnP. The mDNS/DNS-SD API can interoperate with Apple's Bonjour API, which could be useful for cross-platform communication.
|
|
|
|
|
|
|
|
(Android's Wi-Fi Direct API also provides service discovery and advertising via mDNS/DNS-SD and UPnP. Wi-Fi Direct service discovery does not interoperate with NSD, but it may simplify the implementation of higher layers if the same service definitions can be used for LAN and Wi-Fi Direct transports.)
|
|
|
|
|
|
|
|
### Multicast Issues
|
|
|
|
|
|
|
|
Wi-Fi networks with a single access point typically support IP multicast and allow client devices to communicate with each other. However, some Wi-Fi networks, especially large networks with multiple access points, may not allow this. If an Android application fails to discover services on the local network, or discovers services but fails to connect to them, there is no wat for the application to tell whether this is because the network does not support multicast or connections between clients.
|
|
|
|
|
|
|
|
Some Android devices cannot receive multicast packets at all, or can only receive them while the device is awake. Some devices can receive multicast packets via the NSD API, but not directly via multicast sockets, making NSD more useful than other protocols such as LSD on those devices.
|
|
|
|
|
|
### Network Service Discovery (NSD)
|
|
### Network Service Discovery (NSD)
|
|
|
|
|
|
#### Peer Advertisement
|
|
#### Peer Advertisement
|
... | | ... | |