Chapter 2. API Reference
typedef enum esp_local_ctrl_proto_sec esp_local_ctrl_proto_sec_t
Security types for esp_local_control.
typedef struct esp_local_ctrl_proto_sec_cfg esp_local_ctrl_proto_sec_cfg_t
Protocom security configs
typedef struct esp_local_ctrl_config esp_local_ctrl_config_t
Configuration structure to pass to esp_local_ctrl_start()
Enumerations
enum esp_local_ctrl_proto_sec
Security types for esp_local_control.
Values:
PROTOCOM_SEC0 = 0
PROTOCOM_SEC1
PROTOCOM_SEC_CUSTOM
2.3.10 mDNS Service
Overview
mDNS is a multicast UDP service that is used to provide local network service and host discovery.
mDNS is installed by default on most operating systems or is available as separate package. On Mac OS it is installed
by default and is called Bonjour. Apple releases an installer for Windows that can be found on Apple’s support
page. On Linux, mDNS is provided by avahi and is usually installed by default.
mDNS Properties
• hostname: the hostname that the device will respond to. If not set, the hostname will be read from the
interface. Example: my-esp32s2 will resolve to my-esp32s2.local
• default_instance: friendly name for your device, like Jhon's ESP32-S2 Thing. If not set,
hostname will be used.
Example method to start mDNS for the STA interface and set hostname and default_instance:
void start_mdns_service()
{
//initialize mDNS service
esp_err_t err = mdns_init();
if (err) {
printf("MDNS Init failed: %d\n", err);
return;
}
//set hostname
mdns_hostname_set("my-esp32s2");
//set default instance
mdns_instance_name_set("Jhon's ESP32-S2 Thing");
}
mDNS Services mDNS can advertise information about network services that your device offers. Each service is
defined by a few properties.
• instance_name: friendly name for your service, like Jhon's EESP32-S2 Web Server. If not
defined, default_instance will be used.
Espressif Systems 608
Submit Document Feedback
Release v4.4