I can't get "Multiple Ethernet Example" provided with ESP-IDF to work.

mngrego
Posts: 4
Joined: Thu Sep 04, 2025 2:55 pm

I can't get "Multiple Ethernet Example" provided with ESP-IDF to work.

Postby mngrego » Thu Sep 04, 2025 3:04 pm

I have the ESP32 dev kit (ESP32-ETHERNET-KIT-VE) and I'm trying to run the example called, "Multiple Ethernet Example."
The only thing I changed using menuconfig was to set the SSID and password of my wifi network here. When I compile and run the example, both the ethernet and wifi tasks fail and exit after initialization and connecting. The output from the terminal window is below. Any help on what I'm doing wrong would be much appreciated.

Code: Select all

rst:0x1 (POWERON_RESET),boot:0x16 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:6372
load:0x40078000,len:15920
ho 0 tail 12 room 4
load:0x40080400,len:3880
--- 0x40080400: _invalid_pc_placeholder at /home/greg/esp/esp-idf/components/xtensa/xtensa_vectors.S:2235
entry 0x40080638
I (29) boot: ESP-IDF v6.0-dev-1489-g4e036983a7 2nd stage bootloader
I (29) boot: compile time Sep  3 2025 13:25:04
I (29) boot: Multicore bootloader
I (32) boot: chip revision: v3.1
I (35) boot.esp32: SPI Speed      : 40MHz
I (39) boot.esp32: SPI Mode       : DIO
I (42) boot.esp32: SPI Flash Size : 2MB
I (46) boot: Enabling RNG early entropy source...
I (50) boot: Partition Table:
I (53) boot: ## Label            Usage          Type ST Offset   Length
I (59) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (66) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (72) boot:  2 factory          factory app      00 00 00010000 00100000
I (79) boot: End of partition table
I (82) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=1cd88h (118152) map
I (131) esp_image: segment 1: paddr=0002cdb0 vaddr=3ffb0000 size=03268h ( 12904) load
I (137) esp_image: segment 2: paddr=00030020 vaddr=400d0020 size=8de18h (581144) map
I (342) esp_image: segment 3: paddr=000bde40 vaddr=3ffb3268 size=00f2ch (  3884) load
I (344) esp_image: segment 4: paddr=000bed74 vaddr=40080000 size=183b4h ( 99252) load
I (386) esp_image: segment 5: paddr=000d7130 vaddr=50000000 size=00024h (    36) load
I (399) boot: Loaded app from partition at offset 0x10000
I (399) boot: Disabling RNG early entropy source...
I (409) cpu_start: Multicore app
I (418) cpu_start: GPIO 3 and 1 are used as console UART I/O pins
I (418) cpu_start: Pro cpu start user code
I (418) cpu_start: cpu freq: 160000000 Hz
I (420) app_init: Application information:
I (424) app_init: Project name:     tcp_client_multiple
I (429) app_init: App version:      1
I (432) app_init: Compile time:     Sep  3 2025 14:08:56
I (437) app_init: ELF file SHA256:  0ba693100...
I (441) app_init: ESP-IDF:          v6.0-dev-1489-g4e036983a7
I (447) efuse_init: Min chip rev:     v0.0
I (451) efuse_init: Max chip rev:     v3.99 
I (455) efuse_init: Chip rev:         v3.1
I (459) heap_init: Initializing. RAM available for dynamic allocation:
I (465) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (470) heap_init: At 3FFB8790 len 00027870 (158 KiB): DRAM
I (475) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (480) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (486) heap_init: At 400983B4 len 00007C4C (31 KiB): IRAM
I (493) spi_flash: detected chip: generic
I (495) spi_flash: flash io: dio
W (498) spi_flash: Detected size(4096k) larger than the size in the binary image header(2048k). Using the size in the binary image header.
I (511) main_task: Started on CPU0
I (521) main_task: Calling app_main()
I (611) esp_eth.netif.netif_glue: 34:5f:45:3e:16:5b
I (611) esp_eth.netif.netif_glue: ethernet attached to netif
I (3411) ethernet_connect: Waiting for IP(s).
I (4671) esp_netif_handlers: example_netif_eth ip: 192.168.1.27, mask: 255.255.255.0, gw: 192.168.1.1
I (4671) ethernet_connect: Got IPv4 event: Interface "example_netif_eth" address: 192.168.1.27
I (4671) example_connect: Start example_connect.
I (4691) wifi:wifi driver task: 3ffc3fd4, prio:23, stack:6656, core=0
I (4701) wifi:wifi firmware version: 5984c42
I (4701) wifi:wifi certification version: v7.0
I (4701) wifi:config NVS flash: enabled
I (4701) wifi:config nano formatting: disabled
I (4711) wifi:Init data frame dynamic rx buffer num: 32
I (4711) wifi:Init static rx mgmt buffer num: 5
I (4721) wifi:Init management short buffer num: 32
I (4721) wifi:Init dynamic tx buffer num: 32
I (4731) wifi:Init static rx buffer size: 1600
I (4731) wifi:Init static rx buffer num: 10
I (4731) wifi:Init dynamic rx buffer num: 32
I (4741) wifi_init: rx ba win: 6
I (4741) wifi_init: accept mbox: 6
I (4741) wifi_init: tcpip mbox: 32
I (4751) wifi_init: udp mbox: 6
I (4751) wifi_init: tcp mbox: 6
I (4751) wifi_init: tcp tx win: 5760
I (4761) wifi_init: tcp rx win: 5760
I (4761) wifi_init: tcp mss: 1440
I (4761) wifi_init: WiFi IRAM OP enabled
I (4771) wifi_init: WiFi RX IRAM OP enabled
I (4771) phy_init: phy_version 4860,6b7a6e5,Feb  6 2025,14:47:07
I (4851) wifi:mode : sta (34:5f:45:3e:16:58)
I (4851) wifi:enable tsf
I (4851) example_connect: Connecting to aaa...
W (4851) wifi:Password length matches WPA2 standards, authmode threshold changes from OPEN to WPA2
I (4861) example_connect: Waiting for IP(s)
I (7521) wifi:new:<11,0>, old:<1,0>, ap:<255,255>, sta:<11,0>, prof:1, snd_ch_cfg:0x0
I (7521) wifi:state: init -> auth (0xb0)
I (7531) wifi:state: auth -> assoc (0x0)
I (7531) wifi:state: assoc -> run (0x10)
I (7541) wifi:<ba-add>idx:0 (ifx:0, e6:f4:c6:1c:9e:dc), tid:5, ssn:0, winSize:64
I (7561) wifi:connected with aaa, aid = 4, channel 11, BW20, bssid = e6:f4:c6:1c:9e:dc
I (7561) wifi:security: WPA2-PSK, phy: bgn, rssi: -45
I (7561) wifi:pm start, type: 1

