feat: Wi-Fi provisioning via WiFiManager captive portal

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-17 20:41:30 +07:00
co-authored by Claude Opus 4.8
parent 77d0a35d69
commit cb3a06382e
3 changed files with 28 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
#include <ESP8266WiFi.h>
#include <WiFiManager.h>
#include "config.h"
#include "net.h"
bool netBegin() {
WiFiManager wm;
wm.setConfigPortalTimeout(180); // give up portal after 3 min, run offline
bool ok = wm.autoConnect(AP_NAME); // opens AP "WeatherPredictor-Setup" if no creds
return ok;
}
bool netConnected() { return WiFi.status() == WL_CONNECTED; }
String netIP() { return WiFi.localIP().toString(); }