Opening a service using an android smartphone and other devices

In my environment, I have an Android smartphone and some other devices. Other devices run linux. All devices are connected to the local network via Wi-Fi. Now I want the smartphone to recognize and detect other devices on the network, so I need to implement some kind of service discovery. Other devices should not have any user interaction. After that, the two devices should be able to pair with each other.

I read that Android supports Network Services Discovery (NSD) . This is a good thing, but it only seems to work on Android devices, right? In my case, the other devices are custom hardware using embedded linux. Also, programming languages ​​do not match. The application of other solutions is carried out using C ++.

I also read about Simple Service Discovery Protocol (SSDP) . I think it should work on the platform independently, right? Can you give a simple explanation of how to implement this using SSDP?
Would you recommend SSDP to implement Service Discovery? Are there any useful libraries for android and C ++?

Or could you suggest other approaches to understanding what I'm trying to do?

considers

+6
source share
1 answer

We did something similar between iOS and Mac devices using: http://www.multicastdns.org/

You could also implement your own with broadcast UDP; but keep in mind that some network infrastructures may block these types of packets (corporate networks).

0
source

Source: https://habr.com/ru/post/950246/


All Articles