Setting up OpenThread Border Router on NAVQ Plus


This application note provides a step-by-step guide on how to set up an OpenThread Border Router on the NAVQ Plus platform.

Thread Protocol

The Thread protocol is a low-power, wireless mesh networking protocol designed for smart home and IoT (Internet of Things) applications. It is built on open standards and operates on IEEE 802.15.4 radio frequencies, providing reliable and secure communication between devices.

Key features of the Thread protocol include:

  1. Mesh Networking: Thread enables devices to form a self-healing and self-configuring mesh network. Devices can communicate with each other directly or through neighboring nodes, ensuring robust connectivity and extended range.

  2. Low Power Consumption: Thread is designed for low-power devices, allowing them to operate on battery power for extended periods. It incorporates power-saving mechanisms such as sleepy end devices and efficient routing protocols.

  3. IPv6 Support: Thread utilizes IPv6 (Internet Protocol version 6), providing each device in the network with a unique IP address. This enables seamless integration with the internet and simplifies communication between Thread devices and other IPv6-enabled devices.

  4. Security: Thread prioritizes security and employs strong encryption mechanisms to protect data transmitted over the network. It includes features like secure key exchange, secure network joining, and secure data communication.

  5. Scalability: Thread networks can support hundreds of devices, allowing for the deployment of large-scale IoT applications. The protocol ensures efficient network management and resource utilization.

  6. Interoperability: Thread is designed to be interoperable, allowing devices from different manufacturers to communicate and work together seamlessly within a Thread network.

Thread provides a reliable and efficient networking solution for smart home automation, industrial control, and other IoT applications. Its open standard nature and support from industry alliances make it an attractive choice for building connected and interoperable ecosystems.

Thread Border Router

A Thread Border Router (TBR) is a device that connects a Thread network to other IP-based networks, such as the internet or local area networks (LANs). It acts as a gateway, facilitating communication between Thread devices and devices or services outside the Thread network.

Thread Radio Co-Processor

A Thread Radio Co-Processor (RCP) serves as the interface between the NAVQ Plus, where the OpenThread Border Router (OTBR) runs under Linux, and the Thread radio communication. The OTBR is compatible with various adapters, including the SONOFF Zigbee 3.0 USB Dongle Plus-E, commonly known as ZBDongle-E (available for purchasing on Amazon).

The ZBDongle-E is a Zigbee 3.0 USB dongle that supports the Thread protocol in addition to Zigbee. It acts as the Thread Radio Co-Processor for the NAVQ Plus, facilitating communication with Thread-enabled devices in the network.

By utilizing the ZBDongle-E or a similar compatible adapter, the NAVQ Plus can function as an OpenThread Border Router, enabling connectivity between the Thread network and other IP-based networks. This setup allows seamless integration of Thread devices with external devices or services, expanding the capabilities of the NAVQ Plus in a Thread network environment.

Hardware Setup

Connect the ZBDongle-E to the NAVQ Plus using an USB hub that is plugged into the USB1 port of the NAVQ Plus.

Flashing RCP Dongle

To utilize the Thread network with the ZBDongle-E and enable the Thread Radio Co-Processor firmware, follow these steps to flash the firmware using the Silabs universal flasher on the NAVQ Plus:

  1. Install the Silabs universal flasher on the NAVQ Plus running the command below:

user@imx8mpnavq:~$ pip3 install universal-silabs-flasher

Download the RCP firmware:

user@imx8mpnavq:~$ wget

To flash the firmware onto the ZBDongle-E, use the following command:

user@imx8mpnavq:~$ sudo universal-silabs-flasher --device /dev/ttyACM0 \ flash --firmware ot-rcp-v2.3.1.0-zbdonglee-230400.gbl --allow-cross-flashing

Unplug the dongle and plug it back. Run the below command to verify it is connected:

user@imx8mpnavq:~$ ls -la /dev/ttyACM0 crw-rw---- 1 root dialout 166, 0 Oct 19 11:36 /dev/ttyACM0

Software Setup

To ensure the proper operation of the Thread network with the NAVQ Plus, use NAVQ+ BSP Release 1.1.9 or higher.

To enable the OTBR (OpenThread Border Router) agent service to start automatically when the system boots, run the following command:

user@imx8mpnavq:~$ sudo systemctl enable otbr-agent Created symlink /etc/systemd/system/otbr-agent.service → /lib/systemd/system/otbr-agent.service. Created symlink /etc/systemd/system/ → /lib/systemd/system/otbr-agent.service.

Enter the following command to start the OTBR agent service:

user@imx8mpnavq:~$ sudo systemctl restart otbr-agent

To verify if the OTBR agent has started successfully, use the following command:

