From 2809b8d90aab390e3c67a6031cc88533614b3c0a Mon Sep 17 00:00:00 2001 From: Mathieu Carbou Date: Fri, 17 Oct 2025 22:13:43 +0200 Subject: [PATCH] CONFIG_ESP32_WIFI_ENABLED was missing for Arduino 2 --- .../AsyncResponseStream/AsyncResponseStream.ino | 2 +- examples/AsyncTunnel/AsyncTunnel.ino | 2 +- examples/Auth/Auth.ino | 2 +- examples/CORS/CORS.ino | 2 +- examples/CaptivePortal/CaptivePortal.ino | 4 ++-- examples/CatchAllHandler/CatchAllHandler.ino | 2 +- examples/ChunkResponse/ChunkResponse.ino | 2 +- .../ChunkRetryResponse/ChunkRetryResponse.ino | 2 +- examples/EndBegin/EndBegin.ino | 2 +- examples/Filters/Filters.ino | 16 ++++++++-------- examples/FlashResponse/FlashResponse.ino | 2 +- .../HeaderManipulation/HeaderManipulation.ino | 2 +- examples/Headers/Headers.ino | 2 +- examples/Json/Json.ino | 2 +- examples/Logging/Logging.ino | 2 +- examples/MessagePack/MessagePack.ino | 2 +- examples/Middleware/Middleware.ino | 2 +- examples/Params/Params.ino | 2 +- .../PartitionDownloader/PartitionDownloader.ino | 2 +- examples/PerfTests/PerfTests.ino | 2 +- examples/RateLimit/RateLimit.ino | 2 +- examples/Redirect/Redirect.ino | 2 +- .../RequestContinuation/RequestContinuation.ino | 2 +- .../RequestContinuationComplete.ino | 2 +- examples/ResumableDownload/ResumableDownload.ino | 2 +- examples/Rewrite/Rewrite.ino | 2 +- examples/ServerSentEvents/ServerSentEvents.ino | 2 +- .../ServerSentEvents_PR156.ino | 2 +- examples/ServerState/ServerState.ino | 2 +- .../SkipServerMiddleware.ino | 2 +- examples/SlowChunkResponse/SlowChunkResponse.ino | 2 +- examples/StaticFile/StaticFile.ino | 2 +- examples/Templates/Templates.ino | 2 +- examples/URIMatcherTest/URIMatcherTest.ino | 2 +- examples/Upload/Upload.ino | 2 +- examples/WebSocket/WebSocket.ino | 2 +- examples/WebSocketEasy/WebSocketEasy.ino | 2 +- idf_component_examples/catchall/main/main.cpp | 2 +- .../serversentevents/main/main.cpp | 2 +- idf_component_examples/websocket/main/main.cpp | 2 +- src/WebServer.cpp | 4 ++-- 41 files changed, 50 insertions(+), 50 deletions(-) diff --git a/examples/AsyncResponseStream/AsyncResponseStream.ino b/examples/AsyncResponseStream/AsyncResponseStream.ino index 451bb1a11..f3106501d 100644 --- a/examples/AsyncResponseStream/AsyncResponseStream.ino +++ b/examples/AsyncResponseStream/AsyncResponseStream.ino @@ -20,7 +20,7 @@ static AsyncWebServer server(80); void setup() { Serial.begin(115200); -#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI +#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI || CONFIG_ESP32_WIFI_ENABLED WiFi.mode(WIFI_AP); WiFi.softAP("esp-captive"); #endif diff --git a/examples/AsyncTunnel/AsyncTunnel.ino b/examples/AsyncTunnel/AsyncTunnel.ino index b63c056a9..29a7fe7c0 100644 --- a/examples/AsyncTunnel/AsyncTunnel.ino +++ b/examples/AsyncTunnel/AsyncTunnel.ino @@ -70,7 +70,7 @@ static const size_t htmlContentLength = strlen_P(htmlContent); void setup() { Serial.begin(115200); -#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI +#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI || CONFIG_ESP32_WIFI_ENABLED WiFi.begin(WIFI_SSID, WIFI_PASSWORD); while (WiFi.status() != WL_CONNECTED) { delay(500); diff --git a/examples/Auth/Auth.ino b/examples/Auth/Auth.ino index 86958f1e6..2c3002781 100644 --- a/examples/Auth/Auth.ino +++ b/examples/Auth/Auth.ino @@ -58,7 +58,7 @@ static AsyncAuthorizationMiddleware authz([](AsyncWebServerRequest *request) { void setup() { Serial.begin(115200); -#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI +#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI || CONFIG_ESP32_WIFI_ENABLED WiFi.mode(WIFI_AP); WiFi.softAP("esp-captive"); #endif diff --git a/examples/CORS/CORS.ino b/examples/CORS/CORS.ino index 647d55578..b355b120f 100644 --- a/examples/CORS/CORS.ino +++ b/examples/CORS/CORS.ino @@ -25,7 +25,7 @@ static AsyncCorsMiddleware cors; void setup() { Serial.begin(115200); -#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI +#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI || CONFIG_ESP32_WIFI_ENABLED WiFi.mode(WIFI_AP); WiFi.softAP("esp-captive"); #endif diff --git a/examples/CaptivePortal/CaptivePortal.ino b/examples/CaptivePortal/CaptivePortal.ino index 0b8c317ed..a94158be9 100644 --- a/examples/CaptivePortal/CaptivePortal.ino +++ b/examples/CaptivePortal/CaptivePortal.ino @@ -28,7 +28,7 @@ public: response->print("Captive Portal"); response->print("

This is our captive portal front page.

"); response->printf("

You were trying to reach: http://%s%s

", request->host().c_str(), request->url().c_str()); -#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI +#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI || CONFIG_ESP32_WIFI_ENABLED response->printf("

Try opening this link instead

", WiFi.softAPIP().toString().c_str()); #endif response->print(""); @@ -41,7 +41,7 @@ void setup() { Serial.println(); Serial.println("Configuring access point..."); -#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI +#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI || CONFIG_ESP32_WIFI_ENABLED if (!WiFi.softAP("esp-captive")) { Serial.println("Soft AP creation failed."); while (1); diff --git a/examples/CatchAllHandler/CatchAllHandler.ino b/examples/CatchAllHandler/CatchAllHandler.ino index fb0141031..56bc30a52 100644 --- a/examples/CatchAllHandler/CatchAllHandler.ino +++ b/examples/CatchAllHandler/CatchAllHandler.ino @@ -86,7 +86,7 @@ static const size_t htmlContentLength = strlen_P(htmlContent); void setup() { Serial.begin(115200); -#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI +#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI || CONFIG_ESP32_WIFI_ENABLED WiFi.mode(WIFI_AP); WiFi.softAP("esp-captive"); #endif diff --git a/examples/ChunkResponse/ChunkResponse.ino b/examples/ChunkResponse/ChunkResponse.ino index 52c31c0cd..0e6f1fc85 100644 --- a/examples/ChunkResponse/ChunkResponse.ino +++ b/examples/ChunkResponse/ChunkResponse.ino @@ -86,7 +86,7 @@ static const size_t htmlContentLength = strlen_P(htmlContent); void setup() { Serial.begin(115200); -#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI +#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI || CONFIG_ESP32_WIFI_ENABLED WiFi.mode(WIFI_AP); WiFi.softAP("esp-captive"); #endif diff --git a/examples/ChunkRetryResponse/ChunkRetryResponse.ino b/examples/ChunkRetryResponse/ChunkRetryResponse.ino index 4dde65ec0..d2a9ced17 100644 --- a/examples/ChunkRetryResponse/ChunkRetryResponse.ino +++ b/examples/ChunkRetryResponse/ChunkRetryResponse.ino @@ -90,7 +90,7 @@ static int key = -1; void setup() { Serial.begin(115200); -#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI +#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI || CONFIG_ESP32_WIFI_ENABLED WiFi.mode(WIFI_AP); WiFi.softAP("esp-captive"); #endif diff --git a/examples/EndBegin/EndBegin.ino b/examples/EndBegin/EndBegin.ino index 8e91fcf41..4c771e511 100644 --- a/examples/EndBegin/EndBegin.ino +++ b/examples/EndBegin/EndBegin.ino @@ -24,7 +24,7 @@ static AsyncWebServer server(80); void setup() { Serial.begin(115200); -#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI +#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI || CONFIG_ESP32_WIFI_ENABLED WiFi.mode(WIFI_AP); WiFi.softAP("esp-captive"); #endif diff --git a/examples/Filters/Filters.ino b/examples/Filters/Filters.ino index bcdb5b3c5..805193e3d 100644 --- a/examples/Filters/Filters.ino +++ b/examples/Filters/Filters.ino @@ -32,7 +32,7 @@ public: response->print("Captive Portal"); response->print("

This is out captive portal front page.

"); response->printf("

You were trying to reach: http://%s%s

", request->host().c_str(), request->url().c_str()); -#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI +#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI || CONFIG_ESP32_WIFI_ENABLED response->printf("

Try opening this link instead

", WiFi.softAPIP().toString().c_str()); #endif response->print(""); @@ -51,17 +51,17 @@ void setup() { "/", HTTP_GET, [](AsyncWebServerRequest *request) { Serial.println("Captive portal request..."); -#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI +#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI || CONFIG_ESP32_WIFI_ENABLED Serial.println("WiFi.localIP(): " + WiFi.localIP().toString()); #endif Serial.println("request->client()->localIP(): " + request->client()->localIP().toString()); #if ESP_IDF_VERSION_MAJOR >= 5 -#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI +#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI || CONFIG_ESP32_WIFI_ENABLED Serial.println("WiFi.type(): " + String((int)WiFi.localIP().type())); #endif Serial.println("request->client()->type(): " + String((int)request->client()->localIP().type())); #endif -#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI +#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI || CONFIG_ESP32_WIFI_ENABLED Serial.println(WiFi.localIP() == request->client()->localIP() ? "should be: ON_STA_FILTER" : "should be: ON_AP_FILTER"); Serial.println(WiFi.localIP() == request->client()->localIP()); Serial.println(WiFi.localIP().toString() == request->client()->localIP().toString()); @@ -77,17 +77,17 @@ void setup() { "/", HTTP_GET, [](AsyncWebServerRequest *request) { Serial.println("Website request..."); -#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI +#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI || CONFIG_ESP32_WIFI_ENABLED Serial.println("WiFi.localIP(): " + WiFi.localIP().toString()); #endif Serial.println("request->client()->localIP(): " + request->client()->localIP().toString()); #if ESP_IDF_VERSION_MAJOR >= 5 -#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI +#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI || CONFIG_ESP32_WIFI_ENABLED Serial.println("WiFi.type(): " + String((int)WiFi.localIP().type())); #endif Serial.println("request->client()->type(): " + String((int)request->client()->localIP().type())); #endif -#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI +#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI || CONFIG_ESP32_WIFI_ENABLED Serial.println(WiFi.localIP() == request->client()->localIP() ? "should be: ON_STA_FILTER" : "should be: ON_AP_FILTER"); Serial.println(WiFi.localIP() == request->client()->localIP()); Serial.println(WiFi.localIP().toString() == request->client()->localIP().toString()); @@ -113,7 +113,7 @@ void setup() { // dnsServer.stop(); // WiFi.softAPdisconnect(); -#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI +#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI || CONFIG_ESP32_WIFI_ENABLED WiFi.persistent(false); WiFi.begin("IoT"); while (WiFi.status() != WL_CONNECTED) { diff --git a/examples/FlashResponse/FlashResponse.ino b/examples/FlashResponse/FlashResponse.ino index 5763f2286..15a3b7551 100644 --- a/examples/FlashResponse/FlashResponse.ino +++ b/examples/FlashResponse/FlashResponse.ino @@ -86,7 +86,7 @@ static const size_t htmlContentLength = strlen_P(htmlContent); void setup() { Serial.begin(115200); -#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI +#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI || CONFIG_ESP32_WIFI_ENABLED WiFi.mode(WIFI_AP); WiFi.softAP("esp-captive"); #endif diff --git a/examples/HeaderManipulation/HeaderManipulation.ino b/examples/HeaderManipulation/HeaderManipulation.ino index 5b4c9f7b3..fdfdd31bf 100644 --- a/examples/HeaderManipulation/HeaderManipulation.ino +++ b/examples/HeaderManipulation/HeaderManipulation.ino @@ -33,7 +33,7 @@ AsyncHeaderFreeMiddleware headerFree; void setup() { Serial.begin(115200); -#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI +#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI || CONFIG_ESP32_WIFI_ENABLED WiFi.mode(WIFI_AP); WiFi.softAP("esp-captive"); #endif diff --git a/examples/Headers/Headers.ino b/examples/Headers/Headers.ino index eee87ac14..f2657689e 100644 --- a/examples/Headers/Headers.ino +++ b/examples/Headers/Headers.ino @@ -24,7 +24,7 @@ static AsyncWebServer server(80); void setup() { Serial.begin(115200); -#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI +#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI || CONFIG_ESP32_WIFI_ENABLED WiFi.mode(WIFI_AP); WiFi.softAP("esp-captive"); #endif diff --git a/examples/Json/Json.ino b/examples/Json/Json.ino index 69ab251ed..a4a1b826d 100644 --- a/examples/Json/Json.ino +++ b/examples/Json/Json.ino @@ -28,7 +28,7 @@ static AsyncCallbackJsonWebHandler *handler = new AsyncCallbackJsonWebHandler("/ void setup() { Serial.begin(115200); -#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI +#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI || CONFIG_ESP32_WIFI_ENABLED WiFi.mode(WIFI_AP); WiFi.softAP("esp-captive"); #endif diff --git a/examples/Logging/Logging.ino b/examples/Logging/Logging.ino index ae504b222..1c4b1bfb9 100644 --- a/examples/Logging/Logging.ino +++ b/examples/Logging/Logging.ino @@ -25,7 +25,7 @@ static AsyncLoggingMiddleware requestLogger; void setup() { Serial.begin(115200); -#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI +#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI || CONFIG_ESP32_WIFI_ENABLED WiFi.mode(WIFI_AP); WiFi.softAP("esp-captive"); #endif diff --git a/examples/MessagePack/MessagePack.ino b/examples/MessagePack/MessagePack.ino index 18ff6e975..9161f3321 100644 --- a/examples/MessagePack/MessagePack.ino +++ b/examples/MessagePack/MessagePack.ino @@ -28,7 +28,7 @@ static AsyncCallbackJsonWebHandler *handler = new AsyncCallbackJsonWebHandler("/ void setup() { Serial.begin(115200); -#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI +#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI || CONFIG_ESP32_WIFI_ENABLED WiFi.mode(WIFI_AP); WiFi.softAP("esp-captive"); #endif diff --git a/examples/Middleware/Middleware.ino b/examples/Middleware/Middleware.ino index 992a0a26b..12a53114c 100644 --- a/examples/Middleware/Middleware.ino +++ b/examples/Middleware/Middleware.ino @@ -34,7 +34,7 @@ public: void setup() { Serial.begin(115200); -#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI +#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI || CONFIG_ESP32_WIFI_ENABLED WiFi.mode(WIFI_AP); WiFi.softAP("esp-captive"); #endif diff --git a/examples/Params/Params.ino b/examples/Params/Params.ino index 416218c1c..e755643bb 100644 --- a/examples/Params/Params.ino +++ b/examples/Params/Params.ino @@ -74,7 +74,7 @@ static const size_t htmlContentLength = strlen_P(htmlContent); void setup() { Serial.begin(115200); -#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI +#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI || CONFIG_ESP32_WIFI_ENABLED WiFi.mode(WIFI_AP); WiFi.softAP("esp-captive"); #endif diff --git a/examples/PartitionDownloader/PartitionDownloader.ino b/examples/PartitionDownloader/PartitionDownloader.ino index 1174640d9..a732f42d4 100644 --- a/examples/PartitionDownloader/PartitionDownloader.ino +++ b/examples/PartitionDownloader/PartitionDownloader.ino @@ -34,7 +34,7 @@ static AsyncWebServer server(80); void setup() { Serial.begin(115200); -#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI +#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI || CONFIG_ESP32_WIFI_ENABLED WiFi.mode(WIFI_AP); WiFi.softAP("esp-captive"); #endif diff --git a/examples/PerfTests/PerfTests.ino b/examples/PerfTests/PerfTests.ino index 001512cd1..af7b90e11 100644 --- a/examples/PerfTests/PerfTests.ino +++ b/examples/PerfTests/PerfTests.ino @@ -91,7 +91,7 @@ static volatile size_t requests = 0; void setup() { Serial.begin(115200); -#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI +#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI || CONFIG_ESP32_WIFI_ENABLED WiFi.mode(WIFI_AP); WiFi.softAP("esp-captive"); #endif diff --git a/examples/RateLimit/RateLimit.ino b/examples/RateLimit/RateLimit.ino index 5ae93e784..7cd58a677 100644 --- a/examples/RateLimit/RateLimit.ino +++ b/examples/RateLimit/RateLimit.ino @@ -25,7 +25,7 @@ static AsyncRateLimitMiddleware rateLimit; void setup() { Serial.begin(115200); -#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI +#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI || CONFIG_ESP32_WIFI_ENABLED WiFi.mode(WIFI_AP); WiFi.softAP("esp-captive"); #endif diff --git a/examples/Redirect/Redirect.ino b/examples/Redirect/Redirect.ino index 8f105573c..bb431ee62 100644 --- a/examples/Redirect/Redirect.ino +++ b/examples/Redirect/Redirect.ino @@ -24,7 +24,7 @@ static AsyncWebServer server(80); void setup() { Serial.begin(115200); -#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI +#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI || CONFIG_ESP32_WIFI_ENABLED WiFi.mode(WIFI_AP); WiFi.softAP("esp-captive"); #endif diff --git a/examples/RequestContinuation/RequestContinuation.ino b/examples/RequestContinuation/RequestContinuation.ino index f59322e5d..e10076298 100644 --- a/examples/RequestContinuation/RequestContinuation.ino +++ b/examples/RequestContinuation/RequestContinuation.ino @@ -34,7 +34,7 @@ static AsyncWebServerRequestPtr gpioRequest; void setup() { Serial.begin(115200); -#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI +#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI || CONFIG_ESP32_WIFI_ENABLED WiFi.mode(WIFI_AP); WiFi.softAP("esp-captive"); #endif diff --git a/examples/RequestContinuationComplete/RequestContinuationComplete.ino b/examples/RequestContinuationComplete/RequestContinuationComplete.ino index cb4a53fa4..8976eed97 100644 --- a/examples/RequestContinuationComplete/RequestContinuationComplete.ino +++ b/examples/RequestContinuationComplete/RequestContinuationComplete.ino @@ -94,7 +94,7 @@ static bool processLongRunningOperation(LongRunningOperation *op) { void setup() { Serial.begin(115200); -#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI +#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI || CONFIG_ESP32_WIFI_ENABLED WiFi.mode(WIFI_AP); WiFi.softAP("esp-captive"); #endif diff --git a/examples/ResumableDownload/ResumableDownload.ino b/examples/ResumableDownload/ResumableDownload.ino index 68646e724..14c38e73a 100644 --- a/examples/ResumableDownload/ResumableDownload.ino +++ b/examples/ResumableDownload/ResumableDownload.ino @@ -24,7 +24,7 @@ static AsyncWebServer server(80); void setup() { Serial.begin(115200); -#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI +#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI || CONFIG_ESP32_WIFI_ENABLED WiFi.mode(WIFI_AP); WiFi.softAP("esp-captive"); #endif diff --git a/examples/Rewrite/Rewrite.ino b/examples/Rewrite/Rewrite.ino index 8dfeedc67..5c37580e4 100644 --- a/examples/Rewrite/Rewrite.ino +++ b/examples/Rewrite/Rewrite.ino @@ -24,7 +24,7 @@ static AsyncWebServer server(80); void setup() { Serial.begin(115200); -#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI +#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI || CONFIG_ESP32_WIFI_ENABLED WiFi.mode(WIFI_AP); WiFi.softAP("esp-captive"); #endif diff --git a/examples/ServerSentEvents/ServerSentEvents.ino b/examples/ServerSentEvents/ServerSentEvents.ino index 5567ec6db..2ffefe155 100644 --- a/examples/ServerSentEvents/ServerSentEvents.ino +++ b/examples/ServerSentEvents/ServerSentEvents.ino @@ -58,7 +58,7 @@ static AsyncEventSource events("/events"); void setup() { Serial.begin(115200); -#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI +#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI || CONFIG_ESP32_WIFI_ENABLED WiFi.mode(WIFI_AP); WiFi.softAP("esp-captive"); #endif diff --git a/examples/ServerSentEvents_PR156/ServerSentEvents_PR156.ino b/examples/ServerSentEvents_PR156/ServerSentEvents_PR156.ino index cced7151d..4c40e0a2c 100644 --- a/examples/ServerSentEvents_PR156/ServerSentEvents_PR156.ino +++ b/examples/ServerSentEvents_PR156/ServerSentEvents_PR156.ino @@ -64,7 +64,7 @@ static constexpr uint32_t timeoutClose = 15000; void setup() { Serial.begin(115200); -#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI +#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI || CONFIG_ESP32_WIFI_ENABLED WiFi.mode(WIFI_AP); WiFi.softAP("esp-captive"); #endif diff --git a/examples/ServerState/ServerState.ino b/examples/ServerState/ServerState.ino index 4ceddbcb1..254af8799 100644 --- a/examples/ServerState/ServerState.ino +++ b/examples/ServerState/ServerState.ino @@ -25,7 +25,7 @@ static AsyncWebServer server2(80); void setup() { Serial.begin(115200); -#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI +#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI || CONFIG_ESP32_WIFI_ENABLED WiFi.mode(WIFI_AP); WiFi.softAP("esp-captive"); #endif diff --git a/examples/SkipServerMiddleware/SkipServerMiddleware.ino b/examples/SkipServerMiddleware/SkipServerMiddleware.ino index 0e7f172bf..f08a1b32a 100644 --- a/examples/SkipServerMiddleware/SkipServerMiddleware.ino +++ b/examples/SkipServerMiddleware/SkipServerMiddleware.ino @@ -27,7 +27,7 @@ static AsyncLoggingMiddleware logging; void setup() { Serial.begin(115200); -#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI +#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI || CONFIG_ESP32_WIFI_ENABLED WiFi.mode(WIFI_AP); WiFi.softAP("esp-captive"); #endif diff --git a/examples/SlowChunkResponse/SlowChunkResponse.ino b/examples/SlowChunkResponse/SlowChunkResponse.ino index 7844ad6e6..cf7e3e6ee 100644 --- a/examples/SlowChunkResponse/SlowChunkResponse.ino +++ b/examples/SlowChunkResponse/SlowChunkResponse.ino @@ -89,7 +89,7 @@ static size_t charactersIndex = 0; void setup() { Serial.begin(115200); -#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI +#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI || CONFIG_ESP32_WIFI_ENABLED WiFi.mode(WIFI_AP); WiFi.softAP("esp-captive"); #endif diff --git a/examples/StaticFile/StaticFile.ino b/examples/StaticFile/StaticFile.ino index edc2cb230..da2db8aa9 100644 --- a/examples/StaticFile/StaticFile.ino +++ b/examples/StaticFile/StaticFile.ino @@ -111,7 +111,7 @@ static const size_t index2_html_gz_len = sizeof(index2_html_gz); void setup() { Serial.begin(115200); -#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI +#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI || CONFIG_ESP32_WIFI_ENABLED WiFi.mode(WIFI_AP); WiFi.softAP("esp-captive"); #endif diff --git a/examples/Templates/Templates.ino b/examples/Templates/Templates.ino index 318ec38d7..b5acd89a9 100644 --- a/examples/Templates/Templates.ino +++ b/examples/Templates/Templates.ino @@ -49,7 +49,7 @@ static void setUptimeInMinutes(unsigned t) { void setup() { Serial.begin(115200); -#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI +#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI || CONFIG_ESP32_WIFI_ENABLED WiFi.mode(WIFI_AP); WiFi.softAP("esp-captive"); #endif diff --git a/examples/URIMatcherTest/URIMatcherTest.ino b/examples/URIMatcherTest/URIMatcherTest.ino index 159d50c41..018c2d493 100644 --- a/examples/URIMatcherTest/URIMatcherTest.ino +++ b/examples/URIMatcherTest/URIMatcherTest.ino @@ -26,7 +26,7 @@ AsyncWebServer server(80); void setup() { Serial.begin(115200); -#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI +#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI || CONFIG_ESP32_WIFI_ENABLED WiFi.mode(WIFI_AP); WiFi.softAP("esp-captive"); #endif diff --git a/examples/Upload/Upload.ino b/examples/Upload/Upload.ino index fd80bd721..ec2a0868d 100644 --- a/examples/Upload/Upload.ino +++ b/examples/Upload/Upload.ino @@ -31,7 +31,7 @@ void setup() { LittleFS.begin(); } -#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI +#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI || CONFIG_ESP32_WIFI_ENABLED WiFi.mode(WIFI_AP); WiFi.softAP("esp-captive"); #endif diff --git a/examples/WebSocket/WebSocket.ino b/examples/WebSocket/WebSocket.ino index c8d372795..ac35a89b7 100644 --- a/examples/WebSocket/WebSocket.ino +++ b/examples/WebSocket/WebSocket.ino @@ -25,7 +25,7 @@ static AsyncWebSocket ws("/ws"); void setup() { Serial.begin(115200); -#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI +#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI || CONFIG_ESP32_WIFI_ENABLED WiFi.mode(WIFI_AP); WiFi.softAP("esp-captive"); #endif diff --git a/examples/WebSocketEasy/WebSocketEasy.ino b/examples/WebSocketEasy/WebSocketEasy.ino index 5229910cb..19994bce2 100644 --- a/examples/WebSocketEasy/WebSocketEasy.ino +++ b/examples/WebSocketEasy/WebSocketEasy.ino @@ -71,7 +71,7 @@ static const size_t htmlContentLength = strlen_P(htmlContent); void setup() { Serial.begin(115200); -#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI +#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI || CONFIG_ESP32_WIFI_ENABLED WiFi.mode(WIFI_AP); WiFi.softAP("esp-captive"); #endif diff --git a/idf_component_examples/catchall/main/main.cpp b/idf_component_examples/catchall/main/main.cpp index 0ba61ecdd..3f67a9886 100644 --- a/idf_component_examples/catchall/main/main.cpp +++ b/idf_component_examples/catchall/main/main.cpp @@ -78,7 +78,7 @@ static const size_t htmlContentLength = strlen_P(htmlContent); void setup() { Serial.begin(115200); -#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI +#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI || CONFIG_ESP32_WIFI_ENABLED WiFi.mode(WIFI_AP); WiFi.softAP("esp-captive"); #endif diff --git a/idf_component_examples/serversentevents/main/main.cpp b/idf_component_examples/serversentevents/main/main.cpp index b877f54a9..67d27a47d 100644 --- a/idf_component_examples/serversentevents/main/main.cpp +++ b/idf_component_examples/serversentevents/main/main.cpp @@ -50,7 +50,7 @@ static AsyncEventSource events("/events"); void setup() { Serial.begin(115200); -#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI +#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI || CONFIG_ESP32_WIFI_ENABLED WiFi.mode(WIFI_AP); WiFi.softAP("esp-captive"); #endif diff --git a/idf_component_examples/websocket/main/main.cpp b/idf_component_examples/websocket/main/main.cpp index 9d4e46aac..3a443aec9 100644 --- a/idf_component_examples/websocket/main/main.cpp +++ b/idf_component_examples/websocket/main/main.cpp @@ -17,7 +17,7 @@ static AsyncWebSocket ws("/ws"); void setup() { Serial.begin(115200); -#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI +#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI || CONFIG_ESP32_WIFI_ENABLED WiFi.mode(WIFI_AP); WiFi.softAP("esp-captive"); #endif diff --git a/src/WebServer.cpp b/src/WebServer.cpp index 657acbfac..2b86080f3 100644 --- a/src/WebServer.cpp +++ b/src/WebServer.cpp @@ -15,7 +15,7 @@ using namespace asyncsrv; bool ON_STA_FILTER(AsyncWebServerRequest *request) { -#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI +#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI || CONFIG_ESP32_WIFI_ENABLED return WiFi.localIP() == request->client()->localIP(); #else return false; @@ -23,7 +23,7 @@ bool ON_STA_FILTER(AsyncWebServerRequest *request) { } bool ON_AP_FILTER(AsyncWebServerRequest *request) { -#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI +#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI || CONFIG_ESP32_WIFI_ENABLED return WiFi.localIP() != request->client()->localIP(); #else return false;