DS_CAP_MDNS - denis-stepanov/esp-ds-system GitHub Wiki

DS_CAP_MDNS — Multicast DNS

Description

This capability adds support for multicast DNS, i.e., possibility to contact controller via its hostname, without relying on intermediate DNS server.

This capability has no user interface; you just need to enable it in MySystem.h and make sure that your controller connects to network by some means (see network).

Requires

Cooperates With

  • DS_CAP_WEBSERVER — if web server is enabled, its "System Information" page will include "mDNS Hostname" line with hostname information.

Conflicts With

None.

Usage

MySystem.h:

#define DS_CAP_SYS_NETWORK  // Enable network
#define DS_CAP_MDNS         // Enable mDNS

#include "System.h"         // System global definitions

sketch.ino:

#include "MySystem.h"

using namespace ds;

void setup() {
    System::begin();
}

void loop() {
    System::update();
}

(empty sketch, because the functionality is fully covered by System::begin() and System::update() functions)

Mandatory Calls

System::begin() Required
System::update() Required

Examples

Bugs

None.

Availability

Version 1.0 or later.

See Also

None.

⚠️ **GitHub.com Fallback** ⚠️