BLE Direct Test Mode Through 2-wire UART Interface
ABSTRACT — The Bluetooth standard defines Direct Test Mode (DTM) for RF PHY testing of Bluetooth low energy device. This standardization verifies that a basic level of system performance is guaranteed for all BLE products. We will introduce the method of perform the tests through a 2-wire UART interface.
I – Introduction
The RF validation of Bluetooth device uses a protocol called Direct Test Mode. It is described in the Bluetooth Core Specification versions 4.x and 5.0, Volume 6, Part F.
The purpose is to test the radio at the physical layer for things such as transmitting power and receiver sensitivity, which is useful for regulatory EMC testing.
The Direct Test Mode (DTM) is used to control the Device Under Test (DUT) and provides a report back to the TESTER. It has two alternate methods:
1. Over HCI
2. Through a 2-wire UART Interface
In the next section, we describe the second way to perform the tests through a 2-wire UART interface.
II – Test Sequences
The DTM protocol enables communication between the DUT (Device Under Test) and the Tester. The test equipment that we usually use in the development phase is Anritsu MT8852B, which combines the upper and lower tester functions.
The Upper Tester has direct access to the DUT through a dedicated 2-wire connection which can enter commands to start and stop the RF test. The Lower Tester is a piece of lab equipment that will measure the RF activity and performance.
III – Commands And Events
Command and Event behavior of 2-wire UART interface.
4. PKT(Packet Type)
Note: Vendor specific will be detailed in section
1. EV (event)
2. ST (status)
3. DC (don’t care)
IV – Vendor Specific
The standard 2-wire UART interface Command reserves binary value “11” at PKT field for Vendor Specific packet payload.
For instance, Nordic nRF52832 have four vendor options as below:
If column 3 (the length) of the packet is set to 0, an unmodulated carrier 2.
ST (the status) is turned on at the channel indicated by column 2 (the frequency).
If column 3 (the length) of the packet is set to 1, an unmodulated carrier is turned on at the channel indicated by nRFgo studio, which is an application for configuring Nordic chips and which also supports a range of radio testing.
If column 3 (the length) of the packet is set to 2, column 2 (the frequency) sets the TX power in dBm.
Valid settings on Nordic nRF52832 are -40, -20, -16, -12, -8, -4, 0, +3, +4dB. They can only be modified while no transmitter or receiver test is running.
Only the 6 least significant bits of Tx power value will be fit in. Take -4dBm as an example: The representation of 8-bit binary in decimal -4 is 11111100. Determine that the 6 least significant bits are 111100, then fit them into the frequency field of the packet payload.
The command of setting Tx power to -4dBm in hexadecimal form will be 0xBC0B.
If column 3 (length) is set to 3, column 2 (frequency) selects the timer for transmitter test timing. The valid values of the timer are 0, 1, 2.
Summarize the Vendor Specific packet payload into one format.
V – Debugging
All commands and events are binary messages, we need a simulator for monitoring the communication between two devices. Docklight is an application that can be simulated as a RS232/UART device and can manually create send/receive sequences from the communication data.
Using Nordic nRF52832 as a DUT, set Docklight to send the SET_TX_POWER of vendor commands, and check if the transmit power is correct through the RF power meter.
Set commands of sending sequence on Docklight:
1. DTM_tx set as LE_Transmitter_Test command (0x8000)
2. DTM_end set as LE_Test_Eed command (0xC000)
3. DTM_reset set as LE_Reset command (0x0000)
4. vender_value set as SET_TX_POWER of vendor commands
Click the button for vendor_value to set the Tx power, then click the DTM_tx button to start sending the sequence. DUT will response [RX]0x0000 every time an event is successful.
1. Bluetooth Specification
Version 4.0 Volume 6 Part F, Bluetooth Special Interest Group.
2. Nordic Semiconductor Infocenter
3. Nordic Semiconductor nRF5 SDK v12.3.0