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.
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.
The application measures the following parameters:
The application supports the following modes:
You can use the following set of commands to configure your tests:
test peer discover
– Discover other boards running the throughput measurement application within the same Thread Network.test info
– Display the current test configuration.test start
– Start the test. The the result is printed after it is finished.test stop
– Stop the test.test peer select
– Select the peer to participate in the test. The first discovered peer is selected by default.test peer list
– List the discovered peers.test peer results
– Display the results of the last test from the selected peer.test configure ack-timeout
– Set the response time-out for ACK and echo mode in milliseconds.test configure count
– Set the number of packets sent during the test.test configure length
– Set the length of packets sent during the test.test configure mode [unidirectional|echo|ack]
– Set the test mode.Use the following commands to configure and run the BLE features supported by this example.
Use the following commands to configure the BLE advertising during the tests:
ble info
– Display the current Bluetooth configuration.ble adv info
– Display the current Bluetooth advertising configuration.ble adv interval
– Set advertising interval in ms.ble adv size
– Set advertising data length in bytes.ble adv start
– Start Bluetooth advertising.ble adv stop
– Stop Bluetooth advertising.Use the following commands to configure the BLE connection during the tests:
ble conn bdaddr
– Get Bluetooth Device Address.ble conn info
– Display the current Bluetooth connection configuration.ble conn interval
– Set the connection interval in ms.ble conn scan_interval
– Set the scan interval in ms.ble conn scan_window
– Set the scan window in ms.ble conn slave_latency
– Set the slave latency in number of connection events.ble conn start
– Connect to the specified Bluetooth Device Address.ble conn stop
– Disconnect from the currently connected device.Use the following commands to send ping packets to the connected device:
ble ping
– Start sending the specified number of random bytes with the specified cadence.ble ping stop
– Stop sending packets over BLE.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:
cpu_utilization clear
– Clear the CPU utilization measurement.cpu_utilization deinit
– Deinitialize the CPU utilization measurement.cpu_utilization get
– Get the current CPU utilization measurement.cpu_utilization init
– Initialize the CPU utilization measurement.cpu_utilization start
– Start the CPU utilization measurement.cpu_utilization stop
– Stop the CPU utilization measurement.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.
remote <peer_num> <cmd>
– Send command <cmd> to peer <peer_num>.Example:
You can find the source code and the makefile in the following folders:
<InstallFolder>/examples/multiprotocol/benchmark/thread
<InstallFolder>/components/softdevice/s140
test info
command.test peer discover
command to connect to the second board.test start
command and observe the logs.