fix: stabilize Ethernet and WiFi connectivity

Clean up failed Ethernet initialization and allow retries with updated GPIOs. Preserve AP clients and mDNS during ordinary STA retries, and stop mDNS before destroying network interfaces.

Pause BLE scanning while AP clients are connected, prefetch nearby networks on AP startup, and fix SSID selection for nested WiFi settings. Enable Ethernet in the S3 Mini build.

Validated the S3 build and bench WiFi/MQTT, settings restoration, AP client operation, and BLE pause/resume. The Ethernet module was not connected.
This commit is contained in:
Yurii committed 2026-11-24 05:31:05 +03:00
1 parent bab5f46ff5
commit fc80e0cd8f
6 files changed
+184 -161

No files matched your search

+3 -2
View File
@@ -10,7 +10,6 @@ lib_deps = ESP32Async/AsyncTCP@^3.5.0
ESP32Async/ESPAsyncWebServer@^3.12.1
mathieucarbou/MycilaWebSerial@^8.2.3
bblanchon/ArduinoJson@^7.4.3
;ihormelnyk/OpenTherm Library@^1.1.5
https://github.com/Laxilef/ESP32OT
https://github.com/mathieucarbou/MycilaMQTT
https://github.com/mathieucarbou/MycilaHADiscovery/
@@ -55,7 +54,6 @@ check_flags = ;pvs-studio: --analysis-mode=4 --exclude-path=./.pio/l
; Defaults
[esp32_defaults]
;platform = https://github.com/pioarduino/platform-espressif32.git#prep_IDF6
platform = https://github.com/pioarduino/platform-espressif32/releases/download/61.04.00/platform-espressif32.zip
platform_packages = ${env.platform_packages}
board_build.partitions = esp32_partitions.csv
@@ -174,6 +172,8 @@ extends = esp32_defaults
board = lolin_s3_mini
custom_sdkconfig = ${esp32_defaults.custom_sdkconfig}
'# CONFIG_TINYUSB_ENABLED is not set'
CONFIG_ETH_USE_SPI_ETHERNET=y
CONFIG_ESP_NETIF_SET_DNS_PER_DEFAULT_NETIF=y
lib_deps = ${esp32_defaults.lib_deps}
${esp32_defaults.nimble_lib}
build_flags = ${esp32_defaults.build_flags}
@@ -181,6 +181,7 @@ build_flags = ${esp32_defaults.build_flags}
-D ARDUINO_USB_CDC_ON_BOOT=1
-D MYNEWT_VAL_BLE_EXT_ADV=1
-D USE_BLE=1
-D USE_ETHERNET=1
-D DEFAULT_OT_IN_GPIO=35
-D DEFAULT_OT_OUT_GPIO=36
-D DEFAULT_SENSOR_OUTDOOR_GPIO=13