esp32 mDNS

3dnour
Posts: 1
Joined: Sun Mar 24, 2019 10:48 am

esp32 mDNS

Postby 3dnour » Sun Mar 24, 2019 11:02 am

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
Attachments
local.jpg
local.jpg (113.98 KiB) Viewed 7250 times

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: esp32 mDNS

Postby WiFive » Mon Mar 25, 2019 2:06 am


ESP_Sprite
Posts: 9727
Joined: Thu Nov 26, 2015 4:08 am

Re: esp32 mDNS

Postby ESP_Sprite » Mon Mar 25, 2019 3:32 am

Moved to the Arduino subforum.

nealmartini
Posts: 1
Joined: Wed Mar 27, 2019 4:10 pm

Re: esp32 mDNS

Postby nealmartini » Wed Mar 27, 2019 4:24 pm

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"???

Who is online

Users browsing this forum: No registered users and 77 guests