arduinoesp8266nodemcumdnsdns-sd

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.


Solution

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

    Solved the problem . mdns is my MDNSResponder object instance .