Introduction
167
SWRU455A – February 2017 – Revised March 2017
Copyright © 2017, Texas Instruments Incorporated
mDNS
10.1 Introduction
The mDNS/DNS-SD protocol enables the automatic discovery of computers, devices, and services by
resolving IP addresses and ports on the local IP network. mDNS is based on the DNS protocol. In contrast
to DNS, which uses a DNS server, mDNS protocol is distributed, where each device can advertise and
discover services. Each mDNS device on the local IP network can join an mDNS IP multicast group, and
advertises its services. mDNS protocol supports IPv4 and IPv6 local networks. IPv4 multicast address
224.0.0.251, IPv6 multicast address FF02::FB, and UDP port 5353 are all reserved to mDNS messages.
The SimpleLink host application can register up to five services. The services can be advertised and
discovered on IPv4 network, IPv6 network, or both networks, depending on service interface registration
and interface status.
The mDNS service must be enabled to allow query and advertisement operations. By default, the mDNS
service is enabled and the internal HTTP server and host name are advertised on the enabled interfaces,
IPv4, IPv6, or both. The mDNS service can be disabled.
The host application can trigger one-shot or continuous discovery. The results are cached by the
SimpleLink Wi-Fi device, and the application can retrieve the list of discovered devices and services.
The mDNS service is not power-wise-optimized; therefore, TI recommends turning this service off in
power-constrained systems. This service is turned off automatically if the configured power mode is LSI
with a sleep time greater than 2000 ms.
10.2 Key Features
lists the key features of the mDNS.
Table 10-1. Key Features
Key Features
Description
Advertise IPv4/IPv6 services
Advertise up to five registered services IPv4, IPv6, or both. If internal HTTP
server is disabled, six services can be registered.
Discover IPv4/IPv6 services
Discover services IPv4, IPv6, or both
One-shot discovery
Support IPv4\IPv6 single query
Continuous discovery
Support IPv4\IPv6 continuous query
Mask services
Support masking specific services types in the discovery process
Set advertisement timing
Set advertisement timing parameters
Update Service text
Update existing services text field
10.3 Configurations and Settings
Starting or stopping mDNS service: mDNS service is enabled by default. mDNS can be stopped and
started by the host application by using the host APIs sl_NetAppStart and sl_NetAppStop. This action
takes effect immediately and reset is not required. This configuration is persistent according to system-
persistent configuration.
Example:
_i16 Status;
/* Start mDNS */
Status = sl_NetAppStart(SL_NET_APP_MDNS_ID);
if
( Status )
{
/* Error */
}