nRF5 SDK for Thread and Zigbee v2.0.0
Thread Throughput Measurement Application

Table of Contents

The Throughput Measurement application allows for measuring throughput, packet error rate, and CPU utilization in different scenarios. The application exposes a CLI interface for easy test management. Additionally, it supports several Bluetooth features: advertisement with configurable payload length, scanning and connection to a given BLE device address, and sending payload over BLE using the Nordic UART Service (NUS). This makes it possible to measure the performance impact of the multiprotocol solution.

Note
For measurement purposes, use at least two boards when running this application.

Description

The Throughput Measurement application provides two CLI interfaces:

The application automatically creates or joins a Thread network on channel 11. CLI commands can be run using a terminal application like PuTTY configured according to the following CLI terminal settings.

Measured parameters

The application measures the following parameters:

Note
Throughput and PER are calculated in one direction only.

Test modes

The application supports the following modes:

Test configuration commands

You can use the following set of commands to configure your tests:

Bluetooth configuration commands

Use the following commands to configure and run the BLE features supported by this example.

Bluetooth advertising configuration

Use the following commands to configure the BLE advertising during the tests:

Bluetooth connection configuration

Use the following commands to configure the BLE connection during the tests:

Bluetooth ping configuration

Use the following commands to send ping packets to the connected device:

CPU utilization commands

The CPU utilization can be started and stopped multiple times allowing for the measurement of the average utilization from many non-continuous time periods. The clear command removes stored data.

Use the following commands to configure the CPU utilization measurement:

Running commands remotely on discovered peers

Commands can be issued on the discovered peers. The command response is then forwarded to the origin of a remote command. This allows for easy test management, especially when the test consists of multiple nodes.

Example:

remote 0 test info

Setup

You can find the source code and the makefile in the following folders:

Testing

  1. Prepare two nRF52840 Development Kits.
  2. Flash the SoftDevice to both boards according to the instructions in Running examples.
  3. Build the example according to the instructions in Building examples.
  4. Run the following commands on both boards to flash the application:
    $ cd <InstallFolder>/examples/multiprotocol/benchmark/thread/hex
    $ nrfjprog -f NRF52 --sectorerase --program nrf52840_xxaa.hex
  5. Reset the boards.
  6. Connect to the boards (for example, using PuTTY).
    Note
    Wait until the network is formed. One of the boards should have role 4 (Leader), while the second one should have role 3 (Router). You can check this by observing the logs:
    Flags: 0x00000464 Current role: 3
  7. Choose one of the boards and run the test info command.
  8. Run the test peer discover command to connect to the second board.
  9. Run the test start command and observe the logs.
  10. You will be able to observe similar results to the following:
=== Test Finished ===
Acknowledgements lost: 3
Test duration: 17445ms
Average local CPU utilization 19.01%
Average peer CPU utilization 18.53%
Packets received: 999
Payload received: 63936B
Total frames received: 1046
Incorrect frames received: 0
Throughput: 3665.4B/s
PER: 0.100%
Done

Documentation feedback | Developer Zone | Subscribe | Updated