Bluetooth RF Testing Guide for RTL8703/RTL8723/RTL8761/RTL8821/RTL8822 Chipsets

Overview: This article provides a comprehensive reference for engineers performing Bluetooth fixed-frequency testing and TX power calibration on Realtek RTL8703, RTL8723, RTL8761, RTL8821, and RTL8822 series chipsets. It covers file structures, environment setup for Android and Linux, and key operational notes.

1. File Structure and Naming Conventions

The testing toolkit consists of several critical components. Understanding the file naming and placement is essential for successful RF testing.

Android OS Files

  • rtlbtmp: Main application binary (located in Android_tool/)
  • btmp.default.so: Shared library for hardware abstraction (located in Android_tool/)
  • mp_rtlxxx_fw: Chip-specific firmware (located in BT_Firmware/)
  • mp_rtlxxx_config: Chip-specific configuration file (located in BT_Config/)
  • User Guide: MP tool command set (PDF in User Guide/)

Linux OS Files

  • rtlbtmp: Application (requires cross-compilation by customer)
  • mp_rtlxxx_fw: Firmware
  • mp_rtlxxx_config: Configuration
  • User Guide: MP tool command set (PDF)

The table below maps each Bluetooth chipset to its corresponding configuration file names for both Android and Linux environments. Note that some chips share config files, while others have unique identifiers.

Bluetooth Chip Android Config Name Android MP Config Name Linux Config Name Linux MP Config Name
RTL8703AS rtl8703as_config mp_rtl8703as_config rtl8703a_config mp_rtl8703as_config
RTL8703BS rtl8703bs_config mp_rtl8703bs_config rtl8703b_config mp_rtl8703bs_config
RTL8723AS rtl8723as_config mp_rtl8723as_config rtl8723a_config mp_rtl8723as_config
RTL8723A rtl8723a_config mp_rtl8723a_config
RTL8723AE rtl8723a_config mp_rtl8723a_config rtl8723a_config mp_rtl8723a_config
RTL8723AU rtl8723a_config mp_rtl8723a_config rtl8723a_config mp_rtl8723a_config
RTL8723BS rtl8723bs_config mp_rtl8723bs_config rtl8723b_config mp_rtl8723bs_config
RTL8723BE rtl8723b_config mp_rtl8723b_config rtl8723b_config mp_rtl8723b_config
RTL8723BU rtl8723bu_config mp_rtl8723bu_config rtl8723bu_config mp_rtl8723bu_config
RTL8723CS rtl8723cs_xx_config mp_rtl8703bs_config rtl8723cs_xx_config mp_rtl8703bs_config
RTL8723CU rtl8723c_config mp_rtl8723c_config
RTL8723DS rtl8723ds_config mp_rtl8723ds_config rtl8723d_config mp_rtl8723ds_config
RTL8723DE rtl8723d_config mp_rtl8723d_config
RTL8723DU rtl8723d_config mp_rtl8723d_config rtl8723du_config mp_rtl8723d_config
RTL8761AT rtl8761at_config mp_rtl8761at_config rtl8761at_config mp_rtl8761at_config
RTL8761AU rtl8761a_config mp_rtl8761a_config rtl8761a_config mp_rtl8761a_config
RTL8761AU+8192EE rtl8761a_config mp_rtl8761a_config rtl8761a_config mp_rtl8761a_config
RTL8761AU+8812AE rtl8761a_config mp_rtl8761a_config rtl8761a_config mp_rtl8761a_config
RTL8761AUV rtl8761a_config mp_rtl8761a_config
RTL8761AW+8192EU rtl8761aw8192eu_config mp_tl8761aw8192eu_config rtl8761aw_config mp_tl8761aw8192eu_config
RTL8821AS rtl8821as_config mp_rtl8821as_config rtl8821a_config mp_rtl8821a_config
RTL8821AE rtl8821a_config mp_rtl8821a_config rtl8821a_config mp_rtl8821a_config
RTL8821AU rtl8821a_config mp_rtl8821a_config rtl8821a_config mp_rtl8821a_config
RTL8821CE rtl8821c_config mp_rtl8821c_config
RTL8821CS rtl8821cs_config mp_rtl8821cs_config rtl8821c_config mp_rtl8821c_config
RTL8821CU rtl8821c_config mp_rtl8821c_config rtl8821cu_config mp_rtl8821c_config
RTL8822BS rtl8822bs_config mp_rtl8822bs_config rtl8822b_config mp_rtl8822b_config
RTL8822BE rtl8822b_config mp_rtl8822b_config
RTL8822BEH rtl8822bs_config mp_rtl8822bs_config
RTL8822BU rtl8822b_config mp_rtl8822b_config rtl8822bu_config mp_rtl8822b_config
RTL8761BU rtl8761b_config mp_rtl8761b_config rtl8761b_config mp_rtl8761b_config
RTL8761BT rtl8761bt_config mp_rtl8761bt_config rtl8761bt_config mp_rtl8761bt_config
RTL8822CU rtl8822c_config mp_rtl8822c_config rtl8822c_config mp_rtl8822c_config
RTL8822CS rtl8822cs_config mp_rtl8822cs_config rtl8822cs_config mp_rtl8822cs_config

