From 2578c052b33f6d4b38641963e92da46f5522ac88 Mon Sep 17 00:00:00 2001 From: MichaelDvP Date: Thu, 12 Sep 2024 19:08:59 +0200 Subject: [PATCH] compiles with pioarduino --- lib/framework/APSettingsService.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/framework/APSettingsService.cpp b/lib/framework/APSettingsService.cpp index 309e9b62b..3654d94b2 100644 --- a/lib/framework/APSettingsService.cpp +++ b/lib/framework/APSettingsService.cpp @@ -75,7 +75,11 @@ void APSettingsService::manageAP() { } void APSettingsService::startAP() { +#if ESP_IDF_VERSION_MAJOR < 5 WiFi.softAPenableIpV6(); // force IPV6, same as for WiFi - fixes https://github.com/emsesp/EMS-ESP32/issues/1922 +#else + WiFi.softAPenableIPv6(); // force IPV6, same as for WiFi - fixes https://github.com/emsesp/EMS-ESP32/issues/1922 +#endif WiFi.softAPConfig(_state.localIP, _state.gatewayIP, _state.subnetMask); esp_wifi_set_bandwidth(static_cast(ESP_IF_WIFI_AP), WIFI_BW_HT20); WiFi.softAP(_state.ssid.c_str(), _state.password.c_str(), _state.channel, _state.ssidHidden, _state.maxClients);