Page 1 of 1

Add DNS entry for ESP32C5 when in AP mode

Posted: Tue Apr 21, 2026 5:05 pm
by kmiddlekauff
Using the ESP32C5 in AP mode (not STA) we need to have the device display HTTP web pages when accessing 'www.config.company.com'.

We have the device in AP mode using the following...

wifi_config_t wifi_config = {
.ap = {
.ssid = "configure",
.ssid_len = strlen(apSSID),
.channel = 1,
.password = "password",
.max_connection = 3,
.authmode = WIFI_AUTH_WPA2_PSK,
.gtk_rekey_interval = 0,
},
};

ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_AP));
ESP_ERROR_CHECK(esp_wifi_set_config(WIFI_IF_AP, &wifi_config));
ESP_ERROR_CHECK(esp_wifi_start());

How do we configure the device to responds to DNS requests to 'www.config.company.com'?

Re: Add DNS entry for ESP32C5 when in AP mode

Posted: Thu Apr 23, 2026 11:36 pm
by nopnop2002
AP mode cannot connect to the internet.

Re: Add DNS entry for ESP32C5 when in AP mode

Posted: Thu Apr 23, 2026 11:51 pm
by Sprite
You probably want to take a look at https://github.com/espressif/esp-idf/tr ... ive_portal