Esp Thread border router not working with ethernet connection

JoseAntonioMG
Posts: 3
Joined: Mon Mar 25, 2024 6:18 pm

Esp Thread border router not working with ethernet connection

Postby JoseAntonioMG » Wed Jun 12, 2024 2:49 pm

Hi guys, I have recently installed an Esp Thread border router kit with an ethernet connection (without wifi). I have cloned the ETBR repository: git clone --recursive https://github.com/espressif/esp-thread-br.git
And I have enabled the options for ethernet (SPI) and disabled the Wifi option in SDKConfig;

Code: Select all

#
# Automatically generated file. DO NOT EDIT.
# Espressif IoT Development Framework (ESP-IDF) 5.3.0 Project Configuration
#
......

#
# ESP Thread Border Router Example
#
CONFIG_ESP_BR_BOARD_STANDALONE=y
# CONFIG_ESP_BR_BOARD_DEV_KIT is not set

#
# Board Configuration
#
CONFIG_PIN_TO_RCP_RESET=7
CONFIG_PIN_TO_RCP_BOOT=6
CONFIG_PIN_TO_RCP_TX=17
CONFIG_PIN_TO_RCP_RX=18
CONFIG_PIN_TO_RCP_CS=3
CONFIG_PIN_TO_RCP_SCLK=12
CONFIG_PIN_TO_RCP_MISO=13
CONFIG_PIN_TO_RCP_MOSI=11
# end of Board Configuration

# CONFIG_OPENTHREAD_BR_AUTO_UPDATE_RCP is not set
CONFIG_OPENTHREAD_BR_CREATE_OTA_IMAGE=y
CONFIG_OPENTHREAD_BR_AUTO_START=y
CONFIG_OPENTHREAD_BR_START_WEB=y

#
# External coexist wire type and pin config
#
# end of External coexist wire type and pin config
# end of ESP Thread Border Router Example

#
# Example Connection Configuration
#
CONFIG_ENV_GPIO_RANGE_MIN=0
CONFIG_ENV_GPIO_RANGE_MAX=48
CONFIG_ENV_GPIO_IN_RANGE_MAX=48
CONFIG_ENV_GPIO_OUT_RANGE_MAX=48
# CONFIG_EXAMPLE_CONNECT_WIFI is not set
CONFIG_EXAMPLE_CONNECT_ETHERNET=y
CONFIG_EXAMPLE_ETHERNET_EMAC_TASK_STACK_SIZE=2048
CONFIG_EXAMPLE_USE_SPI_ETHERNET=y
# CONFIG_EXAMPLE_USE_DM9051 is not set
CONFIG_EXAMPLE_USE_W5500=y
# CONFIG_EXAMPLE_USE_OPENETH is not set
CONFIG_EXAMPLE_ETH_SPI_HOST=2
CONFIG_EXAMPLE_ETH_SPI_SCLK_GPIO=36
CONFIG_EXAMPLE_ETH_SPI_MOSI_GPIO=35
CONFIG_EXAMPLE_ETH_SPI_MISO_GPIO=37
CONFIG_EXAMPLE_ETH_SPI_CS_GPIO=39
CONFIG_EXAMPLE_ETH_SPI_CLOCK_MHZ=36
CONFIG_EXAMPLE_ETH_SPI_INT_GPIO=38
CONFIG_EXAMPLE_ETH_PHY_RST_GPIO=40
CONFIG_EXAMPLE_ETH_PHY_ADDR=1
# CONFIG_EXAMPLE_CONNECT_PPP is not set
CONFIG_EXAMPLE_CONNECT_IPV4=y
CONFIG_EXAMPLE_CONNECT_IPV6=y
CONFIG_EXAMPLE_CONNECT_IPV6_PREF_LOCAL_LINK=y
# CONFIG_EXAMPLE_CONNECT_IPV6_PREF_GLOBAL is not set
# CONFIG_EXAMPLE_CONNECT_IPV6_PREF_SITE_LOCAL is not set
# CONFIG_EXAMPLE_CONNECT_IPV6_PREF_UNIQUE_LOCAL is not set
# end of Example Connection Configuration

.........

#
# Ethernet
#
CONFIG_ETH_ENABLED=y
CONFIG_ETH_USE_SPI_ETHERNET=y
# CONFIG_ETH_SPI_ETHERNET_DM9051 is not set
CONFIG_ETH_SPI_ETHERNET_W5500=y
# CONFIG_ETH_SPI_ETHERNET_KSZ8851SNL is not set
# CONFIG_ETH_USE_OPENETH is not set
# CONFIG_ETH_TRANSMIT_MUTEX is not set
# end of Ethernet

