Page 1 of 1

WiFi- Unable to setup MDNS on SoftAP for ESP32

Posted: Tue Jan 18, 2022 7:12 am
by Krishan T S
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 ?

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

Posted: Sat Jan 22, 2022 8:44 pm
by esp1979
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

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

Posted: Fri Jan 28, 2022 2:45 am
by pataga
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.

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

Posted: Thu Feb 03, 2022 2:20 am
by mkeveney
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.)