-->
Page 3 of 3

Re: get IP addresses of all MQTT servers on network with mDN

PostPosted: Sat Jan 28, 2017 4:04 pm
by Nithin Thomas
dunk wrote:while searching for the solution i found examples that allow the ESP8266 to become an mDNS Responder eg: https://github.com/esp8266/Arduino/blob/esp8266/hardware/esp8266com/esp8266/libraries/ESP8266mDNS/examples/mDNS_Web_Server/mDNS_Web_Server.ino
but nowhere could i find code that allowed me to Discover mDNS Services on the network.

so i wrote this little library over the last week or two:
https://github.com/mrdunk/esp8266_mdns
it's my first time playing with the Arduino environment so please forgive any deviations from accepted Arduino coding style.

there are examples for the following included:
1. https://github.com/mrdunk/esp8266_mdns/ ... simple.ino displays *all* mDNS data received by the ESP8266.
2. https://github.com/mrdunk/esp8266_mdns/ ... s_test.ino sends an mDNS Question requesting the _mqtt._tcp.local service and returns the ipv4 network address of all hosts providing this service.

the library could be used as the starting point for any project that needs access to raw mDNS data.



Hello,

I am very new to esp8266. I would like to run this code in my nodeMCU device to discover all mDNS packets. How can I load this files to nodeMCU?

-Nithin

Re: get IP addresses of all MQTT servers on network with mDN

PostPosted: Wed Feb 08, 2017 4:22 am
by Nithin Thomas
Sorry for that naive question. I got the answer :roll:

Re: get IP addresses of all MQTT servers on network with mDN

PostPosted: Sun Jul 29, 2018 6:14 am
by Luiz Almeida
dunk wrote:you need to configure mDNS on "MQTT server"...
you can see my mDNS configuration file here:
https://github.com/mrdunk/home_automati ... to.service

Hi Dunk...you deserve a medal.
You saved my day. I just did what you wrote and voalá :)
Thank you.