Open Thread
thread-reference-20250612Features
-
Full implementation of the Thread 1.4.0 specification for reliable and secure mesh networking.
-
Support for multiple device roles including Leader, Router, Router-Eligible End Device (REED), and Sleepy End Device (SED).
-
Comprehensive IPv6 networking layer with support for raw data interfaces and ICMPv6.
-
6LoWPAN adaptation layer for efficient transmission of IPv6 packets over IEEE 802.15.4.
-
IEEE 802.15.4 MAC layer with integrated security, frame filtering, and energy scanning.
-
Mesh Link Establishment (MLE) for discovering, configuring, and securing links between neighbors.
-
Distance-vector routing protocol for robust mesh topology management and path optimization.
-
Border Router support for bidirectional IPv6 reachability between Thread and Ethernet/Wi-Fi networks.
-
Integrated UDP socket support for application-layer communication.
-
Built-in CoAP client and server for lightweight RESTful interaction over the mesh.
-
DHCPv6 client and server for automated address configuration and prefix delegation.
-
DNSv6 client for hostname resolution within and outside the Thread network.
-
Spinel protocol support for standardized communication between a host and a co-processor.
-
OT Daemon for managing Radio Co-Processor (RCP) network interfaces in user-space environments.
-
Child Supervision and Periodic Parent Search for maintaining connectivity in dynamic environments.
-
Jam Detection to identify and report radio frequency interference affecting network performance.
-
Support for Thread Commissioner to securely authenticate and add new devices to the network.
-
Narrow Platform Abstraction Layer (PAL) for high portability across different RTOS and hardware architectures.
Architecture
OpenThread is designed with a highly modular and portable architecture that separates the core protocol stack from the underlying hardware and operating system. The system is built around a narrow Platform Abstraction Layer (PAL), which defines the interfaces for radio, timer, non-volatile storage, and entropy sources. This design allows OpenThread to run on a wide variety of platforms, ranging from bare-metal microcontrollers to full-featured POSIX-based operating systems.
The stack is organized into several functional layers. At the base is the IEEE 802.15.4 MAC layer, which handles radio communication and security. Above this, the 6LoWPAN adaptation layer compresses IPv6 headers for efficient transmission. The core of the stack includes Mesh Link Establishment (MLE) for network configuration and the Mesh Routing layer for path management. Application-level services like UDP, CoAP, and DNSv6 are integrated directly into the stack to provide a complete networking solution for IoT devices.
Core Components
- Thread Stack Core: Implements MLE, Mesh Routing, and Thread-specific management logic.
- IPv6/6LoWPAN: Handles IPv6 addressing, fragmentation, and header compression.
- Co-Processor Protocols: Includes Spinel for NCP/RCP communication and the OT Daemon for host-side management.
- Platform Abstraction Layer (PAL): Provides a standardized interface for hardware-specific drivers.
Use Cases
This library is ideal for:
- Smart Home Devices: Powering battery-operated sensors, smart locks, and thermostats that require long battery life and reliable mesh connectivity.
- Commercial Building Automation: Creating large-scale, self-healing wireless networks for lighting control and environmental monitoring.
- Border Routers: Bridging Thread mesh networks to existing IP infrastructure like Wi-Fi or Ethernet for cloud connectivity.
- Industrial IoT: Deploying robust, secure wireless communication in environments where traditional star-topology networks fail.
- Matter-over-Thread: Serving as the underlying transport layer for Matter-certified smart home products.
Getting Started
Developers can begin by exploring the comprehensive documentation and guides available at openthread.io. The repository includes various examples and simulation environments, such as the POSIX-based simulator, which allows for testing Thread networks on a local machine without physical hardware. For hardware integration, the Porting Guide provides a step-by-step walkthrough for implementing the Platform Abstraction Layer on new silicon.
To build the library, developers typically use the provided CMake build system, which supports various configuration options for different device roles (e.g., FTD, MTD) and architectures (SoC, NCP, RCP). Detailed API references for C and C++ are available to assist in building applications directly on top of the OpenThread stack, covering everything from UDP socket management to network commissioning.
Related Projects (14)
View All 14 Projects →ESP32-C6 Matter Over Thread Roof Window Controller
A smart home controller for roof windows that utilizes Matter over Thread on the Espressif ESP32-C6 platform. It combines environmental sensing via an AM2301 sensor with hardware control for window automation, integrating directly into ecosystems like Home Assistant through a Thread border router.
Building Wireless Sensor Networks with OpenThread
A comprehensive collection of Zephyr-based applications demonstrating the development of CoAP-enabled Thread networks. The project covers essential IoT concepts including network commissioning, secure communication via DTLS and X.509 certificates, service discovery, and power optimization for wireless sensor nodes.
Zig Language & Toolchain for ESP-IDF
This project integrates the Zig programming language and toolchain with the Espressif IoT Development Framework (ESP-IDF), supporting both Xtensa and RISC-V architectures. It enables developers to leverage Zig's modern features like comptime and meta-programming while maintaining full compatibility with ESP-IDF's FreeRTOS-based ecosystem.
Silicon Labs Arduino Core
An Arduino core implementation for Silicon Labs microcontrollers, enabling support for Matter, BLE, and low-power wireless applications. It provides a comprehensive set of libraries and drivers for EFR32 and MGM24 series hardware, integrating Silicon Labs' Gecko SDK and FreeRTOS for advanced protocol stacks.
OpenThread nRF52840 Firmware Builder
An automated build system for generating OpenThread firmware images for the nRF52840 platform. It produces UART and USB-enabled binaries for Full Thread Device (FTD) and Radio Co-Processor (RCP) configurations, specifically optimized for Home Assistant and OpenThread Border Router integrations.
ThreadCommissionerKit
A Swift library for iOS and macOS that implements the Thread 1.4 Commercial Commissioning (TCS) flow. It enables automatic discovery of Thread Border Routers via mDNS and secure credential retrieval using EC-JPAKE authentication over DTLS 1.2. Designed for modern Swift concurrency, it allows mobile and desktop applications to seamlessly join and manage Thread networks.
ESPuno Pi Zero
An ESP32-C6 based development board in the Raspberry Pi Zero form factor, designed for high-voltage industrial and IoT applications. It features integrated support for Wi-Fi 6, Bluetooth, Zigbee, and Thread, alongside RS-485/DMX interfaces and a wide 5-60V DC power input range.
Home Smart Mesh SDK for Thingy53
A Zephyr-based reference SDK for the Nordic Thingy53 IoT prototyping platform. It provides drivers and samples for air quality monitoring using the BME688 sensor, OpenThread mesh networking, and C++ application logic with JSON-based configuration.