Repository navigation
Description
What happened?
After compiling WLED 0.16.0-alpha 2506160 a number of different ways and getting the same behaviour, I discovered that when WLED boots with ethernet configured it doesn't connect using the defined static IP Address. This presents in two different ways.
If DHCP is enabled on the ethernet network, 0.16.0 seems to pickup a DHCP address and not use the static one definied in WLED. If the ethernet is unplugged and reconnected, then it uses the static IP Address definied in WLED.
If DHCP is disabled on the network, WLED seems to pick up the static IP Address, however, it doesn't "connect" to it. If the ethernet is unplugged and reconnected, then it uses AND connects via the static IP Address definied in WLED.
Platform: Quinled dig-octa
WLED 0.16.0-alpha 2506160 debug log - DHCP enabled on router.txt
WLED 0.16.0-alpha 2506160 debug log - no DHCP on router.txt
To Reproduce Bug
Compile and install 0.16.0 Nightly (esp32dev) with ethernet.
Via WIFI, configure the ethernet to use a static IP Address.
Connect Ethernet, reboot the module and try to connect to the defined static IP address. Connection will fail.
Unplug ethernet for 5 seconds, reconnect. You'll be able to connect to WLED over ethernet.
Expected Behavior
If ethernet is connected when WLED boots, it should connect immediately via ethernet using the defined static IP Address.
Install Method
Self-Compiled
What version of WLED?
WLED 0.16.0-alpha 2506160
Which microcontroller/board are you seeing the problem on?
ESP32
Relevant log/trace output
*** WLED 0.16.0-alpha 2506160 debug log - DHCP enabled on router ***
Using 'COM7' as serial port.
Unexpected error: could not open port 'COM7': PermissionError(13, 'Access is denied.', None, 5)
[13:53:01]ets Jul 29 2019 12:21:46
[13:53:01]
[13:53:01]rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
[13:53:01]configsip: 0, SPIWP:0xee
[13:53:01]clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
[13:53:01]mode:DIO, clock div:2
[13:53:01]load:0x3fff0030,len:1184
[13:53:01]load:0x40078000,len:13132
[13:53:01]load:0x40080400,len:3036
[13:53:01]entry 0x400805e4
[13:53:02]
[13:53:02]---WLED 0.16.0-alpha 2506160 INIT---
[13:53:02]
[13:53:02]esp32 4.4.4.20230310
[13:53:02]arduino-esp32 v2.0.9
[13:53:02]CPU: ESP32-D0WD-V3 rev.3, 2 core(s), 240 MHz.
[13:53:02]FLASH: 16 MB, Mode 2 (DIO), speed 40 MHz.
[13:53:02]heap 179452
[13:53:02]TX power: 78/78
[13:53:02]PIN ALLOC: Pin 1 successfully allocated by 0x89.
[13:53:02]PIN ALLOC: 0x0000000000000lX.
[13:53:02]heap 179452
[13:53:02]checking for bootloop: time -2041838823, counter -466638810, action -857983522
[13:53:02]Valid JSON file /cfg.json
[13:53:02]Reading config
[13:53:02]Reading settings from /wsec.json...
[13:53:02]JSON buffer locked. (3)
[13:53:02]JSON buffer released. (3)
[13:53:02]JSON buffer locked. (1)
[13:53:02]Reading settings from /cfg.json...
[13:53:02]initE: Attempting ETH config: 8
[13:53:02]PIN ALLOC: Pin 21 allocated by 0x81.
[13:53:02]PIN ALLOC: Pin 19 allocated by 0x81.
[13:53:02]PIN ALLOC: Pin 22 allocated by 0x81.
[13:53:02]PIN ALLOC: Pin 25 allocated by 0x81.
[13:53:02]PIN ALLOC: Pin 26 allocated by 0x81.
[13:53:02]PIN ALLOC: Pin 27 allocated by 0x81.
[13:53:02]PIN ALLOC: Pin 23 allocated by 0x81.
[13:53:02]PIN ALLOC: Pin 18 allocated by 0x81.
[13:53:02]PIN ALLOC: Pin 17 allocated by 0x81.
[13:53:02]PIN ALLOC: 0x0000000000000lX.
[13:53:04]initC: *** Ethernet successfully configured! ***
[13:53:04]Heap before buses: 149424
[13:53:04]PIN ALLOC: Pin 34 successfully allocated by 0x85.
[13:53:04]PIN ALLOC: 0x0000000000000lX.
[13:53:04]PIN ALLOC: Pin 33 successfully allocated by 0x87.
[13:53:04]PIN ALLOC: 0x0000000000000lX.
[13:53:04]Starting usermod config.
[13:53:04]JSON buffer released. (1)
[13:53:04]heap 149012
[13:53:04]Initializing strip
[13:53:04]Maximum LEDs on a bus: 30
[13:53:04]Digital buses: 8
[13:53:04]Heap before buses: 149012
[13:53:04]PIN ALLOC: Pin 0 successfully allocated by 0x82.
[13:53:04]PIN ALLOC: 0x0000000000000lX.
[13:53:04]Bus memory: 130B
[13:53:04]PIN ALLOC: Pin 14 successfully allocated by 0x82.
[13:53:04]PIN ALLOC: 0x0000000000000lX.
[13:53:04]Bus memory: 220B
[13:53:04]PIN ALLOC: Pin 2 successfully allocated by 0x82.
[13:53:04]PIN ALLOC: 0x0000000000000lX.
[13:53:04]Bus memory: 220B
[13:53:04]PIN ALLOC: Pin 3 successfully allocated by 0x82.
[13:53:04]PIN ALLOC: 0x0000000000000lX.
[13:53:04]Bus memory: 220B
[13:53:04]PIN ALLOC: Pin 4 successfully allocated by 0x82.
[13:53:04]PIN ALLOC: 0x0000000000000lX.
[13:53:04]Bus memory: 220B
[13:53:04]PIN ALLOC: Pin 5 successfully allocated by 0x82.
[13:53:04]PIN ALLOC: 0x0000000000000lX.
[13:53:04]Bus memory: 220B
[13:53:04]PIN ALLOC: Pin 12 successfully allocated by 0x82.
[13:53:04]PIN ALLOC: 0x0000000000000lX.
[13:53:04]Bus memory: 220B
[13:53:04]PIN ALLOC: Pin 13 successfully allocated by 0x82.
[13:53:04]PIN ALLOC: 0x0000000000000lX.
[13:53:04]Bus memory: 220B
[13:53:04]LED buffer size: 1940B/2210B
[13:53:04]Heap after buses: 197140
[13:53:04]Loading custom palettes
[13:53:04]Loading custom ledmaps
[13:53:04]strip buffer size: 120B
[13:53:04]Heap after strip init: 145760B
[13:53:04]-- Creating segment: 0x3ffdb948 [0,30:0,1]
[13:53:04]heap 145668
[13:53:04]Usermods setup
[13:53:04]PIN ALLOC: Pin 15 successfully allocated by 0x20.
[13:53:04]PIN ALLOC: 0x0000000000000lX.
[13:53:04]PIN ALLOC: Pin 32 successfully allocated by 0x20.
[13:53:04]PIN ALLOC: 0x0000000000000lX.
[13:53:04]PIN ALLOC: FAIL Pin 14 already allocated by 0x82.
[13:53:05]AR: Failed to initialize sound input driver. Please check input PIN settings.
[13:53:05]heap 145436
[13:53:05]WiFi-E: Event 0
[13:53:05]WiFi: Defaulf SSID (Your_Network) used.
[13:53:05]WiFi-E: Event 2
[13:53:05]DMX input disabled due to rxPin, enPin or txPin not set
[13:53:05]initServer
[13:53:05]heap 111312
[13:53:05]initIR
[13:53:05]heap 111312
[13:53:05]Initial connect or forced reconnect (@ 3s).
[13:53:05]WiFi: Defaulf SSID (Your_Network) used.
[13:53:05]initConnection() called @ 3s.
[13:53:05]WiFi-E: Event 3
[13:53:05]WiFi-E: Event 0
[13:53:05]WiFi-E: Event 2
[13:53:05]No connection configured.
[13:53:05]Opening access point WLED-AP1
[13:53:05]WiFi-E: AP Started
[13:53:05]Init AP interfaces
[13:53:05]WiFi-E: AP Stopped
[13:53:05]WiFi-E: AP Started
[13:53:05]Loop took 514ms.
[13:53:05]Usermods took 0ms.
[13:53:05]Strip took 2ms.
[13:53:05]
[13:53:05]Connected! IP address: 192.168.137.173 <<< Boot with Eth connected ignores the set static IP Address
[13:53:05]Init STA interfaces
[13:53:05]WiFi-E: Event 22
[13:53:05]mDNS started
[13:53:05]WiFi-E: AP Stopped
[13:53:05]Access point disabled (connected).
[13:53:05]WiFi-E: AP Started
[13:53:05]WiFi-E: AP Stopped
[13:53:05]Loop took 38ms.
[13:53:05]Usermods took 0ms.
[13:53:05]Strip took 0ms.
[13:53:32]---DEBUG INFO---
[13:53:32]Runtime: 30000
[13:53:32]Unix time: 30,000
[13:53:32]=== Memory Info ===
[13:53:32]DRAM 8-bit: Free: 82632 bytes | Largest block: 73716 bytes
[13:53:32]DRAM 32-bit: Free: 51108 bytes | Largest block: N/A
[13:53:32]TX power: 65/78
[13:53:32]Wifi state: 6
[13:53:32]ESP-NOW state: 0
[13:53:32]State time: 30011
[13:53:32]NTP last sync: 999000000
[13:53:32]Client IP: 192.168.137.173
[13:53:32]Loops/sec: 1907
[13:53:32]Loop time[ms]: 0/514
[13:53:32]UM time[ms]: 0/1
[13:53:32]Strip time[ms]:0/2
[13:53:32]Segments: 1 -> 196/0B
[13:53:32] Seg: 30,1 [A=1, 2D=0, RGB=1, W=0, CCT=0]
[13:53:32]Modes: 4*218=872B
[13:53:32]Data: 4*218=872B
[13:53:32]Map: 2*0=0B
[13:53:32]Web server status: Idle
[13:54:02]Local time: 00:01
[13:54:02]---DEBUG INFO---
[13:54:02]Runtime: 60042
[13:54:02]Unix time: 60,042
[13:54:02]=== Memory Info ===
[13:54:02]DRAM 8-bit: Free: 82460 bytes | Largest block: 73716 bytes
[13:54:02]DRAM 32-bit: Free: 51108 bytes | Largest block: N/A
[13:54:02]TX power: 65/78
[13:54:02]Wifi state: 6
[13:54:02]ESP-NOW state: 0
[13:54:02]State time: 30011
[13:54:02]NTP last sync: 999000000
[13:54:02]Client IP: 192.168.137.173
[13:54:02]Loops/sec: 2160
[13:54:02]Loop time[ms]: 0/16
[13:54:02]UM time[ms]: 0/1
[13:54:02]Strip time[ms]:0/1
[13:54:02]Segments: 1 -> 196/0B
[13:54:02] Seg: 30,1 [A=1, 2D=0, RGB=1, W=0, CCT=0]
[13:54:02]Modes: 4*218=872B
[13:54:02]Data: 4*218=872B
[13:54:02]Map: 2*0=0B
[13:54:02]Web server status: Idle
[13:54:32]---DEBUG INFO---
[13:54:32]Runtime: 90084
[13:54:32]Unix time: 90,084
[13:54:32]=== Memory Info ===
[13:54:32]DRAM 8-bit: Free: 82460 bytes | Largest block: 73716 bytes
[13:54:32]DRAM 32-bit: Free: 51108 bytes | Largest block: N/A
[13:54:32]TX power: 65/78
[13:54:32]Wifi state: 6
[13:54:32]ESP-NOW state: 0
[13:54:32]State time: 30011
[13:54:32]NTP last sync: 999000000
[13:54:32]Client IP: 192.168.137.173
[13:54:32]Loops/sec: 2155
[13:54:32]Loop time[ms]: 0/2
[13:54:32]UM time[ms]: 0/1
[13:54:32]Strip time[ms]:0/1
[13:54:32]Segments: 1 -> 196/0B
[13:54:32] Seg: 30,1 [A=1, 2D=0, RGB=1, W=0, CCT=0]
[13:54:32]Modes: 4*218=872B
[13:54:32]Data: 4*218=872B
[13:54:32]Map: 2*0=0B
[13:54:32]Web server status: Idle
[13:55:02]Local time: 00:02
[13:55:02]---DEBUG INFO---
[13:55:02]Runtime: 120126
[13:55:02]Unix time: 120,126
[13:55:02]=== Memory Info ===
[13:55:02]DRAM 8-bit: Free: 82460 bytes | Largest block: 73716 bytes
[13:55:02]DRAM 32-bit: Free: 51108 bytes | Largest block: N/A
[13:55:02]TX power: 65/78
[13:55:02]Wifi state: 6
[13:55:02]ESP-NOW state: 0
[13:55:02]State time: 30011
[13:55:02]NTP last sync: 999000000
[13:55:02]Client IP: 192.168.137.173
[13:55:02]Loops/sec: 2156
[13:55:02]Loop time[ms]: 0/2
[13:55:02]UM time[ms]: 0/1
[13:55:02]Strip time[ms]:0/1
[13:55:02]Segments: 1 -> 196/0B
[13:55:02] Seg: 30,1 [A=1, 2D=0, RGB=1, W=0, CCT=0]
[13:55:02]Modes: 4*218=872B
[13:55:02]Data: 4*218=872B
[13:55:02]Map: 2*0=0B
[13:55:02]Web server status: Idle
[13:55:10]ETH-E: Disconnected <<< Manually disconnected Ethernet
[13:55:10]Initial connect or forced reconnect (@ 128s).
[13:55:10]WiFi: Defaulf SSID (Your_Network) used.
[13:55:10]initConnection() called @ 128s.
[13:55:10]WiFi-E: Event 3
[13:55:10]WiFi-E: Event 0
[13:55:10]WiFi-E: Event 2
[13:55:10]No connection configured.
[13:55:10]Opening access point WLED-AP1
[13:55:10]WiFi-E: AP Started
[13:55:10]Init AP interfaces
[13:55:10]WiFi-E: AP Stopped
[13:55:10]WiFi-E: AP Started
[13:55:10]Loop took 516ms.
[13:55:11]Usermods took 0ms.
[13:55:11]Strip took 1ms.
[13:55:14]ETH-E: Connected <<< Manually reconnected Ethernet
[13:55:14]
[13:55:14]Connected! IP address: 192.168.137.11 <<< Eth detection after boot picks up the static IP Address
[13:55:14]Init STA interfaces
[13:55:14]WiFi-E: Event 22
[13:55:14]mDNS started
[13:55:14]WiFi-E: AP Stopped
[13:55:14]Access point disabled (connected).
[13:55:14]WiFi-E: AP Started
[13:55:14]WiFi-E: AP Stopped
[13:55:14]Loop took 48ms.
[13:55:14]Usermods took 0ms.
[13:55:14]Strip took 2ms.
*** WLED 0.16.0-alpha 2506160 debug log - no DHCP on router ***
Using 'COM7' as serial port.
Unexpected error: could not open port 'COM7': PermissionError(13, 'Access is denied.', None, 5)
[16:45:15]ets Jul 29 2019 12:21:46
[16:45:15]
[16:45:15]rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
[16:45:15]configsip: 0, SPIWP:0xee
[16:45:15]clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
[16:45:15]mode:DIO, clock div:2
[16:45:15]load:0x3fff0030,len:1184
[16:45:15]load:0x40078000,len:13132
[16:45:15]load:0x40080400,len:3036
[16:45:15]entry 0x400805e4
[16:45:16]
[16:45:16]---WLED 0.16.0-alpha 2506160 INIT---
[16:45:16]
[16:45:16]esp32 4.4.4.20230310
[16:45:16]arduino-esp32 v2.0.9
[16:45:16]CPU: ESP32-D0WD-V3 rev.3, 2 core(s), 240 MHz.
[16:45:16]FLASH: 16 MB, Mode 2 (DIO), speed 40 MHz.
[16:45:16]heap 179452
[16:45:16]TX power: 78/78
[16:45:16]PIN ALLOC: Pin 1 successfully allocated by 0x89.
[16:45:16]PIN ALLOC: 0x0000000000000lX.
[16:45:16]heap 179452
[16:45:16]checking for bootloop: time -2042101479, counter -467163098, action -857987618
[16:45:16]Valid JSON file /cfg.json
[16:45:16]Reading config
[16:45:16]Reading settings from /wsec.json...
[16:45:16]JSON buffer locked. (3)
[16:45:16]JSON buffer released. (3)
[16:45:16]JSON buffer locked. (1)
[16:45:16]Reading settings from /cfg.json...
[16:45:16]initE: Attempting ETH config: 8
[16:45:16]PIN ALLOC: Pin 21 allocated by 0x81.
[16:45:16]PIN ALLOC: Pin 19 allocated by 0x81.
[16:45:16]PIN ALLOC: Pin 22 allocated by 0x81.
[16:45:16]PIN ALLOC: Pin 25 allocated by 0x81.
[16:45:16]PIN ALLOC: Pin 26 allocated by 0x81.
[16:45:16]PIN ALLOC: Pin 27 allocated by 0x81.
[16:45:16]PIN ALLOC: Pin 23 allocated by 0x81.
[16:45:16]PIN ALLOC: Pin 18 allocated by 0x81.
[16:45:16]PIN ALLOC: Pin 17 allocated by 0x81.
[16:45:16]PIN ALLOC: 0x0000000000000lX.
[16:45:17]initC: *** Ethernet successfully configured! ***
[16:45:17]Heap before buses: 149424
[16:45:17]PIN ALLOC: Pin 34 successfully allocated by 0x85.
[16:45:17]PIN ALLOC: 0x0000000000000lX.
[16:45:17]PIN ALLOC: Pin 33 successfully allocated by 0x87.
[16:45:17]PIN ALLOC: 0x0000000000000lX.
[16:45:17]Starting usermod config.
[16:45:17]JSON buffer released. (1)
[16:45:17]heap 149012
[16:45:17]Initializing strip
[16:45:17]Maximum LEDs on a bus: 30
[16:45:17]Digital buses: 8
[16:45:17]Heap before buses: 149012
[16:45:17]PIN ALLOC: Pin 0 successfully allocated by 0x82.
[16:45:17]PIN ALLOC: 0x0000000000000lX.
[16:45:17]Bus memory: 130B
[16:45:17]PIN ALLOC: Pin 14 successfully allocated by 0x82.
[16:45:17]PIN ALLOC: 0x0000000000000lX.
[16:45:17]Bus memory: 220B
[16:45:17]PIN ALLOC: Pin 2 successfully allocated by 0x82.
[16:45:17]PIN ALLOC: 0x0000000000000lX.
[16:45:17]Bus memory: 220B
[16:45:17]PIN ALLOC: Pin 3 successfully allocated by 0x82.
[16:45:17]PIN ALLOC: 0x0000000000000lX.
[16:45:17]Bus memory: 220B
[16:45:17]PIN ALLOC: Pin 4 successfully allocated by 0x82.
[16:45:17]PIN ALLOC: 0x0000000000000lX.
[16:45:17]Bus memory: 220B
[16:45:17]PIN ALLOC: Pin 5 successfully allocated by 0x82.
[16:45:17]PIN ALLOC: 0x0000000000000lX.
[16:45:17]Bus memory: 220B
[16:45:17]PIN ALLOC: Pin 12 successfully allocated by 0x82.
[16:45:17]PIN ALLOC: 0x0000000000000lX.
[16:45:17]Bus memory: 220B
[16:45:17]PIN ALLOC: Pin 13 successfully allocated by 0x82.
[16:45:17]PIN ALLOC: 0x0000000000000lX.
[16:45:17]Bus memory: 220B
[16:45:17]LED buffer size: 1940B/2210B
[16:45:17]Heap after buses: 197140
[16:45:17]Loading custom palettes
[16:45:17]Loading custom ledmaps
[16:45:17]strip buffer size: 120B
[16:45:17]Heap after strip init: 145760B
[16:45:17]-- Creating segment: 0x3ffdb948 [0,30:0,1]
[16:45:17]heap 145668
[16:45:17]Usermods setup
[16:45:18]PIN ALLOC: Pin 15 successfully allocated by 0x20.
[16:45:18]PIN ALLOC: 0x0000000000000lX.
[16:45:18]PIN ALLOC: Pin 32 successfully allocated by 0x20.
[16:45:18]PIN ALLOC: 0x0000000000000lX.
[16:45:18]PIN ALLOC: FAIL Pin 14 already allocated by 0x82.
[16:45:18]AR: Failed to initialize sound input driver. Please check input PIN settings.
[16:45:18]heap 145436
[16:45:18]WiFi-E: Event 0
[16:45:18]WiFi: Defaulf SSID (Your_Network) used.
[16:45:18]WiFi-E: Event 2
[16:45:18]DMX input disabled due to rxPin, enPin or txPin not set
[16:45:18]initServer
[16:45:18]heap 111312
[16:45:18]initIR
[16:45:18]heap 111312
[16:45:18]Initial connect or forced reconnect (@ 3s).
[16:45:18]WiFi: Defaulf SSID (Your_Network) used.
[16:45:18]initConnection() called @ 3s.
[16:45:18]WiFi-E: Event 3
[16:45:18]WiFi-E: Event 0
[16:45:18]WiFi-E: Event 2
[16:45:18]No connection configured.
[16:45:18]Opening access point WLED-AP1
[16:45:18]WiFi-E: AP Started
[16:45:19]Init AP interfaces
[16:45:19]WiFi-E: AP Stopped
[16:45:19]WiFi-E: AP Started
[16:45:19]Loop took 513ms.
[16:45:19]Usermods took 0ms.
[16:45:19]Strip took 1ms.
[16:45:45]---DEBUG INFO---
[16:45:45]Runtime: 30000
[16:45:45]Unix time: 30,000
[16:45:45]=== Memory Info ===
[16:45:45]DRAM 8-bit: Free: 83956 bytes | Largest block: 81908 bytes
[16:45:45]DRAM 32-bit: Free: 51108 bytes | Largest block: N/A
[16:45:45]TX power: 63/78
[16:45:45]Wifi state: 6
[16:45:45]ESP-NOW state: 0
[16:45:45]State time: 30011
[16:45:45]NTP last sync: 999000000
[16:45:45]Client IP: 192.168.137.11 <<< Static IP used (DHCP not enabled on router), but doesn't connect.
[16:45:45]Loops/sec: 1387
[16:45:45]Loop time[ms]: 0/513
[16:45:45]UM time[ms]: 0/1
[16:45:45]Strip time[ms]:0/2
[16:45:45]Segments: 1 -> 196/0B
[16:45:45] Seg: 30,1 [A=1, 2D=0, RGB=1, W=0, CCT=0]
[16:45:45]Modes: 4*218=872B
[16:45:45]Data: 4*218=872B
[16:45:45]Map: 2*0=0B
[16:45:45]Web server status: Idle
[16:46:15]Local time: 00:01
[16:46:15]---DEBUG INFO---
[16:46:15]Runtime: 60042
[16:46:15]Unix time: 60,042
[16:46:15]=== Memory Info ===
[16:46:15]DRAM 8-bit: Free: 83956 bytes | Largest block: 81908 bytes
[16:46:15]DRAM 32-bit: Free: 51108 bytes | Largest block: N/A
[16:46:15]TX power: 63/78
[16:46:15]Wifi state: 6
[16:46:15]ESP-NOW state: 0
[16:46:15]State time: 30011
[16:46:15]NTP last sync: 999000000
[16:46:15]Client IP: 192.168.137.11
[16:46:15]Loops/sec: 1583
[16:46:15]Loop time[ms]: 0/2
[16:46:15]UM time[ms]: 0/1
[16:46:15]Strip time[ms]:0/1
[16:46:15]Segments: 1 -> 196/0B
[16:46:15] Seg: 30,1 [A=1, 2D=0, RGB=1, W=0, CCT=0]
[16:46:15]Modes: 4*218=872B
[16:46:15]Data: 4*218=872B
[16:46:15]Map: 2*0=0B
[16:46:15]Web server status: Idle
[16:46:21]ETH-E: Disconnected <<< Ethernet unplugged
[16:46:21]Initial connect or forced reconnect (@ 66s).
[16:46:21]WiFi: Defaulf SSID (Your_Network) used.
[16:46:21]initConnection() called @ 66s.
[16:46:21]WiFi-E: Event 3
[16:46:21]WiFi-E: Event 2
[16:46:21]No connection configured.
[16:46:25]ETH-E: Connected <<< Ethernet reconnected
[16:46:25]WiFi-E: Event 22
[16:46:25]
[16:46:25]Connected! IP address: 192.168.137.11 <<< Static IP Address used and now connected
[16:46:25]Init STA interfaces
[16:46:25]mDNS started
[16:46:25]WiFi-E: AP Stopped
[16:46:25]Access point disabled (connected).
[16:46:25]WiFi-E: AP Started
[16:46:25]WiFi-E: AP Stopped
[16:46:25]Loop took 36ms.
[16:46:25]Usermods took 0ms.
[16:46:25]Strip took 0ms.
*** WLED CONFIG ***
{"rev":[1,0],"vid":2506160,"id":{"mdns":"wled-adcb90","name":"WLED","sui":false},"nw":{"espnow":false,"linked_remote":[],"ins":[{"ssid":"Your_Network","pskl":0,"bssid":"","ip":[192,168,137,11],"gw":[192,168,137,1],"sn":[255,255,255,0]}],"dns":[192,168,137,1]},"ap":{"ssid":"WLED-AP1","pskl":8,"chan":6,"hide":0,"behav":0,"ip":[4,3,2,1]},"wifi":{"sleep":false,"phy":false,"txpwr":78},"eth":{"type":8,"pin":[21,19,22,25,26,27,23,18,17]},"hw":{"led":{"total":30,"maxpwr":0,"cct":false,"cr":false,"ic":false,"cb":0,"fps":0,"rgbwm":255,"prl":false,"ins":[{"start":0,"len":30,"pin":[0],"order":0,"rev":false,"skip":0,"type":22,"ref":false,"rgbwm":0,"freq":0,"maxpwr":0,"ledma":55,"text":""},{"start":0,"len":30,"pin":[14],"order":0,"rev":false,"skip":0,"type":22,"ref":false,"rgbwm":0,"freq":0,"maxpwr":0,"ledma":55,"text":""},{"start":0,"len":30,"pin":[2],"order":0,"rev":false,"skip":0,"type":22,"ref":false,"rgbwm":0,"freq":0,"maxpwr":0,"ledma":55,"text":""},{"start":0,"len":30,"pin":[3],"order":0,"rev":false,"skip":0,"type":22,"ref":false,"rgbwm":0,"freq":0,"maxpwr":0,"ledma":55,"text":""},{"start":0,"len":30,"pin":[4],"order":0,"rev":false,"skip":0,"type":22,"ref":false,"rgbwm":0,"freq":0,"maxpwr":0,"ledma":55,"text":""},{"start":0,"len":30,"pin":[5],"order":0,"rev":false,"skip":0,"type":22,"ref":false,"rgbwm":0,"freq":0,"maxpwr":0,"ledma":55,"text":""},{"start":0,"len":30,"pin":[12],"order":0,"rev":false,"skip":0,"type":22,"ref":false,"rgbwm":0,"freq":0,"maxpwr":0,"ledma":55,"text":""},{"start":0,"len":30,"pin":[13],"order":0,"rev":false,"skip":0,"type":22,"ref":false,"rgbwm":0,"freq":0,"maxpwr":0,"ledma":55,"text":""}]},"com":[],"btn":{"max":32,"pull":true,"ins":[{"type":2,"pin":[34],"macros":[0,0,0]}],"tt":32,"mqtt":false},"ir":{"pin":-1,"type":0,"sel":true},"relay":{"pin":33,"rev":false,"odrain":false},"baud":1152,"if":{"i2c-pin":[-1,-1],"spi-pin":[-1,-1,-1]}},"light":{"scale-bri":100,"pal-mode":0,"aseg":false,"gc":{"bri":1,"col":1,"val":2.2},"tr":{"dur":7,"rpc":5,"hrp":true},"nl":{"mode":1,"dur":60,"tbri":0,"macro":0}},"def":{"ps":0,"on":true,"bri":128},"if":{"sync":{"port0":21324,"port1":65506,"espnow":false,"recv":{"bri":true,"col":true,"fx":true,"pal":true,"grp":1,"seg":false,"sb":false},"send":{"en":false,"dir":true,"btn":true,"va":false,"hue":false,"grp":1,"ret":0}},"nodes":{"list":true,"bcast":true},"live":{"en":true,"mso":false,"rlm":true,"port":5568,"mc":false,"dmx":{"uni":1,"seqskip":false,"e131prio":0,"addr":1,"dss":0,"mode":4,"inputRxPin":0,"inputTxPin":0,"inputEnablePin":0,"dmxInputPort":2},"timeout":25,"maxbri":false,"no-gc":true,"offset":0},"mqtt":{"en":false,"broker":"","port":1883,"user":"","pskl":0,"cid":"WLED-adcb90","rtn":false,"topics":{"device":"wled/adcb90","group":"wled/all"}},"ntp":{"en":false,"host":"0.wled.pool.ntp.org","tz":0,"offset":0,"ampm":false,"ln":0,"lt":0}},"ol":{"clock":0,"cntdwn":false,"min":0,"max":29,"o12pix":0,"o5m":false,"osec":false,"osb":false},"timers":{"cntdwn":{"goal":[20,1,1,0,0,0],"macro":0},"ins":[]},"ota":{"lock":false,"lock-wifi":false,"pskl":7,"aota":false,"same-subnet":true},"um":{"AudioReactive":{"enabled":false,"add-palettes":false,"analogmic":{"pin":-1},"digitalmic":{"type":1,"pin":[32,15,14,-1]},"config":{"squelch":10,"gain":60,"AGC":0},"frequency":{"scale":3},"dynamics":{"limiter":true,"rise":80,"fall":1400},"sync":{"port":11988,"mode":0}}}}Anything else?
No response
Code of Conduct
- I agree to follow this project's Code of Conduct
Activity
DedeHai commentedon Dec 31, 2025
@coderabbitai please check the code and indicate configuration paths that would lead to the problem described.
coderabbitai commentedon Dec 31, 2025
🧩 Analysis chain
🏁 Script executed:
Length of output: 23429
🏁 Script executed:
Length of output: 48420
🏁 Script executed:
Length of output: 9475
@DedeHai, I've identified the root cause of the ethernet static IP issue. Here's the detailed analysis:
Problem Root Cause
The issue is in
wled00/network.cpp- the static IP configuration happens too late in the ethernet initialization sequence.Configuration Path Leading to the Problem
When static IP is configured for ethernet:
multiWiFi[0].staticIP= 192.168.137.11 (from cfg.json)multiWiFi[0].staticGW= 192.168.137.1multiWiFi[0].staticSN= 255.255.255.0Code Execution Flow (Boot Sequence)
deserializeConfigFromFS()is called during bootinitEthernet()ETH.begin()is called, which starts ethernet hardware asynchronouslyARDUINO_EVENT_ETH_CONNECTEDevent handler:The Bug
Line 410 is TOO LATE - by the time
ARDUINO_EVENT_ETH_CONNECTEDfires, the ethernet link is already established and:Why Reconnecting Fixes It
When you unplug and replug the ethernet cable:
ARDUINO_EVENT_ETH_DISCONNECTEDfiresARDUINO_EVENT_ETH_CONNECTEDfires againETH.config()runs at the right moment during reconnectionComparison with WiFi (Correct Implementation)
In wled00/wled.cpp:657-661, WiFi correctly applies static IP BEFORE connecting:
The Fix
Move the
ETH.config()call from the event handler (line 409-413) to immediately afterETH.begin()in theinitEthernet()function (after line 248 in network.cpp). This ensures static IP is configured before the ethernet link negotiation completes.The configuration should happen in
initEthernet()right after the successfulETH.begin()call, similar to how WiFi does it.DedeHai commentedon Dec 31, 2025
@brettbear thanks for reporting this. are you able to test the rabbits suggestion?
brettbear commentedon Jan 1, 2026
@DedeHai - I'm not familiar with this project, but gave it a try (was unsuccessful).
To reiterate... this is the first time I've looked into the code for this project... have done some reverse engineering to try and understand it but I'm sure I'm oblivious to various nuances that others (like yourself) are aware of.
I think the suggestion was on the right track, however, there's more to the issue.
The reason WiFi doesn't have the issue seems to be because WLED setup() inits the ethernet (at the same time as parsing the config Json), while WLED loop() inits WiFi (via handleConnection() and initConnection()) well after setup (and the config file has been parsed).
Summary of what I did to get it to work...
Cut https://github.com/wled/WLED/blob/main/wled00/network.cpp#L409-L413
Insert the code code here https://github.com/wled/WLED/blob/main/wled00/network.cpp#L249
Cut https://github.com/wled/WLED/blob/main/wled00/cfg.cpp#L52-L57
Insert the code here https://github.com/wled/WLED/blob/main/wled00/cfg.cpp#L120
Not sure if the above changes will break something else or if there might be other config settings that are no loading values.
DedeHai commentedon Jan 1, 2026
@coderabbitai as mentioned, there is an additional change needed: move the
initEthernet();indeserializeConfig()to after the static IP is read from the config. Is this the correct way to do it i.e. will this break any existing functionlity or is it the correct order?coderabbitai commentedon Jan 1, 2026
🧩 Analysis chain
🏁 Script executed:
Length of output: 50241
🏁 Script executed:
Length of output: 13375
🏁 Script executed:
Length of output: 4303
@DedeHai, yes, brettbear's approach is correct and won't break existing functionality. However, the complete fix requires two changes:
Analysis of the Changes
Change 1: Move
initEthernet()call in cfg.cpp ✅ SAFECurrent location: Lines 52-57 (before multiWiFi is populated)
New location: Line 120 (after multiWiFi is populated)
Why this is safe:
cmDNS,serverDescription,alexaInvocationName,simplifiedUI, ESP-NOW settings, andlinked_remotesinitEthernet()function itself doesn't usemultiWiFi- it only usesethernetTypeandethernetBoardsconfigurationChange 2: Move
ETH.config()call in network.cpp ✅ REQUIREDCurrent location: Lines 409-413 (in
ARDUINO_EVENT_ETH_CONNECTEDevent handler)New location: Inside
initEthernet()function, immediately afterETH.begin()succeeds (after line 248)Why this is needed:
Why Both Changes Are Necessary
This approach mirrors how WiFi does it (in wled.cpp lines 657-661), where
WiFi.config()is called beforeWiFi.begin().Impact on Existing Functionality
✅ No breaking changes - The order of operations becomes:
ethernetTypefrom configmultiWiFisettings from configThe code between the old and new
initEthernet()call locations doesn't depend on ethernet being initialized, so moving it is completely safe.🧠 Learnings used
DedeHai commentedon Jan 1, 2026
@brettbear you findings are correct, the only thing I am not sure about is if the ETH init should be done after dns is read from config as I do not know when or where that is used, I am not too familiar with how the network initialization works in detail.
do you want to prepare a PR with your changes? Otherwise we can task copilot to do it.
brettbear commentedon Jan 1, 2026
I'll do some digging into the DNS @DedeHai and if I can't see anything sus, I'll submit a PR. Will update you.
brettbear commentedon Jan 2, 2026
@DedeHai
ETH.config() at line https://github.com/wled/WLED/blob/main/wled00/network.cpp#L410 also configures DNS when setting the IP Address, gateway and subnet...
ETH.config(multiWiFi[0].staticIP, multiWiFi[0].staticGW, multiWiFi[0].staticSN, dnsAddress);This implies that DNS settings must be parsed from the config before initEthernet() is called.
PR submitted.
Add independent Ethernet/WiFi IP config and primary network interface…
Add independent Ethernet/WiFi IP config and primary network interface…
Add independent Ethernet/WiFi IP config and primary network interface…
Add independent Ethernet/WiFi IP config and primary network interface…
Add independent Ethernet/WiFi IP config and primary network interface…
Add independent Ethernet/WiFi IP config and primary network interface…
Make Ethernet addressing a runtime setting with link-local fallback
Ethernet: self-assign a link-local address when DHCP does not answer
Ethernet: self-assign a link-local address when DHCP does not answer
Ethernet: self-assign a link-local address when DHCP does not answer
Add W5500 SPI Ethernet support for ESP32-S3
Add W5500 SPI Ethernet support for ESP32-S3