From e867fcab1a724ab76d1e32ef3c09bba507c12a61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frank=20M=C3=B6hle?= <91616163+softhack007@users.noreply.github.com> Date: Tue, 27 Jan 2026 23:14:06 +0100 Subject: [PATCH 1/4] Change default LED pin to 4 in Ethernet builds GPIO 4 seems to be one of the few pins that is not used in ANY supported ethernet config. See https://github.com/wled/WLED/issues/5155#issuecomment-3614391561 --- wled00/const.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/wled00/const.h b/wled00/const.h index 6d1825d5..264c632f 100644 --- a/wled00/const.h +++ b/wled00/const.h @@ -611,7 +611,12 @@ static_assert(WLED_MAX_BUSSES <= 32, "WLED_MAX_BUSSES exceeds hard limit"); #define DEFAULT_LED_PIN 2 // GPIO2 (D4) on Wemos D1 mini compatible boards, safe to use on any board #endif #else - #define DEFAULT_LED_PIN 16 // aligns with GPIO2 (D4) on Wemos D1 mini32 compatible boards (if it is unusable it will be reassigned in WS2812FX::finalizeInit()) + #if defined(WLED_USE_ETHERNET) + #define DEFAULT_LED_PIN 4 // GPIO4 seems to be a "safe bet" for all known ethernet boards (issue #5155) + #warning "Compiling with Ethernet support. The default LED pin has been changed to pin 4." + #else + #define DEFAULT_LED_PIN 16 // aligns with GPIO2 (D4) on Wemos D1 mini32 compatible boards (if it is unusable it will be reassigned in WS2812FX::finalizeInit()) + #endif #endif #define DEFAULT_LED_TYPE TYPE_WS2812_RGB #define DEFAULT_LED_COUNT 30 From 8d39dac65471031e5b77e2e2e208082fbc95fb93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frank=20M=C3=B6hle?= <91616163+softhack007@users.noreply.github.com> Date: Tue, 27 Jan 2026 23:33:33 +0100 Subject: [PATCH 2/4] ethernet: avoid dangerous pins LED pin: 16 -> 4 AR: no microphone, no pins clarify comment when to disable ESP-NOW --- platformio.ini | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/platformio.ini b/platformio.ini index ec73bc56..fb7d07c4 100644 --- a/platformio.ini +++ b/platformio.ini @@ -511,8 +511,10 @@ upload_speed = 921600 custom_usermods = audioreactive build_unflags = ${common.build_unflags} build_flags = ${common.build_flags} ${esp32.build_flags} -D WLED_RELEASE_NAME=\"ESP32_Ethernet\" -D RLYPIN=-1 -D WLED_USE_ETHERNET -D BTNPIN=-1 + -D SR_DTYPE=-1 ;; force AR to not allocate any PINs at startup + -D DATA_PINS=4 ;; default led pin = 16 conflicts with pins used for ethernet + ; -D WLED_DISABLE_ESPNOW ;; ESP-NOW requires wifi, may crash with ethernet only => uncomment if your board uses ETH_CLOCK_GPIO0_OUT, ETH_CLOCK_GPIO16_OUT, ETH_CLOCK_GPIO17_OUT -DARDUINO_USB_CDC_ON_BOOT=0 ;; this flag is mandatory for "classic ESP32" when building with arduino-esp32 >=2.0.3 -; -D WLED_DISABLE_ESPNOW ;; ESP-NOW requires wifi, may crash with ethernet only lib_deps = ${esp32.lib_deps} board_build.partitions = ${esp32.default_partitions} board_build.flash_mode = dio From a64334c32e06076bfbc14345704715dd2540eefd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frank=20M=C3=B6hle?= <91616163+softhack007@users.noreply.github.com> Date: Tue, 27 Jan 2026 23:50:34 +0100 Subject: [PATCH 3/4] correct wrong AR build flag typo --- platformio.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio.ini b/platformio.ini index fb7d07c4..0c4b7a1b 100644 --- a/platformio.ini +++ b/platformio.ini @@ -511,7 +511,7 @@ upload_speed = 921600 custom_usermods = audioreactive build_unflags = ${common.build_unflags} build_flags = ${common.build_flags} ${esp32.build_flags} -D WLED_RELEASE_NAME=\"ESP32_Ethernet\" -D RLYPIN=-1 -D WLED_USE_ETHERNET -D BTNPIN=-1 - -D SR_DTYPE=-1 ;; force AR to not allocate any PINs at startup + -D SR_DMTYPE=-1 ;; force AR to not allocate any PINs at startup -D DATA_PINS=4 ;; default led pin = 16 conflicts with pins used for ethernet ; -D WLED_DISABLE_ESPNOW ;; ESP-NOW requires wifi, may crash with ethernet only => uncomment if your board uses ETH_CLOCK_GPIO0_OUT, ETH_CLOCK_GPIO16_OUT, ETH_CLOCK_GPIO17_OUT -DARDUINO_USB_CDC_ON_BOOT=0 ;; this flag is mandatory for "classic ESP32" when building with arduino-esp32 >=2.0.3 From 81af160be688b9bf999ae61416fc79739ae3f78a Mon Sep 17 00:00:00 2001 From: Frank <91616163+softhack007@users.noreply.github.com> Date: Wed, 28 Jan 2026 15:24:40 +0100 Subject: [PATCH 4/4] disable repeating warning, set all AR pins to "unused" * ethernet warning was repeating too often * make sure that AR usermod will not grab any PINs at startup --- platformio.ini | 2 +- wled00/const.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/platformio.ini b/platformio.ini index 0c4b7a1b..06551afd 100644 --- a/platformio.ini +++ b/platformio.ini @@ -511,7 +511,7 @@ upload_speed = 921600 custom_usermods = audioreactive build_unflags = ${common.build_unflags} build_flags = ${common.build_flags} ${esp32.build_flags} -D WLED_RELEASE_NAME=\"ESP32_Ethernet\" -D RLYPIN=-1 -D WLED_USE_ETHERNET -D BTNPIN=-1 - -D SR_DMTYPE=-1 ;; force AR to not allocate any PINs at startup + -D SR_DMTYPE=-1 -D AUDIOPIN=-1 -D I2S_SDPIN=-1 -D I2S_WSPIN=-1 -D I2S_CKPIN=-1 -D MCLK_PIN=-1 ;; force AR to not allocate any PINs at startup -D DATA_PINS=4 ;; default led pin = 16 conflicts with pins used for ethernet ; -D WLED_DISABLE_ESPNOW ;; ESP-NOW requires wifi, may crash with ethernet only => uncomment if your board uses ETH_CLOCK_GPIO0_OUT, ETH_CLOCK_GPIO16_OUT, ETH_CLOCK_GPIO17_OUT -DARDUINO_USB_CDC_ON_BOOT=0 ;; this flag is mandatory for "classic ESP32" when building with arduino-esp32 >=2.0.3 diff --git a/wled00/const.h b/wled00/const.h index 264c632f..642fc85c 100644 --- a/wled00/const.h +++ b/wled00/const.h @@ -613,7 +613,7 @@ static_assert(WLED_MAX_BUSSES <= 32, "WLED_MAX_BUSSES exceeds hard limit"); #else #if defined(WLED_USE_ETHERNET) #define DEFAULT_LED_PIN 4 // GPIO4 seems to be a "safe bet" for all known ethernet boards (issue #5155) - #warning "Compiling with Ethernet support. The default LED pin has been changed to pin 4." + //#warning "Compiling with Ethernet support. The default LED pin has been changed to pin 4." #else #define DEFAULT_LED_PIN 16 // aligns with GPIO2 (D4) on Wemos D1 mini32 compatible boards (if it is unusable it will be reassigned in WS2812FX::finalizeInit()) #endif