From e1a62fe5bebf51e816d2e75852fab5d34191f406 Mon Sep 17 00:00:00 2001 From: cjkas Date: Mon, 19 Oct 2026 21:13:49 +0200 Subject: [PATCH] feat: keep Ethernet settings independent of the framework Prepares the move to Arduino 3.x / ESP-IDF 5.5, which renumbers eth_phy_type_t (ETH_PHY_GENERIC is now 0) and only has the RMII MAC API on the original ESP32. - Store the PHY chip as our own id (eth_phy_id_t, the 2.x values) and translate it by name at ETH.begin(), so NVS, backups and the web UI keep their numbers on either framework. - Build Ethernet only where CONFIG_ETH_USE_ESP32_EMAC is set instead of everywhere but the C6. C3 and S3 could never use it. A stored Ethernet connection falls back to Wi-Fi on those chips. - /networksettings reports hasEthernet; the UI hides the Ethernet options without it. - Fix the UI PHY list: 5 is the KSZ8041, add the KSZ8081 (6), drop the DM9051, an SPI chip the MAC can't drive. - SSDP takes its address from WiFi/ETH.localIP() instead of the tcpip_adapter API IDF 5 removed. Co-Authored-By: Claude Opus 5.5 --- data-src/index.html | 2 +- data-src/index.js | 10 +++-- src/ConfigFile.cpp | 10 ++--- src/ConfigSettings.cpp | 16 ++++---- src/ConfigSettings.h | 19 +++++----- src/ESPNetwork.cpp | 46 +++++++++++++---------- src/EthPhy.h | 45 +++++++++++++++++++++++ src/SSDP.cpp | 19 ++-------- src/SomfyJson.cpp | 2 +- src/entryPoints/WebUiRoutes.cpp | 6 ++- test/stubs/ETH.h | 16 ++++++++ test/test_ethphy/test_ethphy.cpp | 63 ++++++++++++++++++++++++++++++++ 12 files changed, 190 insertions(+), 64 deletions(-) create mode 100644 src/EthPhy.h create mode 100644 test/stubs/ETH.h create mode 100644 test/test_ethphy/test_ethphy.cpp diff --git a/data-src/index.html b/data-src/index.html index 0d9c41c..c2192c9 100644 --- a/data-src/index.html +++ b/data-src/index.html @@ -277,7 +277,7 @@