get IP addresses of all MQTT servers on network with mDNS.
Posted: Sun Aug 02, 2015 7:27 am
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.
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.