From 390a131102a42866527c86776712f022f268ccc7 Mon Sep 17 00:00:00 2001 From: top-gun Date: Mon, 27 Jan 2020 18:14:21 +0100 Subject: [PATCH] remove DNS-configuration in static IP config --- Wemos/Sensor04-Truebner-SMT50.ino | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Wemos/Sensor04-Truebner-SMT50.ino b/Wemos/Sensor04-Truebner-SMT50.ino index ef36bbb..b15b8c7 100644 --- a/Wemos/Sensor04-Truebner-SMT50.ino +++ b/Wemos/Sensor04-Truebner-SMT50.ino @@ -44,8 +44,14 @@ void setup_wifi() { IPAddress ip(192, 168, 178, 57); IPAddress gateway(192, 168, 178, 1); IPAddress subnet(255, 255, 255, 0); - IPAddress dns(192, 168, 178, 1); - WiFi.config(ip, dns, gateway, subnet); + //IPAddress dns(192, 168, 178, 1); + WiFi.config(ip, gateway, subnet); // we work locally and don't need DNS + //WiFi.config(ip, dns, gateway, subnet); // use this in case you use an external MQTT-service + +// Bring up the WiFi connection + WiFi.forceSleepWake(); + delay( 1 ); + WiFi.mode( WIFI_STA ); // Try to read WiFi settings from RTC memory bool rtcValid = false; @@ -57,12 +63,6 @@ void setup_wifi() { } } - -// Bring up the WiFi connection - WiFi.forceSleepWake(); - delay( 1 ); - WiFi.mode( WIFI_STA ); - // We start by connecting to a WiFi network Serial.print("Connecting to "); Serial.println(ssid);