Open Abhesheksh opened 2 years ago
https://github.com/tzapu/WiFiManager/issues/1097
Same issue but he solved it by removing static IP. Is there anyway I can keep the static IP?
Not sure why this would make a difference, it should still work
Just leave wifiManager.setSTAStaticIPConfig
and use this after wifiManager.autoConnect
WiFi.begin();
WiFi.config(IPAddress(192, 168, 1, 148), IPAddress(192, 168, 1, 1), IPAddress(192, 168, 1, 1), IPAddress(255, 255, 255, 0));
It working for me on ESP8266.
This is my method,it works:
//wm.setSTAStaticIPConfig(IPAddress(192,168,2,123), IPAddress(192,168,2,1), IPAddress(255,255,255,0) ); // set static ip,gw,sn
wm.setShowStaticFields(true);
wm.setShowDnsFields(true);
or
wm.setSTAStaticIPConfig(IPAddress(192,168,2,123), IPAddress(192,168,2,1), IPAddress(255,255,255,0), IPAddress(192,168,2,1) ); // set static ip,gw,sn
wm.setShowStaticFields(true);
wm.setShowDnsFields(true);
Basic Infos
Hardware
WiFimanager Branch/Release: Master
Esp8266/Esp32: ESP8266 / NodeMCU
Hardware: ESP-12E
Core Version: 2.4.0, staging
Description
Using NTPClient to get RTC doesnt work with wifimanager. Same code works when connecting with ssid and password after removing WM.
Problem description
When using NTPClient with WM, time starts from 0:0 and then refreshes but doesn't show actual time.
Settings in IDE
Module: NodeMcu
Additional libraries:
Sketch
Debug Messages
⸮⸮⸮bp⸮⸮c$
r$p⸮n⸮⸮l⸮⸮"n⸮|⸮$⸮⸮⸮c⸮|~⸮N⸮l⸮⸮l ⸮ond
nr⸮⸮⸮obl s⸮⸮Nbl ⸮#⸮⸮$⸮⸮r⸮`⸮⸮o⸮WM: [1] AutoConnect WM: [2] Connecting as wifi client... WM: [3] STA static IP: 192.168.1.99 WM: [2] Custom static IP/GW/Subnet/DNS WM: [2] Custom STA IP/GW/Subnet WM: [1] STA IP set: 192.168.1.99 WM: [1] Connecting to SAVED AP: JHKAHKJAH WM: [3] Using Password: JAKHAKAH WM: [3] WiFi station enable WM: [3] enableSTA PERSISTENT ON WM: [2] 90000000 ms connectTimeout set WM: [2] 19072 ms timeout, waiting for connect... WM: [2] . WM: [2] . WM: [2] . WM: [2] Connection result: WL_CONNECTED WM: [3] lastconxresult: WL_CONNECTED WM: [1] AutoConnect: SUCCESS WM: [1] STA IP Address: 192.168.1.99 WM: [1] AutoConnect WM: [1] AutoConnect: ESP Already Connected WM: [3] STA static IP: 192.168.1.99 WM: [2] Custom static IP/GW/Subnet/DNS WM: [2] Custom STA IP/GW/Subnet WM: [1] STA IP set: 192.168.1.99 WM: [1] AutoConnect: SUCCESS *WM: [1] STA IP Address: 192.168.1.99 OK CONNECT Connected. IP address: 192.168.1.99 0:0 0:0 0:0 0:0 0:0 0:0 0:0 0:0 0:0 0:0 0:0