NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.
CC3100 mDNS
Contents
Overview[edit]
This sample application demonstrates how to register mDNS services, multicast them on mDNS port and try to get the IP, port and text of another service.
Note: This wiki page is only applicable for CC3100-SDK v1.0.0 and upward releases. For documentation on older SDKs' examples, refer corresponding file in <cc3100-sdk-installation-location>\cc3100-sdk\docs\examples\
Application details and Usage[edit]
This application registers and multicast three services at mDNS port. It also tries to get the IP, port and text of a service multicast-ed by another device
- Connect the board to a Windows-PC and configure the terminal-program for seeing the logs - CC3100 & CC3200 Terminal Setting has detailed instructions for configuring the terminal-program
- Multicast service parameters can be changed by changing below macros in main.c:
#define MDNS_SERVICE_1 "cc3100-service-1._ipp._tcp.local" #define MDNS_SERVICE_2 "cc3100-service-2._ftp._tcp.local" #define MDNS_SERVICE_3 "cc3100-service-3._ipp._udp.local"
#define MDNS_TEXT_1 "dev=CC3100" #define MDNS_TEXT_2 "dev=CC31xx" #define MDNS_TEXT_3 "vendor=texas instruments"
- Service to be 'listened-for' can be changed by modifying below macro in main.c:
#define DNS_SD_SERVICE "service-4._ipp._tcp.local"
- Edit following parameters in sl_common.h to establish connection w/ an AP:
#define SSID_NAME "<ap_name>" #define SEC_TYPE SL_SEC_TYPE_OPEN #define PASSKEY ""
- Build and run the application
- See the self explanatory logs on the terminal-program's console. On success, below message will be displayed on the terminal
- These services can be discovered w/ any service-discovery application:
Note: : This mDNS sample application registers services as 'unique services'. .i.e. if a service w/ the same name is already registered in the n/w, the new service registration will fail.
Source Files briefly explained[edit]
i. main - Initializes the device, connects to an AP, registers three services for multicast and tries to get IP, port and text of the service by name.
Limitations/Known Issues[edit]
- Trying to get a service multicast by the same board is not a valid use-case and is not supported
Links[edit]
{{#invoke: Navbox | navbox }} {{#invoke: Navbox | navbox }}