Checklist
How often does this bug occurs?
always
Expected behavior
The ESP Thread Border Router's REST API and Web server should start regardless of the underlying network protocol. It should be fully accessible when either a valid IPv4 address or a routable, non-link-local IPv6 address is assigned.
As smart home and IoT architectures transition to modern protocols, ensuring network stack independence is critical.
Actual behavior (suspected bug)
When only an IPv6 address is assigned, the server never starts.
The HTTP Web/REST server esp_br_web.c only registers handlers for IPv4 address acquisition (IP_EVENT_STA_GOT_IP and IP_EVENT_ETH_GOT_IP). Also, the internal character buffers for storing the IP address are hardcoded to SERVER_IPV4_LEN (16 bytes) which does not fit an IPv6 string representation.
Error logs or terminal output
Steps to reproduce the behavior
- Build and flash basic_thread_border_router example using esp-thread-br (commit 66762f2) and ESP-IDF v5.5.4.
- Deploy Border Router with IPv6-only connectivity.
- Try to access the REST API or Web UI using the device's routable IPv6 address
- connection will fail/time out because the web server is not running.
Project release version
66762f2
System architecture
Intel/AMD 64-bit (modern PC, older Mac)
Operating system
Linux
Operating system version
Shell
Bash
Additional context
Proposed solution outline:
- Increase IP Buffer Sizes
- Also register for IPv6 IP Events
IP_EVENT_GOT_IP6
- Handle IPv6 events
- Filter out link-local addresses
- Verify that the event is for the correct interface
- If the server has not already started, call
start_esp_br_http_server() using the acquired IPv6 address string
Checklist
How often does this bug occurs?
always
Expected behavior
The ESP Thread Border Router's REST API and Web server should start regardless of the underlying network protocol. It should be fully accessible when either a valid IPv4 address or a routable, non-link-local IPv6 address is assigned.
As smart home and IoT architectures transition to modern protocols, ensuring network stack independence is critical.
Actual behavior (suspected bug)
When only an IPv6 address is assigned, the server never starts.
The HTTP Web/REST server
esp_br_web.conly registers handlers for IPv4 address acquisition (IP_EVENT_STA_GOT_IPandIP_EVENT_ETH_GOT_IP). Also, the internal character buffers for storing the IP address are hardcoded toSERVER_IPV4_LEN(16 bytes) which does not fit an IPv6 string representation.Error logs or terminal output
Steps to reproduce the behavior
Project release version
66762f2
System architecture
Intel/AMD 64-bit (modern PC, older Mac)
Operating system
Linux
Operating system version
Shell
Bash
Additional context
Proposed solution outline:
IP_EVENT_GOT_IP6start_esp_br_http_server()using the acquired IPv6 address string