In this blog, I would like to introduce the method how to test on the RF (Radio) on the NRF5 Series.
It would covers the following topics.
- nRF Connect RSSI Viewer
- Simple Radio Test
- Direct Test Mode
nRF Connect RSSI Viewer
Simple app for nRF Connect that shows a visualization of RSSI data. The app shows dBm per frequency in the 2400-2480 MHz range, and allows the user to tweak settings like sweep delay and animation duration. The app can be installed from the Add/remove apps screen in nRF Connect.
The following devices are supported:
- PCA10040 nRF52832 Development Kit
- PCA10059 nRF52840 Dongle
Radio Test Example
The Radio Test Example demonstrates how to configure the radio as the constant RX or TX carrier, the modulated TX carrier, or the RX or TX sweep.
The tests are controlled with Command Line Interface (CLI) by the serial port. At any time during the tests, you can set the radio parameters output power, bit rate, and channel. You can also set the time on each channel in the sweep mode, in steps of 1 millisecond to 99 milliseconds, every 1 millisecond. The application also allows you to send a data pattern to another board.
The application starts with enabling the high frequency crystal oscillator and configuring CLI. Calling a console command causes the appropriate action.
The following table lists the available main CLI 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 the RX sweep.|
|Start the TX carrier.|
|Start the modulated TX carrier.|
|Start the TX sweep.|
|Time on each channel (between 1 ms and 99 ms).|
|Toggle DC/DC converter state.|
|Set transmission pattern.|
You can find the source code and the project file of the example in the following folder:
Direct Test Mode (DTM)
The main function of a production test is to verify that all the components are mounted correctly and have correct values after assembling a device. To perform a production test on a Bluetooth® low energy application, it is preferable to use a builtin function called Direct Test Mode (DTM). The DTM enables testing of the RF parameters and is also used for end-product qualification testing of the RF physical layer (RF PHY). Bluetooth low energy products of Nordic include a UART interface that gives access to the Direct Test Mode (DTM).
The DTM has two main modes of operation; the transmit test mode and the receive test mode. In transmit test mode, the Device Under Test (DUT) generates a predefined set of test packets. In receive test mode, the DUT counts the number of test packets received.
The DTM is specified on the bluetooth core specification (available from this site) in Vol 6, Part F.
In addition, you can have a look at the python scripts that implements DTM from bluetooth v4.0 in nAN-34:
DTM enables a set of RF PHY test cases, which are defined by the Bluetooth Special Interest Group (SIG) in the documents from the sections called “TCRL Release Table” and “Core – Test Requirements for v4.0 or later” found at the beginning of the https://www.bluetooth.com/specifications/qualification-test-requirements web page.
Note: The following information was updated in the first half of 2017. For current information, refer to the newer TCRL 2017-1, that is, to the corresponding 2017-1 TCRLs-1.zip file containing the newer RF-PHY.TS.5.0.1.
The Capability tests (as defined in the standard ISO subgroups) are organized in levels and groups representing protocol services, functional modules, and purposes, the latter being divided in operating conditions for the transmitter and the receiver. All the relevant RF PHY tests are in accordance to the test specifications RF-PHY.TS.4.2.3 or the updated RF-PHY.TS.5.0.0 and are shown in the RFPHY sheet of the Excel file called Core.TCRL.2016-2.xlsx found inside the 2016-2 TCRLs.zip.
Below are examples of test cases for the Physical Layer Conformance. They are referred to by their identifiers, where TP stands for
Test Purpose and TRM-LE and RCV-LE stand for LE Transmitter and LE Receiver test respectively.
• TP/TRM-LE/CA/BV-01-C [Maximum peak and average output power]
• TP/TRM-LE/CA/BV-03-C [In-band spectral emissions]
• TP/TRM-LE/CA/BV-05-C [Modulation Characteristics]
• TP/TRM-LE/CA/BV-06-C [Carrier frequency offset and carrier drift]
• TP/RCV-LE/CA/BV-01-C [Receiver sensitivity]
• TP/RCV-LE/CA/BV-03-C [C/I and Receiver Selectivity Performance] [Additional blocker needed to generate co-/adjacent channel interference]
• TP/RCV-LE/CA/BV-04-C [Blocking Performance] [Additional blocker needed to generate interference outside the 2400MHz –
• TP/RCV-LE/CA/BV-05-C [Intermodulation Performance] [2 x additional blocker needed to generate both a sinusoidal/un-modulated
and a continuous/modulated carrier]
• TP/RCV-LE/CA/BV-06-C [Maximum input signal level]
• TP/RCV-LE/CA/BV-07-C [PER Report Integrity]
Additional test cases have been introduced since the release of Bluetooth 5. A few examples of the many new test cases are listed
• TP/TRM-LE/CA/BV-08-C [In-band emissions at 2 Ms/s]
• TP/TRM-LE/CA/BV-10-C [Modulation Characteristics at 2 Ms/s]
• TP/RCV-LE/CA/BV-08-C [Receiver sensitivity at 2 Ms/s]
• TP/RCV-LE/CA/BV-10-C [Blocking performance at 2 Ms/s]
Two Wire Commands through DTM
Command packet test setup
Command Packet – TX / RX (and Nordic Vendor Specify)
TX Power on NRF52832
2-Wire Event Packet
Test Status Response
Example command on the UART for DTM
- RESET: 0x00 0x00
- TEST END: 0xC0 0x00
- Channel 0, i.e. 2402MHz pure carrier
- 0x00 0x00 0x80 0x07
- Channel 19, i.e. 2440MHz 10 byte PRBS9 payload
- 0x00 0x00 0x93 0x28
The above commands will send packets until TEST END is received
To sweep channels, make a loop of RF channel increment.
- Channel 19, i.e. 2440MHz
- 0x00 0x00 0x53 0x00
The above command receives all types of payload continuously until TEST END command is received.
Bluetooth 5 Example (DTM)
- RESET: 0x00 0x00
- TEST END: 0xC0 0x00
Channel 19, i.e. 2440MHz 10 bytes PRBS9 payload
- 0x00 0x00 0x09 0x28
Set TX Power +4dBm
- 0x84 0x0B
Channel 0 i.e. 2402MHz carrier
- 0x80 0x03
Channel 19 37bytes PRBS9 payload
- 0x93 0x94
Check feature supported
- 0x04 0x00
Set 2Mbps mode
- 0x93 0x94
Channel 19, i.e. 2440MHz
- 0x00 0x00 0x53 0x000
If you need to get the tool on PC for DTM, you can download it from https://github.com/olleheugene/nRF-DTM.
The nRF_DTM is UI based test tool that helping to RF test by easy control
- UI based RF test tool
- Support Bluetooth 5 features (2Mbps/Coded S8/Coded S2/1Mbps)
- Support 3 Different channels testing (High/Mid/Low)
- Configurable Tx Power
- Support PER measurement
- Support configurable log level in order to check test sequence and detiails
- Support direct command on terminal and command line interface on shell