Skip to main content

OpenThread Demo

Overview

OpenThread Demo Reference Design extends the Golioth Reference Design Template to work with OpenThread. Use this Reference Design as a template when beginning a project with Thread and Golioth. The project implements Golioth's Application Services and Device Management capabilities.

What is Thread?

Thread (and the OpenThread implementation we are using here) is a networking protocol built on top of an 802.15.4 wireless mesh network. It handles the network setup and meshing of small devices using 2.4 GHz radios. Once the network is set up, each device on the mesh network has its own IPv6 address, and uses CoAP (a transport layer) over UDP.

Why Golioth is a great fit for Thread applications

Golioth develops and hosts CoAP-based API endpoints on the web, which are built to receive UDP packets. As such, we can talk directly to the IPv6 addressed devices, and use the Golioth console as a management platform for Thread based devices! Any of the services that Golioth users know and love can be implemented on Thread based devices:

Thread Node

A Thread node is a device in the Thread mesh network that is connected to another Thread node or the Border Router directly. Nodes or Thread devices are either a Router (Parent) or an End Device (Child) and they are either a Full Thread Device (maintains IPv6 address mappings) or a Minimal Thread Device (forwards all messages to its Parent). More information on node roles and type can be found in the OpenThread documentation.

In the context of this Reference Design, Thread nodes are based on the widely available development boards: the nRF52840 DK and the Adafruit nRF52840 Express Feather board. Both development boards feature Nordic's nRF52840 SoC which is commonly used for Bluetooth Low Energy, Bluetooth mesh, Thread and Zigbee applications. The nRF52840 DK is Nordic's versatile development board that exposes all GPIOs and facilitates development by exploiting all features of the nRF52840 SoC. Adafruit's Feather nRF52840 Express is a smaller development board in a friendly Feather form factor—perfect for a low-cost fleet of Thread nodes.

Additional hardware like sensors or actuators aren't needed since this demo is based on the Reference Design Template to showcase Golioth Data Management and Application Services.

  1. nRF52840 DK
  2. Adafruit Feather nRF52840 Express

Thread Border Router

A Thread Border Router connects a Thread network to other IP-based networks, such as Wi-Fi or Ethernet. It also configures a Thread network for external connectivity. It handles processing all of the incoming 802.15.4 traffic by utilizing the Radio Co-Processor (RCP) as a modem and then forwarding packets along. It does the same in the other direction when an inbound packet is being directed towards an IPv6-based Thread device. The Border Router should be completely invisible to Thread Devices, much like a Wi-Fi router is in a home or corporate network.

A Thread Border Router minimally supports the following functions:

  • Bidirectional IP connectivity between Thread and Wi-Fi/Ethernet networks
  • Bidirectional service discovery via mDNS (on a Wi-Fi/Ethernet link) and SRP (on a Thread network)
  • Thread-over-infrastructure that merges Thread partitions over IP-based links
  • External Thread Commissioning (for example, a mobile phone) to authenticate and join a Thread device to a Thread network

Border Routers are packed with a number of features, including:

  • Web GUI for configuration and management
  • Thread Border Agent to support external commissioning
  • DHCPv6 Prefix Delegation to obtain IPv6 prefixes for a Thread network
  • NAT64 for connecting to IPv4 networks
  • DNS64 to allow Thread devices to initiate communications by name to an IPv4-only server
  • Thread interface driver using OpenThread's built-in feature