Using a Thread-Based Kit to Speed Development of Smart Home IoT Devices
投稿人:DigiKey 北美编辑
2016-08-25
Designed to ensure simple, reliable connectivity in home device networks, Thread offers an attractive solution to developers of smart products. Still, developers can face challenges in meeting requirements for both high-performance and low-power operation in these networks. Using a comprehensive development platform tuned for Thread-based connectivity, engineers can rapidly implement sophisticated solutions able to take full advantage of Thread's ability to ensure secure, reliable connectivity for networking smart products in the home.
The Internet of Things (IoT) promises pervasive connectivity to anything of interest to individuals and organizations. As developers seek to exploit the tremendous opportunities afforded by the IoT, they find themselves facing not only new challenges but also a combination of hardware and software requirements that can stall even the most experienced designer.
On the hardware side, wireless connectivity solutions need to meet often-conflicting demands for reliability, security, and low-power operation. On the software side, developers can find themselves stuck in the lower layers of their application stack, struggling to debug underlying communications rather than focusing on the unique aspects of their higher-level application code.
Although IoT designs offer similarities to "conventional" embedded systems, they levy unique requirements for connectivity from basic radio performance to high-level messaging capabilities. The SLWSTK6000A wireless starter kit from Silicon Labs combines a full-featured system based on the EFR32MG (Mighty Gecko) wireless SoC with a comprehensive ecosystem built around Thread, a unique networking protocol designed specifically to address the challenges and opportunities of the IoT.
Reliable connectivity
Market research firm Gartner Inc. projects that by 2022 individual family homes could contain several hundred smart devices built into entertainment, appliances, security, environmental, and fitness products, among others. At the same time, the lack of standards for interoperability could significantly stunt this growth potential. In this environment, the Thread specification seeks to emerge as "The Wi-Fi of Mesh Networking" and presents compelling advantages for earning a place among the various wireless technologies likely to serve different roles for connecting these devices in the home (Table 1).
Wi-Fi | Bluetooth Smart | ZigBee PRO | Thread | |
Bandwidth | 150 Mbps+ | 1 Mbps | 250 kbps | 250 kbps |
Low Power Consumption | No | Yes | Yes | Yes |
Native IP Addressability | Yes | No | No | Yes |
Simple IP Bridging | Yes | No | No | Yes |
Mesh Networking | No | No | Yes | Yes |
Practical Network Size Limit | 32 | 10 | 250+ | 250+ |
Security Support | AES-128/256 | AES-128 | AES-128 | AES-128, ECC |
No Single Point of Failure | No | No | No | Yes |
Table 1: Comparison of wireless technologies for home-based smart connected devices (Source: Silicon Labs)
The Thread Group was founded in 2014 by ARM, Big Ass Fans, NXP, Samsung, Silicon Labs, and Yale and now includes around 230 member companies representing a broad cross-section of the electronics industry. Based on open standards, Thread is intended to enable secure and reliable mesh networks with no single point of failure, simple setup and connectivity, and low-power operation.
In Thread, devices operate in a number of specific roles distinguished by the services they provide other devices in the network. Devices serving as Routers provide routing services to other network devices as well as security services and services that allow an authorized device to join the network. The first Router on a network becomes a special type of Router, called the Leader, which manages network parameters, coordinates commissioners for adding new devices, and makes network decisions. Another special type of Router, the Border Router, provides services for devices within the 802.15.4 network, including routing services for off-network operations. Finally, Sleepy End Devices are host devices that communicate only through their parent Router.
The topology of a Thread network depends on the number of Routers. If the network includes only one Router or Border Router, it forms a basic star topology around that single Router. If the network includes more than a single Router or Bridge Router, it automatically configures itself to a mesh topology (Figure 1, left).
Although a Thread network can include a number of devices performing special functions, the design of the Thread stack ensures that they can be replaced without impacting the ongoing communication within the Thread network. As a result, no device in such a network represents a single point of failure. For example, if the device serving as the Leader fails, another Router becomes the Leader, even promoting Router-Eligible End Devices (REEDs) to Router status to improve connectivity if required (Figure 1, right).
Figure 1: Devices running the Thread stack automatically configure themselves into a mesh network comprising a Leader, Bridge Routers, Routers, and Sleepy End Devices (left), but can quickly reconfigure if a key device such as the Leader fails (right). (Source: Thread Group)
The Thread stack (Figure 2) builds on 6LoWPAN (IPv6 over Low power Wireless Personal Area Networks), which itself builds on IEEE 802.15.4 to offer IP-based networking. Internet Protocol (IP) provides the core mechanism for relaying datagrams across IP networks, and its routing capabilities enable internetworking.
Indeed, IP networking is fundamental to the Internet and any IoT application. In fact, applications based on non-IP protocols face a distinct performance disadvantage: Networking solutions that do not natively support IP must first be adapted to IP at a gateway in a process that requires mapping of the local network addresses and repackaging of the network-level payload into an IP datagram. Furthermore, local packets that are encrypted must be decrypted at the gateway and then re-secured in the IP datagram. Performing this translation adds further design complexity and cost in an environment seeking to optimize design, cost and performance. Thread's IP-based protocol helps streamline network transactions and costs.
Figure 2: Thread adds specialized services such as security and commissioning on top of a layer of familiar standards to enable delivery of self-healing IP-based networks for smart products. (Source: Thread Group)
Hardware support
The Silicon Labs EFR32MG1P732F256GM32 wireless SoC provides direct support for the performance and functional requirements of this stack. Built using Silicon Labs' low-energy Gecko technology, the SoC features low-power energy modes, while integrating 256 kB Flash, 32 kB RAM, 16 digital I/O pins, 7 x 16-bit timers and multiple communication interfaces. At the heart of the SoC, an ARM® Cortex®-M4-based MCU is designed for exceptionally short response time, high code density, and high 32-bit throughput, all while maintaining a tight cost and power consumption budget.
The SoC's on-chip radio transceiver (Figure 3) provides a 19.5 dBm maximum output power with a receive sensitivity of -99 dBm (250 kbps O-QPSK DSSS). Designed using a low-IF receiver architecture, the transceiver includes a low-noise amplifier (LNA) followed by an I/Q down-conversion mixer. The I/Q signals are in turn filtered and amplified before sampling by the IF analog-to-digital converter (IFADC). The Automatic Gain Control (AGC) module adjusts the receiver gain to optimize performance and avoid saturation.
Figure 3: The Silicon Labs EFR32MG1P732F256GM32 and other members of the EFR32MG1 family of wireless SoCs integrate a sophisticated transceiver designed to accommodate a wide range of radio protocols and PHYs including 802.15.4. (Source: Silicon Labs)
Among its advanced features, the radio generates a Received Signal Strength Indicator (RSSI) value for each received frame, providing essential hardware support for a fundamental Thread mechanism. With Thread, devices use RSSI values to publish a "link cost" for incoming messages to that device. In turn, Routers use the link costs published across the network to determine the best path through the network.
Besides messages with actual data payloads, devices in a Thread network periodically send administrative messages such as link costs. During quiet periods, however, devices can settle into low-power quiescent modes. In the past, developers needed to add code to wake the device periodically to check for messages. Unfortunately, this approach can result in inefficiencies due to wasted wake periods or the requirement to repeat missed messages if the intended recipient was in quiescent mode. The EFR32MG1 provides an effective alternative with its integrated RFSENSE module. This module generates a system wakeup interrupt upon detection of wideband RF energy at the antenna interface, providing true RF wakeup capabilities from low-power modes.
For developers of connected applications for the home, Thread works with application-level protocols such as Google Next Weave, ZigBee, and CoAP (Constrained Application Protocol), among others, to simplify development of interactive application-level communications over the Internet. For example, CoAP operates as a kind of binary HTTP, providing basic HTTP-like transactions including GET, POST, PUT, and DELETE. The protocol provides in-order message delivery and guaranteed delivery using resends and ACKs, but developers can also omit message confirmation if the application does not require guaranteed delivery (Figure 4).
Figure 4: CoAP's HTTP-like messaging protocol provides for confirmable (CON, left) and non-confirmable (NON, right) transactions, using transaction identifiers (e.g., 0x7a10, left) and authorization tokens (e.g., 0x73, left). (Source: The Thread Group)
Rapid development kit
The complex requirements for high performance, reliable communications, and flexible networking can present a significant challenge for developers creating connected smart products for the home. Engineers could build solutions from scratch using devices such as the EFR32MG1P732F256GM32 wireless SoC and software including Thread's open software and libraries for the underlying communications layers. On the other hand, Silicon Labs' SLWSTK6000A Wireless Starter Kit offers a comprehensive development platform able to help developers accelerate design of Thread connectivity solutions for new smart home products.
On the hardware side, the primary component of the SLWSTK6000A is the Wireless Starter Kit mainboard, which features an on-board J-Link debugger, an advanced energy monitor for real-time current and voltage monitoring, a virtual COM port interface, and access to the packet trace interface (PTI) (Figure 5). Silicon Labs also includes its Si7021 relative humidity and temperature sensor to help developers gain familiarity with sensing applications without requiring additional hardware development. Along with the J-Link on-board debugger, the board includes a debug multiplexer that supports external hardware as well as the companion radio board.
Figure 5: The Silicon Labs SLWSTK6000A Wireless Starter Kit accepts wireless radio cards such as the SLWRB4154A designed to support specific connectivity options. (Source: Silicon Labs)
The main board accepts a complementary radio board that plugs into a designated slot on the mainboard. The modular design supports different radio boards, enabling developers to develop Bluetooth low energy, Thread, ZigBee, and proprietary wireless applications. Designed to support Thread, the SLWRB4154A wireless radio board includes the EFR32MG1P732F256GM32 wireless SoC and associated components. (The main board contains a separate MCU that is responsible for some of the advanced kit features provided but is not user programmable.) Most of the EFR32MG1P732F256GM32's pins are routed from the radio board to breakout pads at the top and bottom edges of the main board.
The kit provides a comprehensive software package that includes software libraries for the Thread SDK and underlying protocols as well as the Silicon Labs Simplicity Studio development environment. Based on Eclipse, Simplicity Studio is designed to let developers focus on their application code rather than the underlying hardware and software service layers. At startup, Simplicity Studio identifies the connected hardware, prompting the developer to connect the hardware if not found. Simplicity Studio then automatically installs software packages related to the connected hardware.
Simplicity Studio also simplifies project development by providing a series of screens that guide the developer through project creation, code generation, and upload to the connected hardware. To create a new application, the developer needs only complete a simple dialog to specify the kit, part and SDK, which is the Thread SDK in this context (Figure 6).
Figure 6: The Silicon Labs Simplicity Studio provides developers with a series of dialog screens designed to speed project development. Here, the developer creates a new project by selecting the kit, part and SDK; Simplicity Studio automatically fills in kit and part for recognized hardware. (Source: Silicon Labs)
In fact, if it detects the hardware, Simplicity Studio will automatically fill in the kit and part numbers. In the next screen, the developer selects the device type from a list that includes Server, Client, and Sleepy Client, among others. Within Simplicity Studio, a Radio Configurator allows the developer to select a radio profile and radio PHY based on standards such as 802.15.4 for Thread applications. After adding application-specific code, the developer uses the AppBuilder to generate the application source files. At this point, the developer can manually compile the code and then flash it to the connected development hardware, or even easier, simply allow AppBuilder to compile and flash the application automatically to the connected hardware. At that point, the developer has a complete Thread-based connectivity solution that can be extended as needed to meet additional requirements.
Conclusion
Intended to connect smart products in the home, Thread offers an attractive combination of simplicity and reliability. For developers, however, implementing a Thread network from scratch can be time-consuming in a market where rapid product delivery is essential for success. A complete development platform such as the Silicon Labs SLWSTK6000 allows developers to focus on the unique features of their application, relying on the kit's hardware, software and development environment for underlying connectivity services.
免责声明:各个作者和/或论坛参与者在本网站发表的观点、看法和意见不代表 DigiKey 的观点、看法和意见,也不代表 DigiKey 官方政策。