WiFi- Unable to setup MDNS on SoftAP for ESP32

Krishan T S
Posts: 1
Joined: Tue Jan 18, 2022 6:04 am

WiFi- Unable to setup MDNS on SoftAP for ESP32

Postby Krishan T S » Tue Jan 18, 2022 7:12 am

I am trying to setup DNS for ESP32 in Access point mode (Using SoftAP), It is not working. My code is

Code: Select all

const char* host = "example";
void setupWifi()
{
  WiFi.mode(WIFI_AP); 
  WiFi.softAP("SSID","Password");
  Serial.println(WiFi.softAPIP());
}
setupWifi();
MDNS.begin(host);
if (!MDNS.begin(host)) {
    Serial.println("Error startng mDNS responder");
  }
  else {
    Serial.println("mDNS server started");
  }
Any other approaches are there for setting up DNS in AP mode for ESP32 ?

esp1979
Posts: 21
Joined: Sun Dec 12, 2021 8:55 pm

Re: WiFi- Unable to setup MDNS on SoftAP for ESP32

Postby esp1979 » Sat Jan 22, 2022 8:44 pm

Hi,

I have the same question/problem.
mDNS in station mode works but in AP mode or in my case WIFI_AP_STA mode does not work ;-(

Really no one that can help?

Best wishes
Daniel

pataga
Posts: 73
Joined: Sat Aug 12, 2017 5:53 am

Re: WiFi- Unable to setup MDNS on SoftAP for ESP32

Postby pataga » Fri Jan 28, 2022 2:45 am

What OS are you using for access ?

As far as I know only MacOS has built in support for mDNS. For Windows you need to install Bonjour, for Ubuntu you need to install Avahi.

mkeveney
Posts: 9
Joined: Sun May 05, 2019 12:25 am

Re: WiFi- Unable to setup MDNS on SoftAP for ESP32

Postby mkeveney » Thu Feb 03, 2022 2:20 am

I know this is an old query, but I just ran into it.

Found an answer here: https://github.com/espressif/esp-idf/issues/4369

(...but still can't get my Android device to use mDNS unfortunately.)

Who is online

Users browsing this forum: No registered users and 111 guests