Skip to content

Commit

Permalink
remove DNS-configuration in static IP config
Browse files Browse the repository at this point in the history
  • Loading branch information
top-gun authored Jan 27, 2020
1 parent 340c101 commit 390a131
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions Wemos/Sensor04-Truebner-SMT50.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand Down

0 comments on commit 390a131

Please sign in to comment.