..........

#
# ESP HTTP client
#
CONFIG_ESP_HTTP_CLIENT_ENABLE_HTTPS=y
# CONFIG_ESP_HTTP_CLIENT_ENABLE_BASIC_AUTH is not set
# CONFIG_ESP_HTTP_CLIENT_ENABLE_DIGEST_AUTH is not set
# CONFIG_ESP_HTTP_CLIENT_ENABLE_CUSTOM_TRANSPORT is not set
# end of ESP HTTP client

#
# HTTP Server
#
CONFIG_HTTPD_MAX_REQ_HDR_LEN=512
CONFIG_HTTPD_MAX_URI_LEN=512
CONFIG_HTTPD_ERR_RESP_NO_DELAY=y
CONFIG_HTTPD_PURGE_BUF_LEN=32
# CONFIG_HTTPD_LOG_PURGE_DATA is not set
# CONFIG_HTTPD_WS_SUPPORT is not set
# CONFIG_HTTPD_QUEUE_WORK_BLOCKING is not set
# end of HTTP Server

#
# ESP HTTPS OTA
#
# CONFIG_ESP_HTTPS_OTA_DECRYPT_CB is not set
# CONFIG_ESP_HTTPS_OTA_ALLOW_HTTP is not set
# end of ESP HTTPS OTA

#
# ESP HTTPS server
#
# CONFIG_ESP_HTTPS_SERVER_ENABLE is not set
# end of ESP HTTPS server

............

#
# OpenThread
#
CONFIG_OPENTHREAD_ENABLED=y
CONFIG_OPENTHREAD_LOG_LEVEL_DYNAMIC=y
CONFIG_OPENTHREAD_CONSOLE_TYPE_USB_SERIAL_JTAG=y

#
# Thread Operational Dataset
#
CONFIG_OPENTHREAD_NETWORK_NAME="OpenThread-ESP"
CONFIG_OPENTHREAD_MESH_LOCAL_PREFIX="fd00:db8:a0:0::/64"
CONFIG_OPENTHREAD_NETWORK_CHANNEL=15
CONFIG_OPENTHREAD_NETWORK_PANID=0x1234
CONFIG_OPENTHREAD_NETWORK_EXTPANID="dead00beef00cafe"
CONFIG_OPENTHREAD_NETWORK_MASTERKEY="00112233445566778899aabbccddeeff"
CONFIG_OPENTHREAD_NETWORK_PSKC="104810e2315100afd6bc9215a6bfac53"
# end of Thread Operational Dataset

# CONFIG_OPENTHREAD_RADIO_NATIVE is not set
# CONFIG_OPENTHREAD_RADIO_SPINEL_UART is not set
CONFIG_OPENTHREAD_RADIO_SPINEL_SPI=y
CONFIG_OPENTHREAD_FTD=y
# CONFIG_OPENTHREAD_MTD is not set
# CONFIG_OPENTHREAD_RADIO is not set
CONFIG_OPENTHREAD_CLI=y
CONFIG_OPENTHREAD_DIAG=y
CONFIG_OPENTHREAD_COMMISSIONER=y
CONFIG_OPENTHREAD_COMM_MAX_JOINER_ENTRIES=2
CONFIG_OPENTHREAD_JOINER=y
CONFIG_OPENTHREAD_SRP_CLIENT=y
CONFIG_OPENTHREAD_SRP_CLIENT_MAX_SERVICES=5
CONFIG_OPENTHREAD_DNS_CLIENT=y
CONFIG_OPENTHREAD_BORDER_ROUTER=y
CONFIG_OPENTHREAD_NUM_MESSAGE_BUFFERS=65
CONFIG_OPENTHREAD_SPINEL_RX_FRAME_BUFFER_SIZE=1024
CONFIG_OPENTHREAD_MAC_MAX_CSMA_BACKOFFS_DIRECT=4
CONFIG_OPENTHREAD_MLE_MAX_CHILDREN=10
CONFIG_OPENTHREAD_TMF_ADDR_CACHE_ENTRIES=20
# CONFIG_OPENTHREAD_DNS64_CLIENT is not set
CONFIG_OPENTHREAD_UART_BUFFER_SIZE=768
# CONFIG_OPENTHREAD_LINK_METRICS is not set
# CONFIG_OPENTHREAD_MACFILTER_ENABLE is not set
# CONFIG_OPENTHREAD_CSL_ENABLE is not set
CONFIG_OPENTHREAD_XTAL_ACCURACY=130
# CONFIG_OPENTHREAD_DUA_ENABLE is not set
# CONFIG_OPENTHREAD_TIME_SYNC is not set
# CONFIG_OPENTHREAD_RADIO_STATS_ENABLE is not set
# CONFIG_OPENTHREAD_SPINEL_ONLY is not set
CONFIG_OPENTHREAD_RX_ON_WHEN_IDLE=y

