MDNS ESP8266 URL not accessible

Hi,

I tried to create a MDNS in my ESP8266 by following this link:
https://tttapa.github.io/ESP8266/Chap08%20-%20mDNS.html

but when i upload the code and try to ping the URL i get this error:

ping esp8266.local
Ping request could not find host esp8266.local. Please check the name and try again.

on the other hand if i ping using Wifi.localIP() it works fine. Pls comment on your feedback.

Your topic has been moved to a more suitable location on the forum. Installation and Troubleshooting is not for problems with (nor for advice on) your project :wink: See About the Installation & Troubleshooting category.

1 Like

Is mDNS support enabled on your PC? Is your PC in the same broadcast network as the ESP? Is device isolation disabled on the WiFi access point (router)?

My PC is in the same network as ESP. As mentioned on the post - I am able to ping the device from IP but not able to do the same from mdns.

Regds
Rahul

so how are you pinging ? anyway i always have a webserver set up rather than just 'pinging' and then in my browser i type

http://esp8266.local/

and particularly that forward slash at the end seems to be relevant.
mDNS can be a bit funky on routers though, and at times it loses the relevant information and needs a reset of some kind (usually i lose file sharing between devices at the same time)

What OS does you PC run? As far as I know Windows doesn't support mDNS on the command line (only in the browser) but I don't have that OS to check. If you run Linux ensure the avahi daemon is running, then mDNS should be supported.

I did try all possible combination - but it does not seem to work.

There is a known bug in the example code you are using. The author has been notified on github but has apparently chosen to not update their published code.

You need to add the following line to the loop() { } ; section of the code : MDNS.update();

 void loop() {
    MDNS.update();
 }

Once you do that. it should start working. And without that there is not way to get it working.

Adding this comment for anyone following and searching for a solution to this same problem.

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.