moving mDNS alsewhere because it blocks the starting operations
This commit is contained in:
parent
10204fb2c5
commit
87555a1bfc
@ -72,15 +72,6 @@ void setup() {
|
|||||||
hostname += String(ESP.getChipId(), HEX);
|
hostname += String(ESP.getChipId(), HEX);
|
||||||
WiFi.hostname(hostname);
|
WiFi.hostname(hostname);
|
||||||
|
|
||||||
if (!MDNS.begin("ESP8266")) {
|
|
||||||
DEBUG_PRINTLN("Error setting up MDNS responder!");
|
|
||||||
while(1) {
|
|
||||||
delay(1000);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
DEBUG_PRINTLN("mDNS responder started");
|
|
||||||
MDNS.addService("http", "tcp", 80);
|
|
||||||
|
|
||||||
#ifndef DEBUG_WifiM
|
#ifndef DEBUG_WifiM
|
||||||
wifiManager.setDebugOutput(false); // no debug
|
wifiManager.setDebugOutput(false); // no debug
|
||||||
#endif
|
#endif
|
||||||
@ -115,6 +106,16 @@ void setup() {
|
|||||||
DEBUG_PRINTLN(F(" displays configurated..."));
|
DEBUG_PRINTLN(F(" displays configurated..."));
|
||||||
|
|
||||||
server.on("/", GetMessage);
|
server.on("/", GetMessage);
|
||||||
|
if (!MDNS.begin("ESP8266")) {
|
||||||
|
DEBUG_PRINTLN("Error setting up MDNS responder!");
|
||||||
|
while(1) {
|
||||||
|
delay(1000);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
DEBUG_PRINTLN("mDNS responder started");
|
||||||
|
MDNS.addService("http", "tcp", 80);
|
||||||
|
|
||||||
|
|
||||||
display_message(WiFi.localIP().toString());
|
display_message(WiFi.localIP().toString());
|
||||||
message = "Bienvenue !";
|
message = "Bienvenue !";
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user