Revert "debug: force AP-only WiFi for LilyGO S3 bringup"

This reverts commit a5a2ae3009.
This commit is contained in:
2026-06-29 23:33:23 -06:00
parent a5a2ae3009
commit 16ee27944c
2 changed files with 0 additions and 36 deletions
@@ -30,8 +30,3 @@
// Bring-up safety: serve a tiny root page to avoid AP client/browser heap crashes.
#define LILYGO_BRINGUP_MINIMAL_WEB 1
// LilyGO ESP32-S3 bring-up: force AP-only WiFi until AP association is stable.
#define LILYGO_AP_ONLY_BRINGUP 1
#define LILYGO_AP_CHANNEL 6
#define LILYGO_AP_MAX_CLIENTS 2
@@ -1611,32 +1611,7 @@ void resetApConfigToDefaults() {
bool startAccessPoint() {
#if LILYGO_AP_ONLY_BRINGUP
WiFi.persistent(false);
WiFi.setSleep(false);
WiFi.disconnect(true, true);
WiFi.softAPdisconnect(true);
delay(250);
WiFi.mode(WIFI_OFF);
delay(250);
WiFi.mode(WIFI_AP);
delay(250);
IPAddress apIp(192, 168, 4, 1);
IPAddress gateway(192, 168, 4, 1);
IPAddress subnet(255, 255, 255, 0);
WiFi.softAPConfig(apIp, gateway, subnet);
bool ok = WiFi.softAP(
apSsid.c_str(),
apPassword.c_str(),
LILYGO_AP_CHANNEL,
false,
LILYGO_AP_MAX_CLIENTS
);
#else
bool ok = WiFi.softAP(apSsid.c_str(), apPassword.c_str());
#endif
if (ok) {
Serial.println("AP Started");
@@ -2110,10 +2085,8 @@ void connectStaWifi() {
WiFi.disconnect(false, false);
delay(500);
#if !LILYGO_AP_ONLY_BRINGUP
WiFi.mode(WIFI_AP_STA);
delay(250);
#endif
WiFi.begin(staSsids[i].c_str(), staPasswords[i].c_str());
@@ -4129,11 +4102,7 @@ void setup() {
loadWifiConfig();
loadApConfig();
#if LILYGO_AP_ONLY_BRINGUP
WiFi.mode(WIFI_AP);
#else
WiFi.mode(WIFI_AP_STA);
#endif
startAccessPoint();
oledShowSetupPage();