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:

  1. Advertise

  2. Discover

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:


  2. Flash the Complied code to your ESP8266/ESP32 device

  3. 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:

ping UDP_Server.local


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.


SoC support

  • esp32

  • esp32c2

  • esp32c3

  • esp32s2

  • esp32s3

  • esp8266

  • host

  • rp2040