MDNS and DNS Service Discovery library

Hi mtnbrit,

I’m afraid MDNS won’t make the name show up on your DHCP server - it is a means for hosts to identify each other via multicast (i.e. in the absence of any DNS server if necessary) - registering a name via DHCP is slightly different - in this case your router (assuming that is the DHCP server) is responsible for telling other hosts about your core - with my library the core can tell other hosts directly what it’s hostname is.

The below is all that is required to register your host name. You should then be able to resolve “core-1.local” to your cores IP address.

// This #include statement was automatically added by the Spark IDE.
#include "MDNS.h"

MDNS mdns;

void setup() {
    bool success = mdns.setHostname("core-1");

    if (success) {
        success = mdns.begin();
    }
}

void loop() {
    mdns.processQueries();
}