From 87555a1bfcb848aa2ab07f2061e2584f38485504 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien?= Date: Tue, 26 Dec 2017 13:49:33 +0100 Subject: [PATCH] moving mDNS alsewhere because it blocks the starting operations --- LibreMetric.ino | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/LibreMetric.ino b/LibreMetric.ino index 3154f4a..cba4953 100644 --- a/LibreMetric.ino +++ b/LibreMetric.ino @@ -72,15 +72,6 @@ void setup() { hostname += String(ESP.getChipId(), HEX); 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 wifiManager.setDebugOutput(false); // no debug #endif @@ -115,6 +106,16 @@ void setup() { DEBUG_PRINTLN(F(" displays configurated...")); 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()); message = "Bienvenue !";