

And this is where react-native-lanscan comes in handy. But there are switches and routers that tend to block mDNS Registry and Discovery. Take a look at the awesome react-native-zeroconf package by Balthazar Gronon. There are more suitable ways of finding services on the local network like mDNS of the Zero-configuration standard (implementations like Avahi, Bonjour or NSD). Please keep in mind that this is a fallback method.

Use the React Native official NetInfo API. Please take your precautions and check if the device is connected to the network with Wi-Fi first as this package doesn't do that for you.

This package scans the LAN network of the device via Wi-Fi and searches for hosts with services on a port range of your choosing. So no need to add the permission to your app module AndroidManifest. On android, this package adds another request for the _WIFI_STATE permission for your app in the package manifest. Feel free to submit a PR of an iOS port I'll be happy to merge ! 😃 Permissions
GITHUB PYTHON LANSCAN ANDROID
This package is only supported on android devices, since I'm not much of an iOS Developer. A React Native library for scanning LAN IPs and ports to find services via device Wi-Fi Support
