.. _radio_test: Radio test (short-range) ######################## .. contents:: :local: :depth: 2 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: .. table-from-sample-yaml:: You can use any one of the development kits listed above. .. note:: On nRF5340 DK and nRF7002 DK, the sample is designed to run on the network core and requires the :ref:`nrf5340_remote_shell` running on the application core. This sample uses the :ref:`shell_ipc_readme` library to forward shell data through the physical UART interface of the application core. The sample also requires one of the following testing devices: * Another development kit with the same sample. See :ref:`radio_test_testing_board`. * Another development kit connected to a PC with RSSI Viewer application (available in the `nRF Connect for Desktop`_). See :ref:`radio_test_testing_rssi`. .. note:: You can perform the radio test also using a spectrum analyzer. This method of testing is not covered by this documentation. nRF21540 front-end module ========================= .. include:: /includes/sample_dtm_radio_test_fem.txt You can configure the nRF21540 front-end module (FEM) transmitted power control, antenna output and activation delay using the main shell commands of the :ref:`radio_test_ui`. Skyworks front-end module ========================= .. include:: /includes/sample_dtm_radio_test_skyworks.txt You can configure the Skyworks front-end module (FEM) antenna output and activation delay using the main shell commands of the :ref:`radio_test_ui`. Overview ******** To run the tests, connect to the development kit through the serial port and send shell commands. Zephyr's :ref:`zephyr:shell_api` 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 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 :ref:`radio_test_ui` 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. .. _radio_test_ui: User interface ************** .. list-table:: Main shell commands (in alphabetical order) :header-rows: 1 * - Command - Argument - Description * - cancel - - Cancel the sweep or the carrier. * - data_rate - - Set the data rate. * - end_channel - - End channel for the sweep (in MHz, as difference from 2400 MHz). * - fem - - Set front-end module (FEM) parameters. * - output_power - - Output power set. If a front-end module is attached and the :ref:`CONFIG_RADIO_TEST_POWER_CONTROL_AUTOMATIC ` Kconfig option is enabled, it has the same effect as the ``total_output_power`` command. * - parameters_print - - Print current delay, channel, and other parameters. * - print_rx - - Print the received RX payload. * - start_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 in percent (two decimal digits, between 01 and 90). * - start_rx - - Start RX. * - start_rx_sweep - - Start the RX sweep. * - start_tx_carrier - - Start the TX carrier. * - start_tx_modulated_carrier - - 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 -