From 8e338b5e1c70832d6bea06bd7524fe60fc7c4b8e Mon Sep 17 00:00:00 2001 From: Seppe De Loore Date: Fri, 6 Mar 2026 17:13:56 +0100 Subject: [PATCH] [add] Wifi password --- src/main.cpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 50c2d38..97ebe83 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -327,9 +327,19 @@ void setup() FastLED.setBrightness(current_brightness); pinMode(ENC_SW, INPUT_PULLUP); - WiFi.softAPConfig(IPAddress(192, 168, 4, 1), IPAddress(192, 168, 4, 1), IPAddress(255, 255, 255, 0)); - WiFi.softAP("Connect4-Config", WIFI_PASSWORD, 1, 0, 4); // SSID, Pass, Channel 1, Hidden 0, Max Connections 4 - WiFi.softAP("Connect4-Config"); + WiFi.disconnect(true); // Clear old settings + WiFi.mode(WIFI_AP); // Force Access Point mode + delay(100); // Give the radio a moment to reset + + // SSID, Password (MUST be 8+ chars), Channel, Hidden (0=No), Max Clients + if (WiFi.softAP("Connect4-Config", WIFI_PASSWORD, 1, 0, 4)) + { + Serial.println("WPA2 AP Started Successfully"); + } + else + { + Serial.println("AP Failed - Check if WIFI_PASSWORD is at least 8 characters!"); + } server.on("/", handleRoot); server.on("/save", HTTP_POST, handleSave);