Example sketches for the new Arduino IDE for ESP8266

Moderator: igrr

User avatar
By Nithin Thomas
#61668
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
User avatar
By Luiz Almeida
#77468
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.