ESP32&ESP8266 RF Performance Test Demonstration en
ESP32&ESP8266 RF Performance Test Demonstration en
Version 3.0
Espressif Systems
Copyright © 2019
www.espressif.com
About This Guide
Release Notes
Certification
Download certificates for Espressif products from https://www.espressif.com/en/
certificates.
Table of Contents
1. Test Overview .........................................................................................................................1
1.1. Introduction ................................................................................................................................1
4. RF Test Tool..........................................................................................................................10
4.1. Features ...................................................................................................................................10
8. ESP32 Wi-Fi/BT
Operation Command ...........................................................................................................26
8.1. Wi-Fi Test Commands ..............................................................................................................26
8.1.4. Command for Selecting Tx/Rx 11n Mode 20 Mbps or 40 Mbps ...............................27
9. ESP8266 Wi-Fi
Operation Commands .........................................................................................................34
9.1. Test Commands .......................................................................................................................34
1. Test Overview
1.1. Introduction
This guide demonstrates how to run an RF related performance test and certification test
using an RF tester to check an ESP32 / ESP8266 based product, either functioning as a
standalone controller or an integrated part of MCU.
📖 Note:
download.espressif.com/release/ESP_RFtest_and_Certification_tool.zip
• Download link for the newest test bin files (open in a browser):
download.espressif.com/release/espressif/ESP_RFtest_and_Certification_bin.zip
• For more documentation on ESP32 / ESP8266, please visit the Espressif website.
Espressif ! /38
1 2019.01
2. Test Framework
!
2. Test Framework
2.1. Test Setup
!
Figure 2-1. RF Test Framework
• For ESP8266: 3V3, EN, GND, U0TX, U0RX, GPIO15 (connect to GND), and GPIO0.
📖 Note:
GPIO0 is mainly used to switch between Download mode and Flash operation mode:
• Download mode: GPIO0 is connected to GND and pulled low (used for downloading bin files).
Espressif ! /38
2 2019.01
2. Test Framework
!
2. Connect the DUT to a serial port board, and make sure the DUT enters Download mode
(connect GPIO0 to GND):
• Connect the led-out pins to the serial port board according to Step 1. For details,
please refer to Section 3.2.3.
- GPIO0 is connected to GND and pulled low.
- EN is connected to 3V3 and pulled high.
- GPIO15 is pulled low (only for ESP8266).
• Connect the serial port board to a PC using a USB cable and install the
corresponding driver (see Appendix A.), to ensure the serial port can be successfully
identified.
3. Open the RF test tool on the PC, download the firmware and run the test:
• The firmware can be downloaded either to RAM or flash.
• Run the firmware, use the RF test tool to configure the test-specific TX mode for the
DUT, and start the test.
📖 Note:
Keep in mind the difference between downloading the firmware to RAM and flash:
• RAM: The firmware is ready to run immediately after it is successfully downloaded to RAM. However,
the RAM program gets erased as soon as you reboot the DUT, so you will have to download the
firmware again.
• Flash: The firmware is not ready to run after the downloading process is completed. You need to
switch to Flash operation mode by manually disconnecting the GPIO0 pin and re-power the DUT.
Espressif ! /38
3 2019.01
3. Environment Setup
!
3. Environment Setup
3.1. Related Tools
3.1.1. Hardware
May vary
The products developed by
DUT based on depending on
N/A customers based on ESP32 /
ESP32 / ESP8266 test
ESP8266.
requirements
Espressif ! /38
4 2019.01
3. Environment Setup
!
3.1.2. Software
Name Description
A serial port board is mainly used as a USB converter. You may use other similar boards.
However, considering that some of them might have unstable performance, it is
recommended to purchase the one shown below (if you would like to purchase the board
from Espressif, please contact us).
!
Figure 3-1. Serial Port Board
Please check your purchased board against the following criteria to make sure the switches
and shorting jumpers are in their correct positions:
• Markings com1 and com2: Serial ports used for communication with a PC. Markings
1 and 2 are two independent serial ports, corresponding to TX/RX/RTS/CTS.
• Marking 3: Mainly used to jump between com2 3.3 V level and 5 V level.
Espressif ! /38
5 2019.01
3. Environment Setup
!
3.2. Antenna
5
Impedance Matching
4
Requirement and RF
3
Hardware
Setup
3.2.1. Antenna Impedance Matching Requirement
For the electromagnetic compatibility (EMC) test, the π-type impedance matching circuit for
the antenna should meet the requirements shown in Figure 3-2.
D
Antenna
L1 NC
C1 C2
2.4pF NC
C
GND GND
!
Figure 3-2. π-type Impedance Matching Circuit for the Antenna
📖 Note:
The recommended value for the capacitor C1 is 2.4 pF. L1, C2, along with C1, perform impedance
matching for the antenna. The impedance value varies for different modules.
Title
<T
Size Do
A <D
Date:
5 4 3
Espressif ! /38
6 2019.01
3. Environment Setup
!
ESP32
ESP8266
• Make sure to configure the correct path attenuation for a specific radiation test.
Espressif ! /38
7 2019.01
3. Environment Setup
!
!
Figure 3-3. Test Scenario 1 - Wiring for the DUT as a standalone controller
Espressif ! /38
8 2019.01
3. Environment Setup
!
Figure 3-4. Test Scenario 2 - Wiring for the DUT as an integrated part of MCU
📖 Note:
• The serial port board is connected to the PC with a micro-USB cable. For the driver installation, please
refer to Appendix A.
• For the test scenario 2, make sure to disconnect the serial port communication between the DUT and
MCU; otherwise, the command sending process from the PC to DUT will be interfered with.
• Install EspRFtestTool, and run the tool (make sure all the connected serial ports function
properly).
Espressif ! /38
9 2019.01
4. RF Test Tool
!
4. RF Test Tool
4.1. Features
!
Figure 4-1. EspRFtestTool Interface
• Offers four RF tests: Wi-Fi, BT, Wi-Fi Adaptivity, and manual command input test.
Espressif ! /38
10 2019.01
4. RF Test Tool
!
Section Description
The configuration options include chip type, COM port, baud rate, and the
Serial Port Configuration
status of the serial port.
The configuration items include a bin-browse button (the one with tree dots),
Download Configuration download location (RAM or flash), load bin (download button), and download
status showing “SYNC”, “LOAD”, “SUCC”, or “FAIL”.
The test items include Wi-Fi, BT, Wi-Fi Adaptivity and Manual (manual
Test Configuration command input test). Click on start to begin a test, and stop to terminate a
test.
All the operating data is printed in this section. You can save or clear the log
Log Information
output.
📖 Note:
• This guide demonstrates the RF test tool with the ESP32 product as an example.
• Make sure the correct chip type and bin files are selected while testing ESP8266 products.
Espressif ! /38
11 2019.01
5. RF Performance Test
!
5. RF Performance Test
5.1. Test Demonstration
5.1.1. Configure the Serial Port
!
Double-click espRFTool.exe to run the EspRFtestTool:
• Choose ESP32 for ChipType
• Choose the correct port number for COM (COM27 in this case)
• Switch the serial port status to open (the port can be switched between the open and
closed statuses)
!
• Browse to the path where test bin files are saved, for example: D:/ESP32_TEST/
ESP32_RF_TEST_BIN_XXXX.bin.
• Choose the download location: RAM or flash (for details on their difference, please refer
to Section 2.2).
• MAC address: The status block shows the MAC address of the chip during the
download process.
• Click on load bin and start the download process.
⚠ Notice:
• If the bin file is downloaded to flash, you need to download it only once. To run the downloaded file,
you need to switch to Flash operation mode by floating GPIO0 and re-powering the DUT.
• If the bin file is downloaded to RAM, it will run immediately after the download process is completed.
But the RAM program will be erased as soon as you reboot the DUT. You will have to download the bin
file again.
Espressif ! /! 38
12 2019.01
5. RF Performance Test
!
3. For example, if the WiFi Rate is set to MCS7, Bandwidth to 20 M, and Channel to 1,
you may choose the options as shown in Figure 5-1, and click on start to begin the test.
You will get the log output described below:
• tx_contin_en 1: continuous TX mode with a duty ratio of 92%, mainly used for the
certification test
• tx_contin_en 0: TX packet mode, mainly used for the performance test
• tx_cbw40m_en 0: 11n HT20, 20 M bandwidth
• tx_cbw40m_en 1: 11n HT40, 40 M bandwidth (supported by ESP32 only)
Espressif ! /! 38
13 2019.01
5. RF Performance Test
!
⚠ Notice:
• Before switching to other channels or data rates, please click on stop to terminate the current
transmission.
• ESP32 supports HT40 and HT20, while ESP8266 supports HT20 only.
4. Click on stop to end the TX process, the returned log message will be cmdstop.
Espressif ! /! 38
14 2019.01
5. RF Performance Test
!
!
Figure 5-2. Log Output of the ESP32 Wi-Fi RX Test
Espressif ! /! 38
15 2019.01
5. RF Performance Test
!
⚠ Notice:
!
Figure 5-3. Log Output of the BT TX Test
⚠ Notice:
• For the test of BLE TX, make sure “0x71764129” is selected for Syncw.
3. BT RX performance test
(1) To test the RX performance of LE channel 0, choose BLE RX for Test Mode,
0/2404 for Channel, and LE_prbs9 for Data Rate. Please refer to Figure 5-4.
(2) When RX is done, click on stop to check the detailed information of the received
packets. The format of the number of received packets is: 0 0 0 0 0 0 0 0 w 0 0
000000p000b00
Espressif ! /! 38
16 2019.01
5. RF Performance Test
!
• The first parameter in hexadecimal format indicates the total number of the
received packets.
• The second parameter in hexadecimal format indicates the number of the
received packets at a specific data rate.
• The last parameter in hexadecimal format indicates the number of bit errors.
!
Figure 5-4. Log Output of the BT RX Test
📖 Note:
• Choose Manual to manually input commands. Ensure to check Add ‘\r’ before you send commands.
• In case of a wireless tester IQView is used to test the DUT’s RF performance on channel 1 at a data
rate of 11n MCS7, the test results will look like the ones in Figure 5-5.
Espressif ! /! 38
17 2019.01
5. RF Performance Test
!
!
Figure 5-5. RF Performance Test by IQView
📖 Note:
You need to set a correct value for the path loss; otherwise, the test results will be inaccurate.
Espressif ! /! 38
18 2019.01
6. RF Certification Test
!
6. RF Certification Test
6.1. Wi-Fi Certification Test
6.1.1. Environment Setup
📖 Note:
Follow the instructions in Chapter 5 to configure the serial port and download the firmware.
Espressif ! /! 38
19 2019.01
6. RF Certification Test
!
📖 Note:
2. Attenuation indicates the power attenuation in multiples of 0.25 dB. You may set the power
attenuation according to the certification requirements.
2. Click on start to begin sending commands. TX data rates are listed in Table 5-1 for your
reference.
3. Click on stop to terminate the command sending process.
📖 Note:
During the command sending process, make sure to click on stop before switching to other channels or
TX data rates.
Espressif ! /! 38
20 2019.01
6. RF Certification Test
!
The BT certification test shares the same testing process as the BT test that is described in
Chapter 5.
Espressif ! /! 38
21 2019.01
7. Adaptivity Certification Test
!
!
Figure 7-1. Adaptivity Test in STA Mode
• For STA mode, the parameters are described in the table below:
Espressif ! /! 38
22 2019.01
7. Adaptivity Certification Test
!
Parameters Description
• Test steps:
- Fill in the AP ssid and AP pwd fields, and then click on connect to connect to AP.
- After the connection to AP is established, set TX parameters (see Table 7-1), and
click on send to start TX.
⚠ Notice:
If starting TX takes a while, set a larger value for Packet num, for example, 6000000.
Espressif ! /! 38
23 2019.01
7. Adaptivity Certification Test
!
7.3. AP Mode
• Select wifi Adaptivity and choose AP mode.
!
Figure 7-2. Adaptivity Test in AP Mode
Parameters Description
Espressif ! /! 38
24 2019.01
7. Adaptivity Certification Test
!
Test steps:
- Fill in the ssid and pwd fields, and then click on create to create AP (hotspot).
- When AP is successfully created, it is ready for the connection initiated by other
stations.
- Once the connection is established, set TX parameters, and click on send to start
TX.
⚠ Notice:
If starting TX takes a while, set a larger value for Packet num, for example, 6000000.
Espressif ! /! 38
25 2019.01
8. ESP32 Wi-Fi/BT Operation Command
!
8. ESP32 Wi-Fi/BT
Operation Command
To test the EMC/RF performance, please download
ESP32_RF_TEST_BIN_V1.4.6_20181019.bin. Table 8-1 shows the download addresses.
ESP32_RF_TEST_BIN_V1.4.6_20181019.bin 0x1000
Espressif ! /! 38
26 2019.01
8. ESP32 Wi-Fi/BT Operation Command
!
⚠ Notice:
After sending data packets, please input the Stop command to put an end to the process.
Example:
wifitxout 1 0x0 0
Print: Wifi tx out: channel=1, rate=0x0, BK=0
Send the packets through channel 1 (2412 MHz) with a data rate of 1 Mbps.
⚠ Notice:
After sending data packets, please input the Stop command to change the channel or data rate.
cbw40m_en 0
Print: cbw40m_en: 0
• Command for selecting the 11n HT40 mode:
cbw40m_en 1
Print: cbw40m_en: 1
Espressif ! /! 38
27 2019.01
8. ESP32 Wi-Fi/BT Operation Command
!
📖 Note:
⚠ Notice:
After receiving data packets, please input Stop command to put an end to the process.
Example:
esp_rx 1 0x0
Print: wifi rx start: channel is 1, rate is 0x0
Receive the packets in channel 1 (2412 MHz) with a data rate of 1 Mbps.
Espressif ! /! 38
28 2019.01
8. ESP32 Wi-Fi/BT Operation Command
!
📖 Note:
fcc_bt_tx 4 0 0 1 3 1 0
Print:
fcc_bt_tx: txpwr=4, hoppe=0, chan=0, rate=1, DH_type=3, data_type=1
RW TX TEST
The command indicates that the Tx power attenuation level is 4; frequency hopping is
disabled; the channel is 0 (2402 MHz); the data rate is BR1M; the DH type is DH3 and
the data type is 00001111.
8.2.2. LE Tx Command
Package identification is not included:
fcc_le_tx <Parameter1> <Parameter2> <Parameter3> <Parameter4>
<Parameter5>
<Parameter1>: Tx power attenuation. The range is 0 ~ 7. The unit is 3 dB; Normally the
value is 4 and the power is about 0 dBm.
<Parameter2>: Select the Tx channel from 0 ~ 39.
<Parameter3>: Select the payload length. The range is 0 ~ 255. The unit is byte. Normally
the value is 250.
<Parameter4>: Select the Data type. 0: 1010; 1: 00001111; 2: prbs9.
Espressif ! /! 38
29 2019.01
8. ESP32 Wi-Fi/BT Operation Command
!
Print:
The command indicates that the Tx power attenuation level is 4; the channel is 0 (2402
MHz); the data rate is LE1M and the data type is prbs9.
Package identification is included:
Espressif ! /! 38
30 2019.01
8. ESP32 Wi-Fi/BT Operation Command
!
rw_rx_per 1 40 0x6BC6967e 0 0
Print:
rw_rx_per:type=1, chan=40, ulap=0x6BC6967e, ltaddr=0
RW RX PER
The command indicates that the Rx data package is EDR (The DH type, Data type are
selected by the equipment and can be modulated. DH1 is recommended.), the channel
is 1 (2403 MHz), the data rate is 2M or 3M, the bluetooth address is 0x6BC6967e and
the logical transport address is 0.
rw_le_rx_per 11 0x71764129 0
Print:
Espressif ! /! 38
31 2019.01
8. ESP32 Wi-Fi/BT Operation Command
!
The command indicates that the Rx data package is LE (The Data type is usually
prbs9.); the channel is 11 (2428 MHz); the data rate is 1M and the data identify is
0x71764129.
The first parameter (based on hexadecimal system) indicates the total number of packets
received this time.
The second parameter (based on hexadecimal system) indicates the number of packets
received of the corresponding speed at this time.
The last parameter (based on hexadecimal system) indicates the number of bit errors.
The second-to-last parameter (based on hexadecimal system) indicates the overall number
of the received bits at a certain data rate.
Espressif ! /! 38
32 2019.01
8. ESP32 Wi-Fi/BT Operation Command
!
bt_tx_tone 1 0 0
Print: BT TX TONE START!
Transmit SCW in channel 14 (2402 MHz)
• SCW Tx stop example:
bt_tx_tone 0 0 0
Print: BT TX TONE STOP!
Espressif ! /! 38
33 2019.01
9. ESP8266 Wi-Fi Operation Command
!
9. ESP8266 Wi-Fi
Operation Commands
To test the EMC/RF performance, please download the
ESP8266_RF_TEST_BIN_V127_26m_20180530.bin file or the
ESP8266_RF_TEST_BIN_V127_40m_20180530.bin file.
📖 Note:
The case-sensitive commands should be input in the interactive window of SecureCRT. Please select
Chat Window in the View.
Espressif ! /! 38
34 2019.01
9. ESP8266 Wi-Fi Operation Command
!
⚠ Notice:
After sending data packets, please input the Stop command to end the process.
Example:
wifitxout 1 0x0 0
Print: Wifi tx out: channel is 1, data_rate is 11b 1.0Mb/s
Send the packets via channel 1 (2412 MHz) with the data rate of 1 Mbps.
⚠ Notice:
After sending data packets, please input the Stop command to switch the channel or data rate.
⚠ Notice:
After receiving data packets, please input Stop command to end the process.
Example:
esp_rx 1 0x0
Espressif ! /! 38
35 2019.01
9. ESP8266 Wi-Fi Operation Command
!
Espressif ! /! 38
36 2019.01
Appendix A
!
!
Figure A-1. Installing UART Driver on the PC
!
Figure A-2. UART Driver Installed
⚠ Notice:
If the UART driver installation fails, you can install ./Tools/ft232r-usb-uart.zip provided by Espressif.
2. The RF test tool will automatically check the port number that will appear in the
dropdown menu in the serial port configuration section.
Espressif ! /! 38
37 2019.01
Disclaimer and Copyright Notice
Information in this document, including URL references, is subject to change without
notice.
THIS DOCUMENT IS PROVIDED AS IS WITH NO WARRANTIES WHATSOEVER,
INCLUDING ANY WARRANTY OF MERCHANTABILITY, NON-INFRINGEMENT, FITNESS
FOR ANY PARTICULAR PURPOSE, OR ANY WARRANTY OTHERWISE ARISING OUT
OF ANY PROPOSAL, SPECIFICATION OR SAMPLE.
All liability, including liability for infringement of any proprietary rights, relating to use of
information in this document is disclaimed. No licenses express or implied, by estoppel or
otherwise, to any intellectual property rights are granted herein.
The Wi-Fi Alliance Member logo is a trademark of the Wi-Fi Alliance. The Bluetooth logo is
a registered trademark of Bluetooth SIG.
All trade names, trademarks and registered trademarks mentioned in this document are
Espressif IoT Team
property of their respective owners, and are hereby acknowledged.
www.espressif.com Copyright © 2019 Espressif Inc. All rights reserved.