diff options
| author | Reiner Herrmann <reiner@reiner-h.de> | 2021-04-18 19:06:02 +0200 |
|---|---|---|
| committer | Reiner Herrmann <reiner@reiner-h.de> | 2021-04-18 19:06:02 +0200 |
| commit | da34823f94f84e2e5c5181701e6604bec20aa04a (patch) | |
| tree | 14c04a54ea06ccb3f274ae1ed8400d1359d1f517 /src | |
| parent | c297f65f1d95f80df597d0cea49cc92dfdcae0a3 (diff) | |
use static ip configuration
Diffstat (limited to 'src')
| -rw-r--r-- | src/main.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp index c987f92..2ebf777 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -7,6 +7,8 @@ #include "weather.h" #include "secrets.h" +#define USE_DHCP 0 + /* see GxEPD2_WS_ESP32_Driver.ino and esp32-waveshare-epd/src/DEV_Config.h @@ -56,6 +58,13 @@ void draw() { } void wifi_connect() { +#if !USE_DHCP + IPAddress ip{10, 0, 0, 8}; + //IPAddress dns{8, 8, 8, 8}; + IPAddress gateway{10, 0, 0, 1}; + IPAddress subnet{255, 255, 255, 0}; + WiFi.config(ip, gateway, subnet, gateway); +#endif WiFi.begin(wifi_ssid, wifi_psk); while (WiFi.status() != WL_CONNECTED) { delay(500); |
