UDP Server mDNS
The multicast Domain Name System (mDNS) resolves host names to IP addresses within small networks that do not include a local name server.
More info on mDNS can be found at https://en.wikipedia.org/wiki/Multicast_DNS
mDNS has two parts:
This example just does Advertise. See Basic MDNS for discovery example.
In short this code will advertise other machines about its ipaddress.
How to use mDNS:
ADD your WIFI_SSID / WIFI_PWD
Flash the Complied code to your ESP8266/ESP32 device
Open a web browser and go to “http://sming.local/” to open a sample webpage.
You should also be able to ping using the advertised name:
You need to install Avahi mDNS/DNS-SD daemon.
In your browser type “http://sming.local/” to open a sample webpage.
You need to install ZeroConf Browser or Bonjour Browser.
In those app you would be able to see IP address of your ESP module.
In android Chrome “http://sming.local/” does not translate to IP address, so android Chrome is not supporting mDNS.
But you can make your own app using Network Service Discovery. See http://developer.android.com/training/connect-devices-wirelessly/nsd.html for details.