.............

Hi guys, I have recently installed an Esp Thread border router kit with an ethernet connection (without wifi). I have cloned the ETBR repository: git clone --recursive https://github.com/espressif/esp-thread-br.git
And I have enabled the options for ethernet (SPI) and disabled the Wifi option in SDKConfig

After compiling and flashing the esp32s3, the serial monitor output tells me the following:

Code: Select all

I (26) boot: ESP-IDF v5.3-beta1-105-g3f632df143-dirt 2nd stage bootloader
I (27) boot: compile time Jun 12 2024 14:31:30
I (27) boot: Multicore bootloader
I (27) boot: chip revision: v0.1
I (27) boot.esp32s3: Boot SPI Speed : 80MHz
I (28) boot.esp32s3: SPI Mode       : DIO
I (28) boot.esp32s3: SPI Flash Size : 16MB
I (28) boot: Enabling RNG early entropy source...
I (28) boot: Partition Table:
I (29) boot: ## Label            Usage          Type ST Offset   Length
I (29) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (29) boot:  1 otadata          OTA data         01 00 0000f000 00002000
I (30) boot:  2 phy_init         RF data          01 01 00011000 00001000
I (30) boot:  3 ota_0            OTA app          00 10 00020000 00190000
I (31) boot:  4 ota_1            OTA app          00 11 001b0000 00190000
I (31) boot:  5 web_storage      Unknown data     01 82 00340000 00019000
I (31) boot:  6 rcp_fw           Unknown data     01 82 00359000 000a0000
I (32) boot: End of partition table
I (32) esp_image: segment 0: paddr=00020020 vaddr=3c110020 size=5811ch (360732) map
I (97) esp_image: segment 1: paddr=00078144 vaddr=3fc9ac00 size=053dch ( 21468) load
I (102) esp_image: segment 2: paddr=0007d528 vaddr=40374000 size=02af0h ( 10992) load
I (105) esp_image: segment 3: paddr=00080020 vaddr=42000020 size=1018e4h (1054948) map
I (294) esp_image: segment 4: paddr=0018190c vaddr=40376af0 size=140ech ( 82156) load
I (322) boot: Loaded app from partition at offset 0x20000
I (322) boot: Disabling RNG early entropy source...
I (323) cpu_start: Multicore app
I (332) cpu_start: Pro cpu start user code
I (332) cpu_start: cpu freq: 160000000 Hz
I (333) app_init: Application information:
I (333) app_init: Project name:     esp_ot_br
I (333) app_init: App version:      1
I (333) app_init: Compile time:     Jun 12 2024 14:40:53
I (333) app_init: ELF file SHA256:  2216291f3...
I (334) app_init: ESP-IDF:          v5.3-beta1-105-g3f632df143-dirt
I (334) efuse_init: Min chip rev:     v0.0
I (334) efuse_init: Max chip rev:     v0.99 
I (334) efuse_init: Chip rev:         v0.1
I (334) heap_init: Initializing. RAM available for dynamic allocation:
I (335) heap_init: At 3FCAEEB8 len 0003A858 (234 KiB): RAM
I (335) heap_init: At 3FCE9710 len 00005724 (21 KiB): RAM
I (335) heap_init: At 3FCF0000 len 00008000 (32 KiB): DRAM
I (336) heap_init: At 600FE100 len 00001EE8 (7 KiB): RTCRAM
I (337) spi_flash: detected chip: gd
I (337) spi_flash: flash io: dio
I (337) sleep: Configure to isolate all GPIO pins in sleep state
I (338) sleep: Enable automatic switching of GPIO sleep configuration
I (338) main_task: Started on CPU0
I (348) main_task: Calling app_main()
I (368) RCP_UPDATE: RCP: using update sequence 0
I (368) main_task: Returned from app_main()
I (368) gpio: GPIO[6]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:2 
I (368) OPENTHREAD: spinel SPI interface initialization completed
I(378) OPENTHREAD:[I] P-RadioSpinel-: RCP reset: RESET_POWER_ON
I(378) OPENTHREAD:[I] P-RadioSpinel-: Software reset RCP successfully
I(438) OPENTHREAD:[I] ChildSupervsn-: Timeout: 0 -> 190
I(458) OPENTHREAD:[I] Settings------: Read NetworkInfo {rloc:0xd400, extaddr:9239874ca7a13394, role:leader, mode:0x0f, version:4, keyseq:0x0, ...
I(458) OPENTHREAD:[I] Settings------: ... pid:0x62491e4f, mlecntr:0x3ef, maccntr:0x3e8, mliid:22c889f3be4a3a5d}
I (468) OPENTHREAD: OpenThread attached to netif
> E (478) gpio: gpio_install_isr_service(514): GPIO isr service already installed
I (498) esp_eth.netif.netif_glue: 02:00:00:12:34:56
I (498) esp_eth.netif.netif_glue: ethernet attached to netif
I (508) ethernet_connect: Waiting for IP(s).
I (2508) ethernet_connect: Ethernet Link Up
I (4368) ethernet_connect: Got IPv6 event: Interface "example_netif_eth" address: fe80:0000:0000:0000:0000:00ff:fe12:3456, type: ESP_IP6_ADDR_IS_LINK_LOCAL
I (5508) esp_netif_handlers: example_netif_eth ip: 192.168.0.3, mask: 255.255.255.0, gw: 192.168.0.1
I (5508) ethernet_connect: Got IPv4 event: Interface "example_netif_eth" address: 192.168.0.3
I (5508) example_common: Connected to example_netif_eth
I (5508) example_common: - IPv4 address: 192.168.0.3,
I (5508) example_common: - IPv6 address: fe80:0000:0000:0000:0000:00ff:fe12:3456, type: ESP_IP6_ADDR_IS_LINK_LOCAL
I(5508) OPENTHREAD:[N] RoutingManager: BR ULA prefix: fdb3:a4ab:7c8f::/48 (loaded)
I(5518) OPENTHREAD:[N] RoutingManager: Local on-link prefix: fdde:ad00:beef:cafe::/64
I (5528) OPENTHREAD: Platform UDP bound to port 49153
I(5528) OPENTHREAD:[N] Mle-----------: Role disabled -> detached
I (5558) OT_STATE: netif up
I (5558) OPENTHREAD: NAT64 ready
I(32338) OPENTHREAD:[N] Mle-----------: RLOC16 d400 -> fffe
I(32468) OPENTHREAD:[N] Mle-----------: Attach attempt 1, AnyPartition reattaching with Active Dataset
I(39028) OPENTHREAD:[N] RouterTable---: Allocate router id 53
I(39028) OPENTHREAD:[N] Mle-----------: RLOC16 fffe -> d400
I(39038) OPENTHREAD:[N] Mle-----------: Role detached -> leader
I(39038) OPENTHREAD:[N] Mle-----------: Partition ID 0x61e841f2
I (39048) OPENTHREAD: Platform UDP bound to port 49154
I understand that the ethernet connection is working, however the web server is not working and neither is the ipv4 or ipv6 connection.

A month ago I was testing the same kit with a previous version of Esp Thread border router, and the Ethernet connection worked for me. Everything was going well, until I decided to update the esp32s3 firmware with a new version.

I cloned the repository again:
git clone --recursive https://github.com/espressif/esp-thread-br.git

modifying the options in the SDKConfig file with the ones I had for the Ethernet connection, as I explained at the beginning. However, this time access to the web-gui did not work, nor did the device commissioner.

What could be wrong? the new version of the repository? Any settings in the SDKConfig file that are incorrect?

JoseAntonioMG
Posts: 3
Joined: Mon Mar 25, 2024 6:18 pm

Re: Esp Thread border router not working with ethernet connection

Postby JoseAntonioMG » Thu Jun 13, 2024 10:01 am

The WiFi connection works fine, even activating WiFi and Ethernet at the same time, both work, each with its own IP address.
By disabling WiFi, and activating Ethernet, access to the local network stops working, although the logs say otherwise

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 85 guests