Staging:CC3220 mDNS (Texas Instruments NDA restrictions applicable)

Overview
This application demonstrates mDNS advertisement, mDNS one-shot query, and mDNS continuous query.

Application Details
Domain Name System (DNS), specified by RFC1034, is a hierarchical distributed naming system for computers, services, or any resource connected to the network. In a unicast DNS system, all domain name information is stored in the DNS server. Clients get domain name of others by simply fetching such information from server.

multicast DNS (mDNS), specified by RFC6762, resolve host names to Internet Protocol (IP) addresses within small networks that do not include a local name server. It is a zero configuration service, using essentially the same programming interfaces, packet formats and operating semantics as the unicast DNS. While it is designed to be stand-alone capable, it can work in concert with unicast DNS servers. This protocol uses IP multicast User Datagram Protocol (UDP) packets instead of the Transmission Control Protocol (TCP) that unicast DNS uses.

mDNS together with DNS Service Discovery (DNS-SD), specified by RFC6763, forms the Apple’s implementation of zero-configuration network known as Bonjour. TI’s Simplelink WiFi currently supports such implementation in advertise mode. Query mode only supports PTR and the full Bonjour support will be implemented in the future.

In the Simplelink implementation, there's already a internal mDNS service broadcasting the HTTP service by default. This cannot be disabled by users.

In the user space application, users can define up to 5 mDNS services.

For protocols and other details, please refer to CC32xx Programmers Guide.

Prerequisite

 * 1x CC3220BOOST
 * 1x Micro-USB cable
 * 1x 2.4GHz AP

Optional:
 * 1x Smartphone with ZeroConf browser or Bonjour browser

Source Files Details

 * main.c - Application code. Initializes the device in default configuration and performs all application tasks.
 * pinmux.c - Pinmux configurations as required by the application.
 * cc_launchpad.c - Initializes peripherals.
 * timer_if.c - Functions to control timer.
 * uart_if.c - Functions to display information on UART.
 * startup_*.c - IDE specific startup functions (not required when working with TI-RTOS).

Key Simplink API used

 * sl_NetAppMDNSRegisterService - Register mDNS services
 * sl_NetAppMDNSUnRegisterService - Unregister mDNS services
 * sl_NetAppStart - Starts mDNS background service
 * sl_NetAppDnsGetHostByService - Query for other mDNS devices in the same local network. Only one service is returned from this function.
 * sl_NetAppSet - Sets the device to perform continuous mDNS query
 * sl_NetAppGetServiceList - Retrieve the full list of all discovered mDNS services from the continuous query

Defining your own mDNS service
At the top of the main.c file, you may change various mDNS advertisement and query settings.

Example use cases and outputs
Connect the boards, compile, and run the application. For instructions on how to compile a project and to bring up a terminal, please refer to Getting Started Guide and Terminal setup.

Depending on the number of devices in the same local network, you may see different result from the mDNS queries.



If you have a smart phone with the ZeroConf brower or Bonjour app installed, you can see the mDNS services being broadcasted by the Simplelink device. Notice that there are 2 services shown here: an internal HTTP Server service with the name "TOM" as defined in macro section, and a user-defined "_SIMPLELINK" service.



Limitations/Known Issues
None