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.
˙– Commands
1. CMD(command)
2. Frequency
3. Length
4. PKT(Packet Type)
Note: Vendor specific will be detailed in section
Events
– LE_Test_Status_Event
1. EV (event)
2. ST (status)
3. DC (don’t care)
– LE_Packet_Report_Event
1. EV(event)
2. ST(status)
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:
CARRIER_TEST
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).
CARRIER_TEST_STUDIO
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.
SET_TX_POWER
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.
SELECT_TIMER
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.
References
1. Bluetooth Specification
Version 4.0 Volume 6 Part F, Bluetooth Special Interest Group.
2. Nordic Semiconductor Infocenter
https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v12.3.0%2Fble_sdk_app_dtm_serial.html
3. Nordic Semiconductor nRF5 SDK v12.3.0
Directory:nRF5_SDK_12.3.0_d7731ad/examples/dtm/direct_test_mode
NAT (Network Address Translation) is a method of remapping one IP address into another by modifying the IP header of packets while transmitting across routing devices. In IPV4, different devices in the same subnet can appear as a single device on the internet by using the NAT technique. NAT is a general and essential way to conserve global address space in the face of IPV4 address exhaustion.
And now, the exhaustion problem seems to be solved by the unlimited number of IPV6 address spaces available. Still, the NAT technique is valuable and useful for many IPV6 applications such as security checks in web browsing.
II – IPV6 NAT Proxy
In Linux system, the general way to implement an NAT operation is to use IPTABLES. But it only supports IPV4 until the IPV6 NAT proxy is accomplished by the SENAO network. The IPV6 NAT proxy is a kernel module registered in the netfilter. When the user triggers the HTTP request for web browsing, the IPV4 and IPV6 packets will flow into the netfilter, and the IPV6 NAT proxy will sniffer the IPV6 packet flow. By filtering out the HTTP IPV6 packet, the IPV6 NAT proxy will transfer the packet to a remote server by remapping the destination IPV6 address to the IPV6 address of the security server (see figure).
The remapping procedure includes calculating the TCP checksum of IPV6 packets while completing network address translation. IPV6 NAT proxy keeps the TCP connection tuple until the security server returns the checking result. Once the security server returns the positive result, the original packet will be sent out without the user noticing. Otherwise, the HTTP connection will be dropped by the IPV6 NAT proxy and the user will be blocked for browsing the fraud.
Besides translating to the security server, the IPV6 NAT proxy provides options to set different IPV6 addresses, IPV6 ports, the live time of the tuple and the maximum number of stored tuples for customization.
III – Conclusion
This article describes a simple way to implement an IPV6 NAT server without discussing full-cone NAT, restricted cone NAT, post-restricted cone NAT and symmetric NAT–as well as invokes the idea of using NAT in IPV6.
References
1. Network address translation https://en.wikipedia.org/wiki/Network_address_translation
2. Getting the most out of IPV6 https://blog.paloaltonetworks.com/2015/08/getting-the-mostout-of-ipv6
The time zone is the same time definition of the region on Earth. In 1863, the concept of time zone was first used. The time zone partially solves this problem by setting a standard time for the region.
The machines on the network basically use NTP (Network Time Protocol) to synchronize their clocks over the Internet. There are many NTP servers on the network that can synchronize the correct time.
II – How To Get Timezone
In order to synchronize the correct time with the NTP server, providing a corresponding time zone is the first necessary step. To determine a time zone, we must have latitude and longitude.
We use the IP (Internet Protocol) address as an anchor point to obtain latitude and longitude, which can then help us determine the correct time zone.
III – Manual To Automatic
Before we can implement the automatic time zone detection mechanism, we must manually set or select the time zone of the device through the GUI. While it is inconvenient, setting the time manually will allow the device to automatically get the time, removing the need to set it manually. Since it is fastest and most convenient for the device itself to automatically query the time zone via the network, we implemented a mechanism to automatically detect the time zone.
IV – Timezone Detection Mechanism
Because some methods on the network achieve only partial results, we have developed a complete detection mechanism that requires only three conditions:
1. List of global time zones
2. IP address
3. The server that can check the time zone after giving latitude and longitude
The first two pieces of information can be provided through prepreparation and the device itself. There are many servers on the Internet that provide time zone check services. We can get results by providing the corresponding information to the server. Then update the acquired time zone information to the device, and the implementation of this method is completed.
V – Conclusion
The way to set the time zone only through the GUI can also be replaced by automatic acquisition. With this automatic detection time zone mechanism, the device can automatically get the correct time. It is more convenient for the data record and system operation.
References
1. Ntppool.org. 2020. Pool.Ntp.Org: The Internet Cluster Of Ntp Servers.
2. Google Developers. 2020. Public NTP|Google Developers.