{"id":29791634,"url":"https://github.com/autoparallel/esp-thread-border-router","last_synced_at":"2025-10-12T17:49:59.338Z","repository":{"id":298751007,"uuid":"1000997275","full_name":"Autoparallel/esp-thread-border-router","owner":"Autoparallel","description":"ESP32 + Ethernet based Thread Border Rouer","archived":false,"fork":false,"pushed_at":"2025-06-12T16:43:30.000Z","size":82,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-12T17:41:56.147Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Autoparallel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-12T16:40:03.000Z","updated_at":"2025-06-12T16:43:34.000Z","dependencies_parsed_at":"2025-06-12T17:53:12.808Z","dependency_job_id":null,"html_url":"https://github.com/Autoparallel/esp-thread-border-router","commit_stats":null,"previous_names":["autoparallel/esp-thread-border-router"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Autoparallel/esp-thread-border-router","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Autoparallel%2Fesp-thread-border-router","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Autoparallel%2Fesp-thread-border-router/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Autoparallel%2Fesp-thread-border-router/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Autoparallel%2Fesp-thread-border-router/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Autoparallel","download_url":"https://codeload.github.com/Autoparallel/esp-thread-border-router/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Autoparallel%2Fesp-thread-border-router/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267446807,"owners_count":24088561,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-27T02:00:11.917Z","response_time":82,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-07-28T00:32:48.592Z","updated_at":"2025-10-12T17:49:54.287Z","avatar_url":"https://github.com/Autoparallel.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ESP32 Thread Border Router with Ethernet\n\nThis project implements a robust OpenThread Border Router (BR) on an ESP32 series System-on-Chip (SoC) with an Ethernet backbone. It is designed to be a single-chip solution, requiring an ESP32 device that supports the 802.15.4 Thread radio specification (such as the ESP32-C6 or ESP32-H2) connected to an Ethernet module.\n\nThis BR provides bidirectional IPv6 connectivity between a Thread mesh network and your local LAN, includes a web-based GUI for management, and automatically handles service discovery (mDNS/SRP).\n\n## Key Features\n\n- **Ethernet Backbone**: Uses a wired Ethernet connection for stable and reliable network connectivity.\n- **Web Management UI**: A built-in web server provides a user-friendly interface to view Thread network status, topology, and other diagnostics.\n- **Bidirectional IPv6 Connectivity**: Devices on the Thread network and the Ethernet LAN can seamlessly communicate with each other.\n- **Service Discovery**: Implements both an SRP server for Thread devices and an mDNS discovery proxy, allowing services to be discovered across the two networks.\n- **Automatic Commissioner**: Once the Thread network is formed and the device becomes a leader/router, it automatically starts the commissioner role to allow new devices to join.\n\n## Hardware Requirements\n\n1.  **ESP32 SoC**: An Espressif device with built-in 802.15.4 radio support.\n    -   **Recommended**: ESP32-C6\n    -   Also compatible: ESP32-H2\n2.  **Ethernet Module**: A SPI-based Ethernet module.\n    -   This project is configured and tested for the **W5500** module.\n3.  **Wiring**: Connect the ESP32 and your Ethernet module via SPI pins. Refer to your specific development board's pinout for the correct GPIOs.\n\n## Configuration\n\n### 1. Network Credentials (`.env` file)\n\nSensitive network configuration should not be stored in version control. Create a `.env` file in the root of the project directory. The build system will automatically load these values.\n\n**`.env` file contents:**\n\n```\n# Thread Network Configuration\nCONFIG_OPENTHREAD_NETWORK_NAME=\"MyThreadNet\"\nCONFIG_OPENTHREAD_MESH_LOCAL_PREFIX=\"fd00:dead:beef::/64\"\nCONFIG_OPENTHREAD_NETWORK_CHANNEL=15\nCONFIG_OPENTHREAD_NETWORK_PANID=0xabcd\nCONFIG_OPENTHREAD_NETWORK_EXTPANID=\"1122334455667788\"\nCONFIG_OPENTHREAD_NETWORK_MASTERKEY=\"00112233445566778899aabbccddeeff\"\nCONFIG_OPENTHREAD_NETWORK_PSKC=\"aabbccddeeff0011223344556677\"\n```\n\n\u003e **Important**: Add `.env` to your `.gitignore` file to avoid committing secrets.\n\n### 2. Ethernet Module Configuration\n\nConfigure the project to use your Ethernet module via the menuconfig interface:\n\n```bash\nidf.py menuconfig\n```\n\nNavigate to `Example Connection Configuration ---\u003e` and ensure the following:\n\n-   `[ ] connect using WiFi interface` is **disabled**.\n-   `[*] connect using Ethernet interface` is **enabled**.\n\nUnder the `Ethernet Type` menu, select `W5500 Module` and configure the SPI and GPIO pins to match your hardware wiring.\n\n### 3. Auto-Start (Optional but Recommended)\n\nFor the border router to start automatically on boot, navigate to `Component config -\u003e OpenThread -\u003e` and enable:\n\n-   `[*] Border Router Auto Start`\n\n## Build and Run\n\n1.  **Set the Target**:\n    ```bash\n    idf.py set-target esp32c6\n    ```\n\n2.  **Build, Flash, and Monitor**:\n    ```bash\n    idf.py -p (YOUR_SERIAL_PORT) build flash monitor\n    ```\n\nOnce running, the device will connect to your Ethernet network, establish a Thread network with the credentials from your `.env` file, and begin operating as a border router. You can access the web management UI by navigating to the IP address assigned to the device by your DHCP server.\n\n## Project Structure\n\nThe `main` component is organized into subdirectories for clarity and maintainability.\n\n```\nmain/\n├── core/                     # Core border router functionality\n│   └── esp_ot_br.c           # Main application logic and initialization\n├── web/                      # Web server implementation\n│   ├── esp_br_web.c/h        # HTTP server core\n│   ├── esp_br_web_api.c/h    # REST API handlers\n│   └── esp_br_web_base.c/h   # Base web functionality\n├── assets/                   # Static assets for the web UI\n│   ├── frontend/             # Web UI files (HTML, CSS, JS)\n│   └── ...\n├── include/                  # Public header files for the main component\n│   └── esp_ot_config.h       # OpenThread configuration overrides\n└── CMakeLists.txt            # Component build configuration\n```\n\n-   **Assets**: The web frontend assets are embedded into the firmware binary and served from a SPIFFS partition.\n-   **Build Integration**: The `main` component's `CMakeLists.txt` is configured to automatically include all source files, simplifying development.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fautoparallel%2Fesp-thread-border-router","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fautoparallel%2Fesp-thread-border-router","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fautoparallel%2Fesp-thread-border-router/lists"}