Not able to browse the mdns service created in esp8266

What I done till now is

I created mdns service in my nodemcu

 ... // code used to create the mdns service if (mdns.begin("esp", WiFi.localIP())) Serial.println("MDNS responder started"); server.begin(); Serial.println("HTTP REST Server Started"); MDNS.addService("http", "tcp", 80); ... 

Then I installed Bonjour in my windows . After that I am able to ping esp.local from my windows power shell and also I could communicate with the iot device from browser using the mdns name esp.local .

The Issue Iam struggling with right now .

Iam not able discover this device while searching for mdns services . I used dns-sd in windows powershell to browse my service , but its not discovering this device .

the command is dns-sd.exe -B <Type> <Domain> (Browse for services instances) So I tried with

dns-sd -B _http._tcp local. //have doubt about this one .

and its just showing

Browsing for _http._tcp.local.

It would be great if any one could help me with this. Thanks.

4 Answers

for me, need to call MDNS.update() inside loop function to make it work.

1

abhayastudios asked me to help you out.

Did you include ESP8266mDNS.h in your code?

You could always try to discover all your mdns devices using the android app called fing. Did you check the windows services to see if bonjour printing service is running (or installed)? Sometimes windows stops this service.

Let me know if this helped.

1

These are the commands I use on MacOS which work for my friend's ESP8266 based device:

Browse HTTP Bonjour service instances:

$ dns-sd -B _http._tcp . 

Resolve Bonjour service instance:

$ dns-sd -L <device name> _http._tcp . 
1

Replacing MDNS.addService("http", "tcp", 80); to mdns.addService("http", "tcp", 80);

Solved the problem . mdns is my MDNSResponder object instance .

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

You Might Also Like