From 02081dc85d08f7286e9e4faa6b9e061e50a84230 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Thu, 11 Jun 2026 15:36:13 -0500 Subject: [PATCH] Fix Ethernet handling and dependencies for CH390 driver --- src/mqtt/MQTT.cpp | 5 ++++- variants/esp32s3/ELECROW-ThinkNode-G3/platformio.ini | 7 ++++--- variants/esp32s3/ELECROW-ThinkNode-M7/platformio.ini | 7 ++++--- variants/esp32s3/ELECROW-ThinkNode-M7/variant.cpp | 3 +++ variants/esp32s3/rak_wismesh_tap_v2/platformio.ini | 3 +++ 5 files changed, 18 insertions(+), 7 deletions(-) diff --git a/src/mqtt/MQTT.cpp b/src/mqtt/MQTT.cpp index c1e8da1a4..ed880aaaf 100644 --- a/src/mqtt/MQTT.cpp +++ b/src/mqtt/MQTT.cpp @@ -22,6 +22,9 @@ #if HAS_ETHERNET && defined(ARCH_ESP32) #include #endif // HAS_ETHERNET +#if HAS_ETHERNET && defined(USE_CH390D) +#include "ESP32_CH390.h" +#endif // USE_CH390D #include "Default.h" #include #include @@ -250,7 +253,7 @@ inline bool isConnectedToNetwork() if (ETH.connected()) return true; #elif defined(USE_CH390D) - if (ETH.isConnected()) + if (CH390.isConnected()) return true; #endif diff --git a/variants/esp32s3/ELECROW-ThinkNode-G3/platformio.ini b/variants/esp32s3/ELECROW-ThinkNode-G3/platformio.ini index cfd1095e8..9c0a492eb 100644 --- a/variants/esp32s3/ELECROW-ThinkNode-G3/platformio.ini +++ b/variants/esp32s3/ELECROW-ThinkNode-G3/platformio.ini @@ -16,8 +16,9 @@ custom_sdkconfig = CONFIG_ETH_ENABLED=y CONFIG_ARDUINO_SELECTIVE_Ethernet=y -lib_ignore = - Ethernet +; Do NOT lib_ignore Ethernet here: pioarduino's component manager maps the +; ignored Arduino lib to the esp_eth IDF component and strips its include +; paths, breaking NetworkEvents.h and the CH390 driver (see t-eth-elite). build_src_filter = ${esp32s3_base.build_src_filter} @@ -26,4 +27,4 @@ build_src_filter = lib_deps = ${esp32s3_base.lib_deps} # renovate: datasource=github-tags depName=ESP32-CH390 packageName=meshtastic/ESP32-CH390 - https://github.com/meshtastic/ESP32-CH390/archive/refs/tags/v1.0.1.zip + https://github.com/meshtastic/ESP32-CH390/archive/refs/tags/v1.1.0.zip diff --git a/variants/esp32s3/ELECROW-ThinkNode-M7/platformio.ini b/variants/esp32s3/ELECROW-ThinkNode-M7/platformio.ini index 65e0b27f0..4ee4590bf 100644 --- a/variants/esp32s3/ELECROW-ThinkNode-M7/platformio.ini +++ b/variants/esp32s3/ELECROW-ThinkNode-M7/platformio.ini @@ -15,8 +15,9 @@ custom_sdkconfig = CONFIG_ETH_ENABLED=y CONFIG_ARDUINO_SELECTIVE_Ethernet=y -lib_ignore = - Ethernet +; Do NOT lib_ignore Ethernet here: pioarduino's component manager maps the +; ignored Arduino lib to the esp_eth IDF component and strips its include +; paths, breaking NetworkEvents.h and the CH390 driver (see t-eth-elite). build_src_filter = ${esp32s3_base.build_src_filter} @@ -25,4 +26,4 @@ build_src_filter = lib_deps = ${esp32s3_base.lib_deps} # renovate: datasource=github-tags depName=ESP32-CH390 packageName=meshtastic/ESP32-CH390 - https://github.com/meshtastic/ESP32-CH390/archive/refs/tags/v1.0.1.zip \ No newline at end of file + https://github.com/meshtastic/ESP32-CH390/archive/refs/tags/v1.1.0.zip \ No newline at end of file diff --git a/variants/esp32s3/ELECROW-ThinkNode-M7/variant.cpp b/variants/esp32s3/ELECROW-ThinkNode-M7/variant.cpp index 7f457689f..17f767c0b 100644 --- a/variants/esp32s3/ELECROW-ThinkNode-M7/variant.cpp +++ b/variants/esp32s3/ELECROW-ThinkNode-M7/variant.cpp @@ -1,3 +1,6 @@ +#include "variant.h" +#include "Arduino.h" + void initVariant() { pinMode(LED_PAIRING, OUTPUT); diff --git a/variants/esp32s3/rak_wismesh_tap_v2/platformio.ini b/variants/esp32s3/rak_wismesh_tap_v2/platformio.ini index 1d3314aab..be964cc6d 100644 --- a/variants/esp32s3/rak_wismesh_tap_v2/platformio.ini +++ b/variants/esp32s3/rak_wismesh_tap_v2/platformio.ini @@ -41,6 +41,9 @@ lib_deps = [env:rak_wismesh_tap_v2-tft] extends = env:rak_wismesh_tap_v2 +; The MUI build overflows default_8MB.csv's 0x330000 app slots; use the MUI +; layout (large app0 + small flasher slot) like the other has_mui 8MB boards. +board_build.partitions = partition-table-8MB.csv build_flags = ${env:rak_wismesh_tap_v2.build_flags}