● otbr-agent.service - OpenThread Border Router Agent Loaded: loaded (/lib/systemd/system/otbr-agent.service; enabled; vendor preset: disabled) Active: active (running) since Mon 2023-10-23 16:08:56 UTC; 6s ago Process: 2623 ExecStartPre=/usr/sbin/service mdns start (code=exited, status=0/SUCCESS) Main PID: 2642 (otbr-agent) Tasks: 1 (limit: 3198) Memory: 1.6M CPU: 82ms CGroup: /system.slice/otbr-agent.service └─2642 /usr/sbin/otbr-agent -I wpan0 -B mlan0 spinel+hdlc+uart:///dev/ttyACM0 trel://mlan0 Oct 23 16:08:57 imx8mpnavq otbr-agent[2642]: 00:00:00.855 [I] Platform------: [netif] ADD [M] ff03:0:0:0:0:0:0:fc (already subscribed, ignored) Oct 23 16:08:57 imx8mpnavq otbr-agent[2642]: 00:00:00.856 [I] Platform------: [netif] ADD [M] ff03:0:0:0:0:0:0:1 (already subscribed, ignored) Oct 23 16:08:57 imx8mpnavq otbr-agent[2642]: 00:00:00.856 [I] Platform------: [netif] ADD [M] ff02:0:0:0:0:0:0:16 (already subscribed, ignored) Oct 23 16:09:00 imx8mpnavq otbr-agent[2642]: 00:00:03.798 [I] Platform------: [netif] Message dropped by Thread Oct 23 16:09:01 imx8mpnavq otbr-agent[2642]: 00:00:05.340 [I] Mle-----------: Send Link Request (ff02:0:0:0:0:0:0:2) Oct 23 16:09:02 imx8mpnavq otbr-agent[2642]: 00:00:05.580 [W] Platform------: Handle transmit done failed: ChannelAccessFailure Oct 23 16:09:02 imx8mpnavq otbr-agent[2642]: 00:00:05.580 [I] Mac-----------: Frame tx attempt 16/16 failed, error:ChannelAccessFailure, len:61, seqnum:228, type:Data, src:6ae36605355389d5, dst:0xffff, sec:no, ackreq:no Oct 23 16:09:02 imx8mpnavq otbr-agent[2642]: 00:00:05.580 [N] MeshForwarder-: Failed to send IPv6 UDP msg, len:82, chksum:002c, ecn:no, to:0xffff, sec:no, error:ChannelAccessFailure, prio:net Oct 23 16:09:02 imx8mpnavq otbr-agent[2642]: 00:00:05.580 [N] MeshForwarder-: src:[fe80:0:0:0:68e3:6605:3553:89d5]:19788 Oct 23 16:09:02 imx8mpnavq otbr-agent[2642]: 00:00:05.580 [N] MeshForwarder-: dst:[ff02:0:0:0:0:0:0:2]:19788 ~

Creating Dataset

Initialize a new dataset:

user@imx8mpnavq:~$ sudo ot-ctl dataset init new Done

To set up network credentials such as the Personal Area Network ID (PAN ID), Extended Personal Area Network ID (XPAN ID), Network Name, and Network Key, use the following commands:

user@imx8mpnavq:~$ sudo ot-ctl dataset panid 0xdaf7 Done user@imx8mpnavq:~$ sudo ot-ctl dataset extpanid 1122334455667788 Done user@imx8mpnavq:~$ sudo ot-ctl dataset networkname OpenThread Done user@imx8mpnavq:~$ sudo ot-ctl dataset networkkey 00112233445566778899aabbccddeeff Done

To generate the Pre-Shared Key (PSK) using the pskc command, use the following syntax:


Replace PASSPHRASE, EXTPANID, and NETWORK_NAME with the appropriate values for your network:

user@imx8mpnavq:~$ pskc 654321 1122334455667788 OpenThread 07708bf664c00858c19269cf10261e5b

Set pskc using the output of the command below:

user@imx8mpnavq:~$ sudo ot-ctl dataset pskc 07708bf664c00858c19269cf10261e5b

Commit the active dataset:

user@imx8mpnavq:~$ sudo ot-ctl dataset commit active Done

Add the on-mesh prefix:

user@imx8mpnavq:~$ sudo ot-ctl prefix add fd11:22::/64 pasor Done

Issue the below commands to start the Thread network:

user@imx8mpnavq:~$ sudo ot-ctl ifconfig up Done user@imx8mpnavq:~$ sudo ot-ctl thread start Done user@imx8mpnavq:~$ sudo ot-ctl netdata register Done

Wait for 10 seconds and verify the Thread network status:

user@imx8mpnavq:~$ sudo ot-ctl state leader Done

To obtain the active dataset for use with the chip-tool, issue the following command:

user@imx8mpnavq:~$ sudo ot-ctl dataset active -x 0e080000000000010000000300000b35060004001fffe00708fdebe98b055ed9440c0402a0f7f80102daf702081122334455667788030a4f70656e546872656164051000112233445566778899aabbccddeeff041007708bf664c00858c19269cf10261e5b Done

The active dataset contains information such as network settings, security keys, and other configuration parameters.

Please refer to Connecting Eve Energy with NAVQ Plus Using Matter Protocol page as an example of connecting to a Thread device using the Matter protocol. This page provides detailed instructions and guidance on how to establish a connection and integrate the Eve Energy smart plug with the NAVQ Plus using the Matter protocol.