Radio test

The Radio test sample demonstrates how to configure the 2.4 GHz short-range radio (Bluetooth® LE, IEEE 802.15.4 and proprietary) 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

Requirements

The sample supports the following development kits:

The following board variants do not have DFU capabilities:

S115:

Hardware platform

PCA

Board target

nRF54L15 DK

PCA10156

bm_nrf54l15dk/nrf54l15/cpuapp/s115_softdevice

nRF54L15 DK (emulating nRF54L10)

PCA10156

bm_nrf54l15dk/nrf54l10/cpuapp/s115_softdevice

nRF54L15 DK (emulating nRF54L05)

PCA10156

bm_nrf54l15dk/nrf54l05/cpuapp/s115_softdevice

nRF54LM20 DK

PCA10184

bm_nrf54lm20dk/nrf54lm20a/cpuapp/s115_softdevice

nRF54LS05 DK

PCA10214

bm_nrf54ls05dk/nrf54ls05b/cpuapp/s115_softdevice

nRF54LV10 DK

PCA10188

bm_nrf54lv10dk/nrf54lv10a/cpuapp/s115_softdevice

S145:

Hardware platform

PCA

Board target

nRF54L15 DK

PCA10156

bm_nrf54l15dk/nrf54l15/cpuapp/s145_softdevice

nRF54L15 DK (emulating nRF54L10)

PCA10156

bm_nrf54l15dk/nrf54l10/cpuapp/s145_softdevice

nRF54L15 DK (emulating nRF54L05)

PCA10156

bm_nrf54l15dk/nrf54l05/cpuapp/s145_softdevice

nRF54LM20 DK

PCA10184

bm_nrf54lm20dk/nrf54lm20a/cpuapp/s145_softdevice

nRF54LS05 DK

PCA10214

bm_nrf54ls05dk/nrf54ls05b/cpuapp/s145_softdevice

nRF54LV10 DK

PCA10188

bm_nrf54lv10dk/nrf54lv10a/cpuapp/s145_softdevice

The sample also requires one of the following testing devices:

Note

You can perform the radio test also using a spectrum analyzer. This method of testing is not covered by this documentation.

Overview

To run the tests, connect to the development kit through the serial port and send shell commands. The shell subsystem 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 one millisecond to 99 milliseconds, in steps of one millisecond. The sample also allows you to send a data pattern to another development kit.

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

Note

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.

User interface

Main shell commands (in alphabetical order)

Command

Argument

Description

cancel

Cancel the sweep or the carrier.

data_rate

<sub_cmd>

Set the data rate.

end_channel

<channel>

End channel for the sweep (in MHz, as difference from 2400 MHz).

output_power

<sub_cmd>

Output power set.

parameters_print

Print current delay, channel, and other parameters.

print_rx

Print the received RX payload.

start_channel

<channel>

Start channel for the sweep or the channel for the constant carrier (in MHz, as difference from 2400 MHz).

start_duty_cycle_modulated_tx

<duty_cycle>

Duty cycle as a percentage (two decimal digits, ranging from 01 to 90).

start_rx

<packet_num>

Start RX (continuous RX mode is used if no argument is provided).

start_rx_sweep

Start the RX sweep.

start_tx_carrier

Start the TX carrier.

start_tx_modulated_carrier

<packet_num>

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

start_tx_sweep

Start the TX sweep.

time_on_channel

<time>

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

toggle_dcdc_state

<state>

Toggle DC/DC converter state.

transmit_pattern

<sub_cmd>

Set transmission pattern.

Building and running

This sample can be found under samples/peripherals/radio_test/ in the Bare Metal folder structure.

For details on how to create, configure, and program a sample, see Getting Started with the samples.

Testing

After programming the sample to your development kit, complete the following steps to test it:

  1. Connect both development kits to the computer using a USB cable. The kits are assigned COM ports (Windows) or ttyACM devices (Linux), which are visible in the Device Manager.

  2. Connect to both kits with a terminal emulator that supports VT100/ANSI escape characters (for example, the Serial Terminal app).

  3. Run the following commands on one of the kits:

    1. Set the data rate with the data_rate command to ble_2Mbit.

    2. Set the transmission pattern with the transmit_pattern command to pattern_11110000.

    3. Set the radio channel with the start_channel command to 40.

  4. Repeat all steps for the second kit.

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

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

  7. Set the other kit 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).