How to find all the esp8266 connected to a router
<p>Hi all I want to connect multiple esp8266 devices to my router and create a mobile app that can find those devices and send messages to them using udp.
Currently my plan is to let esp devices listen to a port and then my app would send a message on that port, esp would respond and the app will store the IP.</p>

<p>Is there any better way to do that?
A friend of mine told me that this approach will fail if routers's gateway is changed. Is it true?</p>

<p>I am just calling  WiFi.begin(Ssid, Password); to connect to wifi without doing any changes with wifi.conf().</p>

<p>I am using arduino SDK.</p>