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 nameesp.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.
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.
mDNS is a multicast UDP service that is used to provide local network service and host discovery.
for me, need to call MDNS.update()
inside loop function to make it work.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With