I (7681) wifi:AP's beacon interval = 204800 us, DTIM period = 2
I (8101) wifi:<ba-add>idx:1 (ifx:0, e6:f4:c6:1c:9e:dc), tid:6, ssn:0, winSize:64
I (9921) esp_netif_handlers: example_netif_sta ip: 192.168.1.55, mask: 255.255.255.0, gw: 192.168.1.1
I (9921) example_connect: Got IPv4 event: Interface "example_netif_sta" address: 192.168.1.55
I (9921) example_common: Connected to example_netif_eth
I (9931) example_common: - IPv4 address: 192.168.1.27,
I (9931) example_common: Connected to example_netif_sta
I (9941) example_common: - IPv4 address: 192.168.1.55,
E (9941) tcp_client_multiple: app_connection_task with netif desc:eth Failed! exiting
E (9951) tcp_client_multiple: app_connection_task with netif desc:sta Failed! exiting
I (9961) main_task: Returned from app_main()

nopnop2002
Posts: 362
Joined: Thu Oct 03, 2019 10:52 pm
Contact:

Re: I can't get "Multiple Ethernet Example" provided with ESP-IDF to work.

Postby nopnop2002 » Fri Sep 05, 2025 7:30 am

Looking at the log below, the two IP addresses are assigned correctly, but it appears that the TCP server cannot be connected to.
TCP server may not be running.

Code: Select all

I (9921) example_common: Connected to example_netif_eth
I (9931) example_common: - IPv4 address: 192.168.1.27,
I (9931) example_common: Connected to example_netif_sta
I (9941) example_common: - IPv4 address: 192.168.1.55,
E (9941) tcp_client_multiple: app_connection_task with netif desc:eth Failed! exiting
E (9951) tcp_client_multiple: app_connection_task with netif desc:sta Failed! exiting

mngrego
Posts: 4
Joined: Thu Sep 04, 2025 2:55 pm

Re: I can't get "Multiple Ethernet Example" provided with ESP-IDF to work.

Postby mngrego » Thu Sep 11, 2025 3:01 pm

I tested the default TCP server (baidu.com) using https://check-host.net/ and they seem to have their TCP port up and running. I also tried changing the TCP server to Google and still get the same result. Do you have any other ideas what could cause this error?

nopnop2002
Posts: 362
Joined: Thu Oct 03, 2019 10:52 pm
Contact:

Re: I can't get "Multiple Ethernet Example" provided with ESP-IDF to work.

Postby nopnop2002 » Fri Sep 12, 2025 10:49 pm

"Multiple Ethernet Example."

Where is this project published?

mngrego
Posts: 4
Joined: Thu Sep 04, 2025 2:55 pm

Re: I can't get "Multiple Ethernet Example" provided with ESP-IDF to work.

Postby mngrego » Mon Sep 15, 2025 3:08 pm

The example code I'm using is this:
https://github.com/espressif/esp-idf/tr ... _multi_net

nopnop2002
Posts: 362
Joined: Thu Oct 03, 2019 10:52 pm
Contact:

Re: I can't get "Multiple Ethernet Example" provided with ESP-IDF to work.

Postby nopnop2002 » Wed Sep 17, 2025 2:05 am

This seems to be a bug in the example code.
Change tcp_client_multiple.c as follows:

Code: Select all

    //xTaskCreate(&app_connection_task, "app_ethernet_task", 4096, "eth", 5, NULL);
    //xTaskCreate(&app_connection_task, "app_wifi_task", 4096, "sta", 5, NULL);
    xTaskCreate(&app_connection_task, "app_ethernet_task", 4096, EXAMPLE_NETIF_DESC_ETH, 5, NULL);
    xTaskCreate(&app_connection_task, "app_wifi_task", 4096, EXAMPLE_NETIF_DESC_STA, 5, NULL);

mngrego
Posts: 4
Joined: Thu Sep 04, 2025 2:55 pm

Re: I can't get "Multiple Ethernet Example" provided with ESP-IDF to work.

Postby mngrego » Wed Sep 17, 2025 6:57 pm

That fixed it - thank you!

Who is online

Users browsing this forum: Amazon [Bot], Baidu [Spider], Bing [Bot], Qwantbot and 3 guests