简介
Thread is the future of wireless mesh networking, and it’s poised to become a pivotal technology for connecting “things” to the Internet. These “things” have come to be loosely defined as power-sensitive, space-constrained devices that incorporate microcontrollers (MCUs), sensors, RF technology[LL2.1], and software. Wireless connectivity bridges these devices to the Internet, enabling remote control and automation. 市场上有多种支持该网间连结的无线技术,但 Thread 独特地满足连接家庭的具体需要。It fills a critical technology gap in the Internet of Things (IoT) by providing a low-power, secure, and scalable IP-based wireless mesh networking protocol based on proven standards.
物联网
Recent market analysis from leading firms like IoT Analytics projects that the number of global IoT connections will surpass 29 billion by 2030. This massive growth is driven by the expansion of smart home, industrial, and enterprise applications, all of which demand robust and reliable connectivity. [DS3.1]Such an unprecedented level of connectivity is the result of remarkable advances in technology, tracing back to the early 1970s when Intel released the first commercially available microprocessor, the 4004. Ten years later, desktop computing reached the state of the art, ushering in the era of personal productivity. Laptop computing emerged in the 1990s and, coincident with the expansion of the Internet, marked the beginning of connected mobility. However, it wasn’t until the advent of the smartphone in the mid-2000s that we realized the untethered Internet experience. Smartphones combined the power of personal computing with Internet connectivity, putting it in the palms of our hands. Continued advances in low-power computing, sensing, and communication have led to a new class of connected devices. These small, resource-constrained, battery-powered “things” no longer just focus on personal productivity, but rather serve to sense, interact, and automate the world around us. Our homes, our workplaces, and urban environments are being reshaped in radically new and useful ways.
图 1 显示了这些在联网设备演变过程中的变化。
图1:物联网的出现
Why Internet Protocol (IP) Matters
互联网协议 (IP) 是互联网的主要通信协议。IP 为跨越 IP 网络的转发数据报提供核心机制,其路由功能实现网络互联。After decades of the Internet's rapid expansion, IP has become ubiquitous.
天生不支持 IP 的网络技术必须首先在网关适应 IP。This process involves mapping local network addresses and repackaging the network-level payload into an IP datagram. As you can see in Figure 2, encrypted local packets must be decrypted at the gateway and then re-encrypted in the IP datagram.
图2:没有原生 IP 支持的网络
In contrast, local networks that natively support IP, such as Thread and Wi-Fi, can forward and route application payloads without intervention. Packets encrypted in the local network remain secured end-to-end, as shown in Figure 3.
图3:有原生 IP 支持的网络
IPv6 和 IPv4 对比
IPv4 支持 32 位寻址。It became evident in the 1990s that an address space of 4.3 billion (2^32 = 4 294 967 296) was going to be insufficient to support the anticipated growth in Internet connectivity. IPv6 increases the address size to 128-bits and the resulting address space to approximately 240 undecillion! 广域网可以直接确定采用 IPv6 全球唯一地址 (GUA) 的本地设备。
6LoWPAN
6LoWPAN is an acronym for IPv6 over Low-Power Wireless Personal Area Networks. It was designed to enable the efficient transmission of IPv6 datagrams over 802.15.4 links, making it possible for resource-constrained devices to participate natively in the IoT.
6LoWPAN supports three key functions:
Packet Size Adaptation:The smallest IPv6 MTU (maximum transmission unit) supported is 1280 bytes. 采用 UDP(用户数据报协议)和 DTLS(数据报传输层安全)的 802.15.4 数据包中,典型的应用净负载为 63 字节。6LoWPAN provides fragmentation and reassembly mechanisms to adapt IPv6 datagrams to these smaller 802.15.4 payloads. IPv6 packets that don’t fit are split into fragments and transmitted over via 802.15.4. Not all fragments may be received in the correct order. 但是,6LoWPAN 仅要求所有片段都被接收,并且如有需要在重组时会对片段重新排序。
Header compressionTo minimize the overhead of sending IPv6 messages in 802.15.4 frames, 6LoWPAN provides stateless compression mechanisms for both IPv6 and transport headers that take advantage of cross-layer redundancies between protocols such as source and destination addressing, payload length, traffic class, and flow labels. Thread 利用了 IPHC(改进的头压缩)和 NHC(下一个头压缩)。IPHC 用来压缩 IPv6 数据头。 NHC 用来压缩 UDP 数据头。
Layer Two Forwarding:Thread uses IP routing to forward packets. IP 路由表保持与每个目标地址及其下一站的联系。The 6LoWPAN mesh header is used to do link-level next-hop forwarding based on the IP routing table information.
进行连接
网络市场中存在着多样化的无线技术。长期来看,我们看见其中三个主要解决方案将成为互联家居和 IoT 中的领先协议:Wi-Fi, Bluetooth Low Energy (LE), [DS4.1]and 802.15.4 mesh networking protocols. While Wi-Fi remains the powerhouse for high-bandwidth data, the low-power wireless landscape is defined by three key technologies. Bluetooth LE is a ubiquitous standard for point-to-point communication between devices. For robust, many-to-many device communication, Zigbee PRO and Thread both provide highly scalable, low-power mesh networks based on the IEEE 802.15.4 standard. The fundamental difference is that Thread was designed from the ground up for native IP-based networking, whereas Zigbee uses its own distinct addressing and requires an application-layer gateway to connect to IP networks.
The most significant industry development is the introduction of Matter, an application protocol from the Connectivity Standards Alliance that runs on IP networks. Matter unifies the smart home by using Thread as its primary low-power mesh network and Wi-Fi for high-bandwidth needs, while also providing bridging support for non-IP devices, including Zigbee.
Zigbee PRO 和 Thread 等网格技术形成互联家居的主干网。这些自我修复的网络已经过优化,用于支持低带宽控制和自动化应用 ,在这些控制和应用中,电池是否能够持续使用多年至关重要。
10 多年来,Zigbee PRO 一直在 802.15.4 网状网络解决方案中占主导地位。It offers a robust, secure, and scalable mesh network supporting more than 250 nodes as well as extensive support for sleepy end devices for battery-backed operation. Thread builds upon the foundation of ZigBee with advances in security, routing, and fault tolerance. It also addresses the long-awaited pull in the market for mesh networking technology that supports IPv6 and 6LoWPAN, bringing much-needed IP connectivity to each individual end node in the IoT.
The table below lays out the features of the various networking protocols.
| Wi-Fi | 蓝牙 LE | Zigbee PRO | 802.15.4 (Thread) | |
| 带宽 | 150 Mbps+ | 1-2 Mbps | 250 kbps | 250 kbps |
| 低功耗 | 否 | 是 | 是 | 是 |
| 本地 IP 可寻址能力 | 是 | Yes (with 6LoWPAN) | 否 | 是 |
| 网状网络 | 否 | Yes (Bluetooth Mesh) | 是 | 是 |
| Gateway Requirement | Acess Point | 可选 | Required (App-Layer Gateway) | Required (Border Router) |
| 安全 | WPA3, AES | AES-CCM 128-bit | AES-CCM 128-bit | AES-CCM 128-bit |
| 无单一故障点 | 否 | No (standard BLE) | 是 | 是 |
Why Thread Networking Protocol, Why Now?
The Thread Group was formed in July of 2014 to collaborate, pool expertise, and develop a solution to meet these needs. Silicon Labs was among the founding members of the organization along with Nest Labs, Yale Security, Samsung Electronics, Freescale Semiconductor, Big Ass Fans, and ARM. 一年后,Thread 集团发布了 Thread 规范。
Thread 对低功耗和本地 IP 支持的专注展现出了“物体”和互联网之间无缝连接的前景。它不仅能在低成本、电池支持的设备之间提供高效的通讯,还向云端和移动设备提供简化接口。Thread 提供一个强势的新无线网状网络解决方案,而它的设计是为满足互联家居的需求:
Standards-Based Protocol: Open standards-based protocols reap the benefits of technical peer reviews, cross-vendor interoperability, and competition. Thread is based on a foundation of existing IEEE and IETF standards, including IEEE 802.15.4. The official Thread Specification was published by the Thread Group on 2015 年 7 月 13 日.
Evolution for the Modern IoT: A History of Thread's Advancement: Since its introduction, the Thread specification has evolved significantly to meet the growing demands of the IoT. Each version has added critical capabilities, transforming it from a promising new technology into the robust, scalable, and secure network layer it is today. This journey has been pivotal in enabling the unified smart home and expanding into professional markets.
Thread 1.0 (2015 年 7 月): The Foundation for an IP-Based IoT
The initial release established the core principles that still define Thread today. The primary goal was to create a secure, reliable, and low-power wireless mesh network for the home that was built from the ground up on Internet Protocol (IP).
关键特性:
- Native IPv6 Networking (6LoWPAN): Gave every device a unique IP address, eliminating the need for complex application-layer gateways.
- 可自我修复的网状: Created a robust network with no single point of failure. If a node went down, data would automatically find a new path.
- Bank-Grade Security: Mandated end-to-end encryption and device authentication for all communication.
- 低功率操作: Based on the IEEE 802.15.4 radio, it allowed devices to run for years on a single battery.
Thread 1.1 (2017 年 6 月): Enhancing Maturity and Flexibility
The first major update focused on refining the protocol based on early implementations, making it easier for developers to build products and for networks to be managed.
关键特性:
- Improved device commissioning: Streamlined the process of adding new devices to a network.
- Support for channel agility: Allowed a Thread network to change its radio channel to avoid interference, improving reliability.
- Master key fallback: Introduced a mechanism to change the network's master key without needing to recommission every device.
Thread 1.2 (2019 年 6 月): Bridging Ecosystems and Simplifying Setup
This version was a major step towards broader interoperability and a more user-friendly experience, laying the groundwork for the Matter ecosystem to come.
关键特性:
- Bluetooth LE for commissioning: Allowed users to add a new Thread device to their network using their smartphone's Bluetooth connection, a much simpler process than previous methods.
- Standardized border router connectivity: Enabled Thread Border Routers to connect to existing infrastructure networks (like Wi-Fi or Ethernet) in a standardized way.
- Commercial extensions: Added initial features needed for larger, professional installations.
Thread 1.3 (2022 年 10 月): The Cornerstone for Matter
Released in conjunction with Matter 1.0, this version was specifically designed to be the ideal network transport for the new smart home standard. The features were all tailored to ensure seamless, reliable, and consistent performance for Matter devices.
关键特性:
- Harmonized commissioning: Ensured that the process of adding a device to a Thread network and a Matter fabric was a single, fluid experience for the user.
- Improved network responsiveness: Included updates to improve network data propagation and responsiveness, critical for a good user experience with Matter.
- Cross-network consistency: Provided a robust and reliable transport for Matter's application-level commands, ensuring a device works with any controller, regardless of the manufacturer.
Thread 1.4 (2024 年 9 月): Scaling Beyond the Home
The latest release builds on the Matter foundation by significantly enhancing performance and adding features aimed at expanding Thread into demanding commercial and enterprise environments.
关键特性:
- Thread-over-infrastructure: Allows Thread packets to be carried over existing Wi-Fi or Ethernet networks, creating a more interconnected and resilient topology in large or complex buildings.
- Secure commissioning at scale (TCAT): A certificate-based method for securely and rapidly commissioning large volumes of devices in professional settings without needing physical access.
- Enhanced internet connectivity: Provides default-on support for both IPv4-only and IPv6 networks through mechanisms like NAT64/DNS64.
- Advanced network diagnostics: Adds a comprehensive set of new tools for developers and installers to troubleshoot and manage network performance.
简化的配置
Thread does away with some of the complexities of prior mesh networking standards because there are only two node types: router-eligible or end device.
- Router-eligible nodes become routers if needed to support the mesh. 组成网络的第一个路由器合资格节点将自动被指定成为一个路由器和引导。该引导执行额外的网络管理任务,并代表网络做出决定。其它网络中的路由器合资格节点可以自动承担引导的角色,但是每个网络在任何给定时间只能有一个引导。
- Nodes that join as end devices do not support any routing capabilities. Instead, they send messages to a “parent” router that performs routing operations on behalf of its “child.”终端设备通过母源路由发送通讯,并且可被编程成为“睡眠”状态以减少功耗。在多次尝试之后仍不能与其母源通讯的终端设备,将自动搜寻并依附一个新母源。图形4 展示了一个带路由器合资格终端 (REED) 的 Thread 节点网络、一个引导和 Thread 路由器。
图4:Thread 节点类型
基于 IP 的信息传送
Thread 为 IP 提供本地支持。使用名为边界路由器的可用 Thread 的 IP 路由器,所有 Thread 网络中的设备都可拥有一个 IPv6 地址,并且可受到家庭区域网 (HAN) 中的本地设备或离线网络的直接访问。图形 5 展示了一个典型的 Thread 网络设置。
图5:Thread 网络连接
Nodes on the network form IPv6 global addresses from prefixes assigned by border routers or, locally, from a self-assigned prefix to form a unique local address (ULA). 网络中使用的路由 ID 由引导分配。Thread leverages UDP for messaging instead of its heavier weight alternative, TCP (Transmission Control Protocol). 与 TCP 不同,UDP 是一种无连接传输模式的协议,为了获得更快和更高效的传输,它放弃了 TCP 的一些特性,例如错误校验、数据包排序和重发。这个效率相当于更少超载,这对电池支持的、资源受限的设备来说极其重要。为保持轻量,Thread 联合利用约束应用协议 (CoAP) 和 UDP,但克服了 UDP 的一些限制。CoAP 重新并入重试和数据包排序支持。 CoAP 进一步为轻量版本的 GET、POST、PUT 和 DELETE 方法提供支持,这些方法可轻易被转化成 HTTP 以供网络的简化集成使用。Utilizing off-network CoAP to HTTP proxies, Thread makes it possible to query IoT devices directly from a browser.
低功率操作
Thread 使用睡眠终端节点为低功率操作提供广泛的支持。正如名称所提示的一样,这些睡眠设备被设计成在其大多数时间内都处于低功率的睡眠状态。通过 Thread,睡眠设备不需要向网络签到,从而延长电池寿命。向睡眠设备发送的信息会由其母源缓冲。信息传输只在睡眠设备唤醒时才会被触发,并且向其母源轮询任何接收到的信息。
可扩展和弹性
Thread 的构建目的非常明确,旨在支持节点超过 250 个的网络。出于此限制,功能和能力已调整用来最大化吞吐量以及最小化资源要求。在一个 Thread 网络中,活动路由器的最大数量是 32。 它的一个直接而重要的结果就是,路由信息可在网络内被高效分配,以及所有路由器可在网络中保持可见性。随着网络节点的增加以及拓扑学的改变,网络通过交换网状链接建立 (MLE) 信息来适应发展。Additional routers can be autonomously added if there are router-eligible devices operating as end devices. These REEDs listen to routing messages and will petition the Leader of the network to become a router if it is determined necessary to improve the overall performance of the network.
Thread 是一个稳健的、自我修复的、提供零故障的网状网络。如果一个路由器失败了,网络将动态地在失败的节点周围重新路由通信流量。If a Leader fails, another router on the network will be autonomously elected as the new Leader. 多个边界路由器可被用于为离线网络通讯提供故障安全冗余 。
互操作性
Thread 集团已经订立合约购买标准的测试装置,用于认证所有 Thread 堆栈和最终的 Thread 产品。该测试装置将向所有 Thread 会员公司提供,以便在 Thread 认证之前保证高质量的软件研发和测试。
所有 Thread 组件(IC、软件堆栈或模组)在供客户在终端产品使用前必须经过认证并确定 Thread 兼容。希望带有 Thread 商标的所有终端产品设备,必须向任何获批准的测试实验室提交其设备以供该实验室认证。
安全和用户友好型
Thread 网络构建简单,但极为安全。Thread 使用 AES-128 来以 MAC 水平保护所有网络交易,并利用 ECC 和 J-PAKE 算法组合来安全地向网络增加设备(即委任)。应用程序可选择利用基于标准的 IP 安全协议(即 DTLS)来额外保证应用程序的载荷。Thread 网络假设具有一个用户可用来指定向 Thread 网络增加新设备的委任设备。 Thread makes it possible to assign both off-network devices such as smart phones and computers and on-network Thread devices to become Commissioners.
Off network devices must first petition with a Thread Border Router to become a registered Commissioner using a secure DTLS authentication handshake specified by Thread. 一旦注册,边界路由器就会代表候选委员与引导执行公断,以变成一个获授权的委员。
On-network devices do not require registration but may need to perform arbitration with the Leader to be authorized. (引导可确保在网络中一次仅启用一个委员。)一旦获得授权,启用的委员将在整个 Thread 网络中公布。
为了进行添加,用户需要向委任设备发出指示,指明将增加一个新的设备,并且需要输入一个唯一的、与添加设备关联的通行码。这个通告码用于建立一个安全的 DTLS 会话,以便对添加设备进行认证和授权。只有这样设备才能获得 Thread 网络的访问权。一旦设备被添加至网络,委任设备就不再启用。
Thread and Silicon Labs Accelerate Time to Market
With the rapid proliferation of devices for the IoT, it’s more critical than ever to get products from the idea stage onto store shelves as quickly as possible. Thread and Silicon Labs help accelerate time to market by simplified application development and comprehensive network debugging.
1.Application Development
Thread does not specify an application layer but instead provides basic messaging services such as unicast and multicast message services using UDP and CoAP.[DS6.1] Like Wi-Fi, Thread focuses on the secure and reliable transport of information but rather by using a low-power mesh network instead of a high-powered star network. Tools like Silicon Labs AppBuilder simplify the use of these IP messaging services by abstracting away stack-level details through the use of easy-to-use callbacks and plug-ins. 在此框架的应用程序代码开发是高度可携带的,并且可在受支持的 802.15.4 设备间重复使用。 AppBuilder provides a simple GUI to configure devices and networking parameters such as device type, commands, network forming and joining behaviors as well as security modes and operation. Silicon Labs 为 Thread 提供一个可容易定制和扩展的简单应用程序来使其快速入门。
2.Networking Debug
在为网状网络开发应用程序的过程中,理解、适应以及调试网络水平行为是一个重要的开发阶段。 传统解决方案使用无线封包监听器来远程捕捉无线网络交易。Silicon Labs 联网 IC 通过使用一个名为数据包跟踪的独特双线式接口建立了这个功能,它输出每个通过附带链路质量信息的设备来发送和接收的数据包。通过使用一个名为桌面网络分析仪的工具,这种信息可在网络的所有节点间聚合成一个单视图,提供了一个所有联网活动的完整和综合的视图。桌面网络分析仪将所有通信与事件关联,并可解码成 Thread 信息。 可在延长的时间段内输入网络活动来确定网络中不频发的或间歇发生的问题。
Conclusion - Thread Networking Protocol is the Future of IP-Based IoT
We’re entering a new era of Internet connectivity where the IoT will eclipse the historic peaks of desktop computers, laptops, and smartphones combined. 小型、资源受限的设备将在非常广泛和大量的应用程序中驱动这种增长。范围包括从家庭自动化到建立安全传感器,从农业灌溉到工业程序自动化,以及从医疗健康到个人卫生。它将触及我们生活的多个方面,并改变我们与环境互动的方式。这些多数设备将是无线连接。有多种可以提供 IP 连接的无线技术,但我们希望三种解决方案支配联网家庭:Wi-Fi, Bluetooth LE and 802.15.4 mesh networking protocols. Thread 是网状网络的未来。It delivers on the promise of an IP-based mesh networking solution that is secure, reliable, scalable, and optimized for low power operation.
Find more information on Silicon Labs’ Thread networking solutions.
