Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 564
Sachin Avatar asked Jul 03 '18 11:07

Sachin


People also ask

What is mDNS esp8266?

mDNS uses domain names with the . local suffix, for example http://esp8266.local. If your computer needs to send a request to a domain name that ends in . local, it will send a multicast query to all other devices on the LAN that support mDNS, asking the device with that specific domain name to identify itself.

What is mDNS esp32?

mDNS is a multicast UDP service that is used to provide local network service and host discovery.


2 Answers

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

like image 165
secmask Avatar answered Sep 28 '22 08:09

secmask


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.

like image 22
Ejal Avatar answered Sep 28 '22 06:09

Ejal