For Linux, the config naming sometimes differs slightly (e.g., RTL8703AS uses rtl8703a_config instead of rtl8703as_config). Always cross-reference the chipset with the provided table to avoid mismatches.

2. Environment Setup

Proper placement and permission setting of files are crucial. The procedures differ between Android and Linux, and also depend on the Android version.

Android OS (Versions before 8.0)

Use the following commands to push files to the device via ADB:

adb push rtlbtmp /system/bin/
adb chmod 777 /system/bin/rtlbtmp

adb push btmp.default.so /system/lib/hw/
adb chmod 644 /system/lib/hw/btmp.default.so

adb push mp_rtlxxxx_config /system/etc/firmware/
adb chmod 644 /system/etc/firmware/mp_rtlxxxx_config

adb push mp_rtlxxxx_fw /system/etc/firmware/
adb chmod 644 /system/etc/firmware/mp_rtlxxxx_fw

Android OS (8.0 and Later)

Starting from Android 8.0, files should be placed under /vendor/ instead:

cp rtlbtmp /vendor/bin/
chmod 777 /vendor/bin/rtlbtmp

cp btmp.default.so /vendor/lib/hw/
chmod 644 /vendor/lib/hw/btmp.default.so

cp mp_rtlxxxx_config /vendor/firmware/
chmod 644 /vendor/firmware/mp_rtlxxxx_config

cp mp_rtlxxxx_fw /vendor/firmware/
chmod 644 /vendor/firmware/mp_rtlxxxx_fw

It is recommended to integrate these files into the SDK to avoid interference with normal Bluetooth operation.

Disabling Normal Bluetooth on Android

Before running the MP tool, normal Bluetooth must be turned off. If the UI does not allow it, use one of these methods:

  • service call bluetooth_manager 8 (to turn off) or 6 (to turn on)
  • Rename the Bluetooth HAL library:
    cd /system/lib/hw
    mv bluetooth.default.so bluetooth.default.so_ORG
    (For Android P and later: /system/lib/libbluetooth.so to libbluetooth.so_ORG)
  • Reboot the device.

Linux OS Setup

Copy files to the appropriate directories and set permissions:

cp rtlbtmp /usr/sbin/
chmod 777 /usr/sbin/rtlbtmp

cp mp_rtlxxxx_config /lib/firmware/
chmod 644 /lib/firmware/mp_rtlxxxx_config

cp mp_rtlxxxx_fw /lib/firmware/
chmod 644 /lib/firmware/mp_rtlxxxx_fw

For UART interface chips, ensure normal Bluetooth is not loaded at boot (e.g., disable rtk_hciattach). For USB interface chips, first enable normal Bluetooth, then bring up the interface with hciconfig hci0 up.

3. BT RF Performance Test and TX Power Calibration

Refer to the MP Tool User Guide for detailed command sets. Note that the RTL8761B and RTL8822C series have separate, dedicated user guides due to their unique characteristics.

The general process involves selecting the correct configuration and firmware for the target chipset, launching the rtlbtmp application, and executing the required test commands. Always ensure the environment matches the OS type (Android or Linux) and kernel version, as the btmp.default.so, rtlbtmp, and related binaries may vary.

Tip: For any compatibility questions regarding kernel versions or specific chip variants, consult the provided documentation or reach out to the engineering support team.

Similar Posts