How to use Network Service Discovery (zeroconf / bonjour) in React Native without detaching from Expo?

Hi,

Short summary: I would like to use a solution like npm package “react-native-zeroconf”, but without detaching from Expo. Does Expo have a pure JavaScript implementation of Network Service Discovery for Android devices?

Long version:

We are building an app for an IoT device, based on Raspberry Pi. The app has to detect the device in the local network. It is done easily with React-Native for iOS because both iOS and Raspberry Pi use Bonjour / Zeroconf protocol for auto-detection of devices on the network.

For Android one should use “Network Service Discovery” to discover Zeroconf devices on local network. There is already a library in react native that configures this service: https://www.npmjs.com/package/react-native-zeroconf. Unfortunately it requires “react-native link”. Does Expo have a solution to do Zeroconf with only JavaScript?

Thank you.

Hi! We don’t currently have this, but in the meantime I’d recommend two things: take a look at the docs for ExpoKit, and open a feature request for this on Canny.

same issue here, have you found a way to find your Zeroconf device?
would it be possible to use a pure Java Script library such as: multicast-dns - npm ?

If anyone else needs this feature please vote for it here:zeroconf feature request, for now it seems like the only way to implement this is to detach.

Hi… I would figure you could do this by port filtering each IP address to check whether 22 is open? Which would be the SSH server - yet this would be reliant on the Linux distro being run on the specific Pi. Sufficiently simple in the event that you realize they will consistently have Raspbian for example?
You could most likely do that with the netcat order.