-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Description
Answers checklist.
- I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
- I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
- I have searched the issue tracker for a similar issue and not found a similar issue.
IDF version.
v5.4.2
Espressif SoC revision.
ESP32-S3
Operating System used.
Linux
How did you build your project?
Command line with idf.py
If you are using Windows, please specify command line type.
None
Development Kit.
ESP Thread Border Router Board
Power Supply used.
USB
What is the expected behavior?
I would like to send an http request with an url from an Openthread device. I configure the esp_http_client example to use Thread interface for connectivity.
What is the actual behavior?
The device flashed with this firmware is able to join a Thread network created by a Border Router (ot_br example) but failled to connect to the server. I enable DNS logging and check that DNS resolution work properly.
Thread network is functional, if I connect a device with ot_cli firmware, I am able to do a curl request.
Steps to reproduce.
- Step Configure esp_http_client project to use Thread connectivity in place of Wifi. (Enable Openthread first)
- Step Check that HTTP request failed
Debug Logs.
I (26) boot: ESP-IDF v5.4.2-dirty 2nd stage bootloader
I (27) boot: compile time Oct 15 2025 11:45:33
I (27) boot: Multicore bootloader
I (27) boot: chip revision: v0.2
I (30) boot: efuse block revision: v1.3
I (34) boot.esp32s3: Boot SPI Speed : 80MHz
I (38) boot.esp32s3: SPI Mode : DIO
I (41) boot.esp32s3: SPI Flash Size : 2MB
I (45) boot: Enabling RNG early entropy source...
I (50) boot: Partition Table:
I (52) boot: ## Label Usage Type ST Offset Length
I (59) boot: 0 nvs WiFi data 01 02 00009000 00006000
I (65) boot: 1 phy_init RF data 01 01 0000f000 00001000
I (72) boot: 2 factory factory app 00 00 00010000 00177000
I (78) boot: End of partition table
I (81) esp_image: segment 0: paddr=00010020 vaddr=3c0c0020 size=3bb84h (244612) map
I (132) esp_image: segment 1: paddr=0004bbac vaddr=3fc95100 size=02d5ch ( 11612) load
I (135) esp_image: segment 2: paddr=0004e910 vaddr=40374000 size=01708h ( 5896) load
I (137) esp_image: segment 3: paddr=00050020 vaddr=42000020 size=b1f1ch (728860) map
I (272) esp_image: segment 4: paddr=00101f44 vaddr=40375708 size=0f96ch ( 63852) load
I (286) esp_image: segment 5: paddr=001118b8 vaddr=600fe000 size=0001ch ( 28) load
I (293) boot: Loaded app from partition at offset 0x10000
I (293) boot: Disabling RNG early entropy source...
I (304) cpu_start: Multicore app
I (313) cpu_start: Pro cpu start user code
I (313) cpu_start: cpu freq: 160000000 Hz
I (313) app_init: Application information:
I (313) app_init: Project name: esp_http_client_example
I (318) app_init: App version: 1
I (322) app_init: Compile time: Oct 15 2025 15:45:08
I (327) app_init: ELF file SHA256: df9f55416...
I (331) app_init: ESP-IDF: v5.4.2-dirty
I (335) efuse_init: Min chip rev: v0.0
I (339) efuse_init: Max chip rev: v0.99
I (343) efuse_init: Chip rev: v0.2
I (347) heap_init: Initializing. RAM available for dynamic allocation:
I (354) heap_init: At 3FCA0728 len 00048FE8 (291 KiB): RAM
I (359) heap_init: At 3FCE9710 len 00005724 (21 KiB): RAM
I (364) heap_init: At 3FCF0000 len 00008000 (32 KiB): DRAM
I (369) heap_init: At 600FE01C len 00001FCC (7 KiB): RTCRAM
I (375) spi_flash: detected chip: generic
I (378) spi_flash: flash io: dio
W (381) spi_flash: Detected size(16384k) larger than the size in the binary image header(2048k). Using the size in the binary image header.
I (393) sleep_gpio: Configure to isolate all GPIO pins in sleep state
I (400) sleep_gpio: Enable automatic switching of GPIO sleep configuration
I (406) main_task: Started on CPU0
I (416) main_task: Calling app_main()
dns_init: initializing
I (426) uart: ESP_INTR_FLAG_IRAM flag not set while CONFIG_UART_ISR_IN_IRAM is enabled, flag updated
I (436) uart: ESP_INTR_FLAG_IRAM flag not set while CONFIG_UART_ISR_IN_IRAM is enabled, flag updated
I (446) OPENTHREAD: spinel UART interface initialization completed
I(446) OPENTHREAD:[I] P-SpinelDrive-: co-processor reset: RESET_POWER_ON
E(456) OPENTHREAD:[C] P-SpinelDrive-: Software reset co-processor successfully
I(506) OPENTHREAD:[I] CslTxScheduler: Set frame request ahead: 26605 usec
I(516) OPENTHREAD:[I] ChildSupervsn-: Timeout: 0 -> 190
I(536) OPENTHREAD:[I] Settings------: Read NetworkInfo {rloc:0xbc00, extaddr:2ae02f61aed59709, role:router, mode:0x0f, version:5, keyseq:0x0, ...
I(536) OPENTHREAD:[I] Settings------: ... pid:0x7fc027b7, mlecntr:0x70338, maccntr:0x67525, mliid:32fb7c2be8788acb}
I (556) OPENTHREAD: OpenThread attached to netif
> I(566) OPENTHREAD:[N] Mle-----------: Role disabled -> detached
--- Warning: Writing to serial is timing out. Please make sure that your application supports an interactive console and that you have picked the correct console for serial communication.
I (596) OT_STATE: netif up
I(1336) OPENTHREAD:[N] Mle-----------: Role detached -> router
I(1336) OPENTHREAD:[N] Mle-----------: Partition ID 0x7fc027b7
I (1446) OT_STATE: Set dns server address: FD98:227:4078:2::808:808
I (1446) example_common: Connected to example_netif_thread
I (1446) example_common: - IPv6 address: fe80:0000:0000:0000:28e0:2f61:aed5:9709, type: ESP_IP6_ADDR_IS_LINK_LOCAL
I (1466) example_common: - IPv6 address: fd00:0db8:00a0:0000:32fb:7c2b:e878:8acb, type: ESP_IP6_ADDR_IS_UNIQUE_LOCAL
I (1476) example_common: - IPv6 address: fd98:0227:4078:0001:1717:0e64:6a61:a0fe, type: ESP_IP6_ADDR_IS_UNIQUE_LOCAL
I (1486) HTTP_CLIENT: Connected to AP, begin http example
dns_enqueue: "httpbin.org": use DNS entry 0
dns_enqueue: "httpbin.org": use DNS pcb 0
dns_send: dns_servers[0] "httpbin.org": request
sending DNS request ID 51067 for name "httpbin.org" to server 0
I (1496) main_task: Returned from app_main()
> dns_recv: "httpbin.org": response = 34.233.209.126
E (1646) esp-tls: [sock=54] connect() error: Host is unreachable
E (1646) transport_base: Failed to open a new connection: 32772
E (1646) HTTP_CLIENT: Connection failed, sock < 0
E (1656) HTTP_CLIENT: HTTP GET request failed: ESP_ERR_HTTP_CONNECT
dns_lookup: "httpbin.org": found = 34.233.209.126
E (1676) esp-tls: [sock=54] connect() error: Host is unreachable
E (1676) transport_base: Failed to open a new connection: 32772
E (1676) HTTP_CLIENT: Connection failed, sock < 0
E (1686) HTTP_CLIENT: HTTP POST request failed: ESP_ERR_HTTP_CONNECT
dns_lookup: "httpbin.org": found = 34.233.209.126
E (1696) esp-tls: [sock=54] connect() error: Host is unreachable
E (1696) transport_base: Failed to open a new connection: 32772
E (1706) HTTP_CLIENT: Connection failed, sock < 0
E (1706) HTTP_CLIENT: HTTP PUT request failed: ESP_ERR_HTTP_CONNECT
dns_lookup: "httpbin.org": found = 34.233.209.126
E (1726) esp-tls: [sock=54] connect() error: Host is unreachable
E (1726) transport_base: Failed to open a new connection: 32772
E (1736) HTTP_CLIENT: Connection failed, sock < 0
E (1736) HTTP_CLIENT: HTTP PATCH request failed: ESP_ERR_HTTP_CONNECT
dns_lookup: "httpbin.org": found = 34.233.209.126
E (1746) esp-tls: [sock=54] connect() error: Host is unreachable
E (1756) transport_base: Failed to open a new connection: 32772
E (1766) HTTP_CLIENT: Connection failed, sock < 0
E (1766) HTTP_CLIENT: HTTP DELETE request failed: ESP_ERR_HTTP_CONNECT
dns_lookup: "httpbin.org": found = 34.233.209.126
E (1776) esp-tls: [sock=54] connect() error: Host is unreachable
E (1776) transport_base: Failed to open a new connection: 32772
E (1786) HTTP_CLIENT: Connection failed, sock < 0
E (1796) HTTP_CLIENT: HTTP HEAD request failed: ESP_ERR_HTTP_CONNECT
I (1796) HTTP_CLIENT: HTTP_EVENT_DISCONNECTED
I (1796) HTTP_CLIENT: Last esp error code: 0x8004
I (1806) HTTP_CLIENT: Last mbedtls failure: 0x0
dns_lookup: "httpbin.org": found = 34.233.209.126
E (1806) esp-tls: [sock=54] connect() error: Host is unreachable
E (1826) transport_base: Failed to open a new connection: 32772
E (1826) HTTP_CLIENT: Connection failed, sock < 0
E (1826) HTTP_CLIENT: HTTP GET request failed: ESP_ERR_HTTP_CONNECT
dns_lookup: "httpbin.org": found = 34.233.209.126
E (1836) esp-tls: [sock=54] connect() error: Host is unreachable
E (1846) transport_base: Failed to open a new connection: 32772
E (1856) HTTP_CLIENT: Connection failed, sock < 0
E (1856) HTTP_CLIENT: HTTP POST request failed: ESP_ERR_HTTP_CONNECT
dns_lookup: "httpbin.org": found = 34.233.209.126
E (1866) esp-tls: [sock=54] connect() error: Host is unreachable
E (1866) transport_base: Failed to open a new connection: 32772
E (1876) HTTP_CLIENT: Connection failed, sock < 0
E (1876) HTTP_CLIENT: HTTP PUT request failed: ESP_ERR_HTTP_CONNECT
dns_lookup: "httpbin.org": found = 34.233.209.126
E (1896) esp-tls: [sock=54] connect() error: Host is unreachable
E (1896) transport_base: Failed to open a new connection: 32772
E (1906) HTTP_CLIENT: Connection failed, sock < 0
E (1906) HTTP_CLIENT: HTTP PATCH request failed: ESP_ERR_HTTP_CONNECT
dns_lookup: "httpbin.org": found = 34.233.209.126
E (1926) esp-tls: [sock=54] connect() error: Host is unreachable
E (1926) transport_base: Failed to open a new connection: 32772
E (1926) HTTP_CLIENT: Connection failed, sock < 0
E (1936) HTTP_CLIENT: HTTP DELETE request failed: ESP_ERR_HTTP_CONNECT
dns_lookup: "httpbin.org": found = 34.233.209.126
E (1946) esp-tls: [sock=54] connect() error: Host is unreachable
E (1956) transport_base: Failed to open a new connection: 32772
E (1956) HTTP_CLIENT: Connection failed, sock < 0
E (1966) HTTP_CLIENT: HTTP HEAD request failed: ESP_ERR_HTTP_CONNECT
I (1966) HTTP_CLIENT: HTTP_EVENT_DISCONNECTED
I (1966) HTTP_CLIENT: Last esp error code: 0x8004
I (1976) HTTP_CLIENT: Last mbedtls failure: 0x0
dns_lookup: "httpbin.org": found = 34.233.209.126
E (1976) esp-tls: [sock=54] connect() error: Host is unreachable
E (1996) transport_base: Failed to open a new connection: 32772
E (1996) HTTP_CLIENT: Connection failed, sock < 0
E (1996) HTTP_CLIENT: HTTP GET request failed: ESP_ERR_HTTP_CONNECT
dns_lookup: "httpbin.org": found = 34.233.209.126
E (2006) esp-tls: [sock=54] connect() error: Host is unreachable
E (2026) transport_base: Failed to open a new connection: 32772
E (2026) HTTP_CLIENT: Connection failed, sock < 0
E (2026) HTTP_CLIENT: Error perform http request ESP_ERR_HTTP_CONNECT
I (2036) HTTP_CLIENT: HTTP_EVENT_DISCONNECTED
I (2036) HTTP_CLIENT: Last esp error code: 0x8004
I (2036) HTTP_CLIENT: Last mbedtls failure: 0x0
dns_lookup: "httpbin.org": found = 34.233.209.126
E (2046) esp-tls: [sock=54] connect() error: Host is unreachable
E (2056) transport_base: Failed to open a new connection: 32772
E (2066) HTTP_CLIENT: Connection failed, sock < 0
E (2066) HTTP_CLIENT: Error perform http request ESP_ERR_HTTP_CONNECT
I (2076) HTTP_CLIENT: HTTP_EVENT_DISCONNECTED
I (2076) HTTP_CLIENT: Last esp error code: 0x8004
I (2076) HTTP_CLIENT: Last mbedtls failure: 0x0
dns_lookup: "httpbin.org": found = 34.233.209.126
E (2096) esp-tls: [sock=54] connect() error: Host is unreachable
E (2096) transport_base: Failed to open a new connection: 32772
E (2106) HTTP_CLIENT: Connection failed, sock < 0
E (2106) HTTP_CLIENT: Error perform http request ESP_ERR_HTTP_CONNECT
I (2106) HTTP_CLIENT: HTTP_EVENT_DISCONNECTED
I (2116) HTTP_CLIENT: Last esp error code: 0x8004
I (2116) HTTP_CLIENT: Last mbedtls failure: 0x0
dns_enqueue: "www.howsmyssl.com": use DNS entry 1
dns_enqueue: "www.howsmyssl.com": use DNS pcb 0
dns_send: dns_servers[0] "www.howsmyssl.com": request
sending DNS request ID 33344 for name "www.howsmyssl.com" to server 0
dns_recv: "www.howsmyssl.com": response = 34.71.45.200
E (2246) esp-tls: [sock=54] connect() error: Host is unreachable
E (2256) esp-tls: Failed to open new connection
E (2256) transport_base: Failed to open a new connection
E (2266) HTTP_CLIENT: Connection failed, sock < 0
E (2266) HTTP_CLIENT: Error perform http request ESP_ERR_HTTP_CONNECT
I (2276) HTTP_CLIENT: HTTP_EVENT_DISCONNECTED
I (2276) HTTP_CLIENT: Last esp error code: 0x8004
I (2276) HTTP_CLIENT: Last mbedtls failure: 0x0
dns_lookup: "www.howsmyssl.com": found = 34.71.45.200
E (2296) esp-tls: [sock=54] connect() error: Host is unreachable
E (2296) esp-tls: Failed to open new connection
E (2296) transport_base: Failed to open a new connection
E (2306) HTTP_CLIENT: Connection failed, sock < 0
E (2306) HTTP_CLIENT: Error perform http request ESP_ERR_HTTP_CONNECT
I (2316) HTTP_CLIENT: HTTP_EVENT_DISCONNECTED
I (2316) HTTP_CLIENT: Last esp error code: 0x8004
I (2316) HTTP_CLIENT: Last mbedtls failure: 0x0
dns_lookup: "httpbin.org": found = 34.233.209.126
E (2336) esp-tls: [sock=54] connect() error: Host is unreachable
E (2336) transport_base: Failed to open a new connection: 32772
E (2346) HTTP_CLIENT: Connection failed, sock < 0
E (2346) HTTP_CLIENT: Error perform http request ESP_ERR_HTTP_CONNECT
I (2346) HTTP_CLIENT: HTTP_EVENT_DISCONNECTED
I (2366) HTTP_CLIENT: Last esp error code: 0x8004
I (2366) HTTP_CLIENT: Last mbedtls failure: 0x0
dns_lookup: "httpbin.org": found = 34.233.209.126
E (2376) esp-tls: [sock=54] connect() error: Host is unreachable
E (2376) transport_base: Failed to open a new connection: 32772
E (2376) HTTP_CLIENT: Connection failed, sock < 0
E (2396) HTTP_CLIENT: Error perform http request ESP_ERR_HTTP_CONNECT
I (2396) HTTP_CLIENT: HTTP_EVENT_DISCONNECTED
I (2396) HTTP_CLIENT: Last esp error code: 0x8004
I (2406) HTTP_CLIENT: Last mbedtls failure: 0x0
dns_lookup: "httpbin.org": found = 34.233.209.126
E (2406) esp-tls: [sock=54] connect() error: Host is unreachable
E (2416) transport_base: Failed to open a new connection: 32772
E (2426) HTTP_CLIENT: Connection failed, sock < 0
W(2426) OPENTHREAD:[W] DuaManager----: Failed to perform next registration: NotFound
E (2426) HTTP_CLIENT: Failed to open HTTP connection: ESP_ERR_HTTP_CONNECT
dns_enqueue: "postman-echo.com": use DNS entry 2
dns_enqueue: "postman-echo.com": use DNS pcb 0
dns_send: dns_servers[0] "postman-echo.com": request
sending DNS request ID 15176 for name "postman-echo.com" to server 0
dns_tmr: dns_check_entries
dns_send: dns_servers[0] "postman-echo.com": request
sending DNS request ID 15176 for name "postman-echo.com" to server 0
dns_recv: "postman-echo.com": response = 162.159.142.41
E (2546) esp-tls: [sock=54] connect() error: Host is unreachable
E (2556) HTTP_CLIENT: Connection failed
E (2556) HTTP_CLIENT: Error perform http request ESP_ERR_HTTP_CONNECT
I (2566) HTTP_CLIENT: HTTP_EVENT_DISCONNECTED
dns_lookup: "httpbin.org": found = 34.233.209.126
E (2566) esp-tls: [sock=54] connect() error: Host is unreachable
E (2576) HTTP_CLIENT: Connection failed
E (2576) HTTP_CLIENT: Error perform http request ESP_ERR_HTTP_CONNECT
I (2586) HTTP_CLIENT: HTTP_EVENT_DISCONNECTED
dns_enqueue: "not.existent.url": use DNS entry 3
dns_enqueue: "not.existent.url": use DNS pcb 0
dns_send: dns_servers[0] "not.existent.url": request
sending DNS request ID 3059 for name "not.existent.url" to server 0
dns_recv: "not.existent.url": error in flags
E (2736) esp-tls: couldn't get hostname for :not.existent.url: getaddrinfo() returns 202, addrinfo=0x0
E (2736) esp-tls: Failed to open new connection
E (2746) transport_base: Failed to open a new connection
E (2746) HTTP_CLIENT: Connection failed, sock < 0
E (2756) HTTP_CLIENT: Error perform http request ESP_ERR_HTTP_CONNECT
I (2766) HTTP_CLIENT: HTTP_EVENT_DISCONNECTED
I (2766) HTTP_CLIENT: Last esp error code: 0x8001
I (2776) HTTP_CLIENT: Last mbedtls failure: 0x0
dns_lookup: "httpbin.org": found = 34.233.209.126
E (2776) esp-tls: [sock=54] connect() error: Host is unreachable
E (2776) transport_base: Failed to open a new connection: 32772
E (2796) HTTP_CLIENT: Connection failed, sock < 0
E (2796) HTTP_CLIENT: Failed to open HTTP connection: ESP_ERR_HTTP_CONNECT
dns_lookup: "httpbin.org": found = 34.233.209.126
E (2806) esp-tls: [sock=54] connect() error: Host is unreachable
E (2806) transport_base: Failed to open a new connection: 32772
E (2816) HTTP_CLIENT: Connection failed, sock < 0
E (2816) HTTP_CLIENT: Failed to open HTTP connection: ESP_ERR_HTTP_CONNECT
dns_enqueue: "dl.espressif.com": use DNS entry 3
dns_enqueue: "dl.espressif.com": use DNS pcb 0
dns_send: dns_servers[0] "dl.espressif.com": request
sending DNS request ID 15188 for name "dl.espressif.com" to server 0
dns_recv: "dl.espressif.com": response = 143.204.194.3
E (2966) esp-tls: [sock=54] connect() error: Host is unreachable
E (2976) esp-tls: Failed to open new connection
E (2976) transport_base: Failed to open a new connection
E (2986) HTTP_CLIENT: Connection failed, sock < 0
E (2986) HTTP_CLIENT: HTTP request failed: ESP_ERR_HTTP_CONNECT
dns_lookup: "dl.espressif.com": found = 143.204.194.3
E (2996) esp-tls: [sock=54] connect() error: Host is unreachable
E (2996) esp-tls: Failed to open new connection
E (2996) transport_base: Failed to open a new connection
E (3016) HTTP_CLIENT: Connection failed, sock < 0
E (3016) HTTP_CLIENT: HTTP request failed: ESP_ERR_HTTP_CONNECT
dns_lookup: "dl.espressif.com": found = 143.204.194.3
E (3026) esp-tls: [sock=54] connect() error: Host is unreachable
E (3026) esp-tls: Failed to open new connection
E (3036) transport_base: Failed to open a new connection
E (3036) HTTP_CLIENT: Connection failed, sock < 0
E (3046) HTTP_CLIENT: HTTP request failed: ESP_ERR_HTTP_CONNECT
I (3056) HTTP_CLIENT: HTTP_EVENT_DISCONNECTED
I (3056) HTTP_CLIENT: Last esp error code: 0x8004
I (3056) HTTP_CLIENT: Last mbedtls failure: 0x0
I (3066) HTTP_CLIENT: Finish http example
dns_tmr: dns_check_entries
dns_tmr: dns_check_entries
dns_tmr: dns_check_entries
dns_tmr: dns_check_entries
dns_tmr: dns_check_entries
Done
Diagnostic report archive.
No response
More Information.
I tried with esp-idf v5.5.1 with the same issue. But with the latest commit on master, the example work properly.
As our main goal is a production project that can act as a border router or a thread node according to the config on the deployment, we have to use the same version of esp-idf as esp_thread_br.