Radio Test

The Radio Test sample demonstrates how to configure the radio in a specific mode and then test its performance. The sample provides a set of predefined commands that allow you to configure the radio in three modes:

  • Constant RX or TX carrier

  • Modulated TX carrier

  • RX or TX sweep


You can run the tests by connecting to the board through the serial port and sending shell commands. Zephyr’s Shell module is used to handle the commands. At any time during the tests, you can dynamically set the radio parameters, such as output power, bit rate, and channel. In sweep mode, you can set the time for which the radio scans each channel from 1 millisecond to 99 milliseconds, in steps of 1 millisecond. The sample also allows you to send a data pattern to another board.

The sample starts with enabling the high frequency crystal oscillator and configuring the shell. You can then start running commands to set up and control the radio. See User interface for a list of available commands.


For the IEEE 802.15.4 mode, the start channel and the end channel must be within the channel range of 11 to 26. Use the start_channel and end_channel commands to control this setting.


The sample supports the following development kits:

Hardware platforms


Board name

Build target

nRF5340 PDK




nRF52840 DK




nRF52 DK




You can use any one of the development kits listed above.


On nRF5340 DK, the sample is designed to run on the network core.

The sample also requires one of the following testing devices:


The radio test can be also performed using a spectrum analyzer. This method of testing is not covered by this documentation.

User interface

Main shell commands (in alphabetical order)





Cancel the sweep or the carrier.



Set the data rate.



End the channel for the sweep.



Output power set.


Print current delay, channel, and other parameters.


Print the received RX payload.



Start the channel for the sweep or the channel for the constant carrier.



Duty cycle in percent (two decimal digits, between 01 and 99).


Start RX.


Start the RX sweep.


Start the TX carrier.



Start the modulated TX carrier (continuous TX mode is used if no argument is provided).


Start the TX sweep.



Time on each channel (between 1 ms and 99 ms).



Toggle DC/DC converter state.



Set transmission pattern.

Building and running

This sample can be found under samples/peripheral/radio_test in the nRF Connect SDK folder structure.

See Building and programming a sample application for information about how to build and program the application.


On the nRF5340 PDK board (PCA10095), the Radio Test sample is a standalone network sample that does not require any counterpart application sample. However, you must still program the application core to boot up the network core. You can use any sample for this, for example nRF5340: Empty firmware for application core.


After programming the sample to your board, you can test it in one of two ways.


For the nRF5340 PDK board (PCA10095), see Logging output on the network core for information on how to make the PC terminal work with the network core.

Testing with another board

  1. Connect both boards to the computer using a USB cable. The boards are assigned a COM port (Windows) or ttyACM device (Linux), which is visible in the Device Manager.

  2. Connect to both kits with a terminal emulator (for example, PuTTY). See How to connect with PuTTY for the required settings.

  3. Run the following commands on one of the boards: #. Set the data rate with the data_rate command to ble_2Mbit. #. Set the transmission pattern with the transmit_pattern command to pattern_11110000. #. Set the radio channel with the start_channel command to 40.

  4. Repeat all steps for the second board.

  5. On both boards, run the parameters_print command to confirm that the radio configuration is the same on both boards.

  6. Set one board in the Modulated TX Carrier mode using the start_tx_modulated_carrier command.

  7. Set the other board in the RX Carrier mode using the start_rx command.

  8. Print the received data with the print_rx command and confirm that they match the transmission pattern (0xF0).

Testing with RSSI Viewer

  1. Connect the board to the computer using a USB cable. The board is assigned a COM port (Windows) or ttyACM device (Linux), which is visible in the Device Manager.

  2. Connect to the kit with a terminal emulator (for example, PuTTY). See How to connect with PuTTY for the required settings.

  3. Set the start channel with the start_channel command to 20.

  4. Set the end channel with the end_channel command to 60.

  5. Set the time on channel with the time_on_channel command to 50ms.

  6. Set the board in the TX sweep mode using the start_tx_sweep command.

  7. Start the RSSI Viewer application and select the board to communicate with.

  8. On the application chart, observe the TX sweep in the form of a wave that starts at 2420 MHz frequency and ends with 2480MHz.


This sample uses the following nrfx dependencies:

  • nrfx/drivers/include/nrfx_timer.h

  • nrfx/hal/nrf_nvmc.h

  • nrfx/hal/nrf_power.h

  • nrfx/hal/nrf_radio.h

  • nrfx/hal/nrf_rng.h

In addition, it uses the following Zephyr libraries: