6
votes

In my environment I have an Android smartphone and some other devices. The other devices are running linux. All devices are connected to a local network via Wifi. Now I want the Smartphone to recognize and discover the other devices in the network, so I need to implement some kind of service discovery. There should be no user interaction necessary on the other devices. After that, two devices should be able to pair to each other.

I've read that Android has support for Network Service Discovery (NSD). This is a nice thing but this seems only to work across Android devices, right? In my case, the other devices are custom hardware running embedded linux. Also the progamming languages are not the same. The applicateion on the other decices are implemented using C++.

I've also read about the Simple Service Discovery Protocol (SSDP). I guess this should work in a platform independent manner, right? Can you provide a simple explanation how to realize this using SSDP?
Would you recommend SSDP to implement the Service Discovery? Are there any useful libraries for android and c++?

Or could you suggest other approaches to realize what I am trying to do?

regards

1

1 Answers

0
votes

We have done somethign similar between iOS and Mac devices using: http://www.multicastdns.org/

You could as well implement your own with broadcast UDP; but be aware that some network infrastructure may block these types of packets (corporate networks).