Page 1 of 1

esp32 mDNS

Posted: Sun Mar 24, 2019 11:02 am
by 3dnour
hi
I can access the server through the IP
But I can not access through local
Is there a solution to this problem I'm using Windows 10
//////////////////////////////////////////////////

#include<WiFi.h>
#include<ESPmDNS.h>

char ssid[] = "xxxxxxxx";
char pass[] = "xxxxxxxx";
WiFiServer server(80);

void setup() {
Serial.begin(115200);
WiFi.disconnect();

Serial.println();
Serial.println();
Serial.println("Coneecting to: ");
Serial.println(ssid);

WiFi.begin(ssid,pass);

while (WiFi.status() !=WL_CONNECTED){
delay (500);
Serial.println(".");}

Serial.println("");
Serial.println("WiFi is connected");
Serial.println("IP address: ");
Serial.println(WiFi.localIP());

while(!MDNS.begin("esp32")){
Serial.println("Error setting up MDNS responder!");
delay (1);
}
Serial.println("mDNS started");

server.begin();
Serial.println("Web server started");

}

void loop() {
WiFiClient client = server.available();
if(!client){return;}
while(!client.available()){delay(1);}
Serial.println(client.readString());
client.stop();

}

/////////////////////////////////

Is there any error in the code

Re: esp32 mDNS

Posted: Mon Mar 25, 2019 2:06 am
by WiFive

Re: esp32 mDNS

Posted: Mon Mar 25, 2019 3:32 am
by ESP_Sprite
Moved to the Arduino subforum.

Re: esp32 mDNS

Posted: Wed Mar 27, 2019 4:24 pm
by nealmartini
I am having the same problem. esp32.local doesn't work, but using DHCP assigned IP does work. I am on windows 10 and I tried several browsers. Sorry, but I also don't know what it means when you state "transferred to Arduino suforum"???