WiFi- Unable to setup MDNS on SoftAP for ESP32
Posted: 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
Any other approaches are there for setting up DNS in AP mode for ESP32 ?
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");
}