Internet of Things (IoT) is a conception in which many devices are connected together. Every of this devices can accumulate, process or exchange data using some form of communication. In most cases, this is wireless communication. For that purpose, IoT devices can use many communication protocols, with the most famous ones being Bluetooth, Wi-Fi, ZigBee, LoRaWAN and also – Thread.
What is Thread?
Thread is a low-power mesh networking technology which is dedicated for IoT devices. It uses a 6LoWPAN protocol which utilizes the 802.15.4 radio standard. It enables device-to-device, as well as device-to cloud communication. Due to their unique structure, Thread networks are fault-proof and can self-heal when devices are added or removed from the network. They are also intended to be secure, scalable and power-efficient. If you want to learn more about Thread, be sure to check out its website
Unfortunately, Thread is a proprietary solution, and that’s why OpenThread exists.
What is OpenThread?
OpenThread is an open-source implementation of the Thread technology, created by Nest. It was made to ensure broader availability of the Thread stack for developers, to accelerate the development of IoT devices. It’s OS and platform independent which allows to use it in NCP (network co-processor) designs as well as SoCs (system-on-a-chip). OpenThread implements all features described in the 1.1.1 version of the Thread Specification, as confirmed by a Thread Certified Component certification for several hardware platforms. If you want to learn more about OpenThread, read the guide provided on its website. Here, we will only cover some basic aspects of this technology.
In Thread networks, nodes are split into two main roles: Routers and End Devices. They can be further divided into subcategories and there are other devices, two of them being Border Router and Thread Leader.
- Router – its role is to forward packets for network devices and provide commissioning services for devices trying to join the network. Routers have to have its radio transceiver on all the time.
- End device – it’s a node which communicates with a single router and does not forward packets from other devices. It can also turn off its radio transceiver to save power.
- Thread Leader – it’s a Router which manages set of other Routers in the OpenThread network. It is dynamically self-elected and can distribute network configuration to other devices.
- Border Router – it’s a device which can forward packets from the Thread network to non-Thread network (for example Wi-Fi).
OpenThread support in Zephyr OS
If you don’t know what is Zephyr OS, you can read more about it here. It provides not only typical kernel functionalities, but also APIs for things like power management, storage, and networking.
In March 2018, the Zephyr Project released the 1.11 version of the OS, which included many new features. One of them was integration with OpenThread. From that moment, Zephyr developers have been able to easily incorporate OpenThread in their applications.
Zephyr provides two example applications that can be used with OpenThread: echo_client and echo_server. When compiled with proper OpenThread overlay, these samples demonstrate a simple network where two nodes trade data in a ping-pong-like manner. But how can we send data from OpenThread nodes to a non-OpenThread network? That’s what we will try to cover in next article.
OpenThread allows us to achieve the Internet connectivity on small, low-power IoT devices. That opens a lot of opportunities – we can send MQTT messages or query SNTP servers among other things.
In LPN Plant we connect consulting, technical expertise and financial effectiveness to design and implement low power wireless solutions for industry. If you are looking for product developers or just need support in a piece of your system feel free to contact us. If you enjoying this type of content feel free to share content on social media.