Skip to main content

MP tool user guide for linux20180319

:::info 文档信息

页数:35 · 语言:英文

原始文档:MP tool user guide for linux20180319.pdf

:::

在线预览​

若预览无法显示,请直接下载 PDF 后用本地阅读器打开。


Realtek​

Bluetooth​

MP Flow​

(Linux)​

Date: 2018/03/19

This document is subject to change without notice. The document contains Realtek confidential information and must not be disclosed to any third party without appropriate NDA.

1. Overview​

This document is used to introduce MP (Mass Production) test tool for Realtek Bluetooth chip series. Customers should comply with the steps and requirements under this document. Contact Realtek Bluetooth FAE if any problem arises in the use of MP flow.

2. Prerequisites​

Before MP tool startup, below items should be checked: a) The Bluetooth Chip embedded is provided by Realtek;

Realtek Bluetooth Chip Number
RTL8723B series
RTL8761A series
RTL8821A series
RTL8703B series
RTL8723D series
RTL8822B series
RTL8821C series

b) The Bluetooth on target production is available and works normally;

2.1 Binary Files​

MP tool package is provided to customers in binary format: rtlbtmp MP cmd tool mp_rtl8723b_fw, mp_rtl8723b_config 8723b MP firmware and configure files mp_rtl8761a_fw, mp_rtl8761a_config 8761a MP firmware and configure files mp_rtl8821a_fw, mp_rtl8821a_config 8821a MP firmware and configure files mp_rtl8703b_fw, mp_rtl8703b_config 8703b MP firmware and configure files mp_rtl8723d_fw, mp_rtl8723d_config 8723d MP firmware and configure files mp_rtl8822b_fw, mp_rtl8822b_config 8822b MP firmware and configure files mp_rtl8821c_fw, mp_rtl8821c_config 8821c MP firmware and configure files

Customers should copy these binary files to respective directories on target production: rtlbtmp --> /usr/sbin/rtlbtmp chmod 755 /usr/sbin/rtlbtmp mp_rtlxxx_fw, mp_rtlxxx_config --> /lib/firmware

Notice: If customer use 8723b chip, then the mp_rtlxxx_config's name must be mp_rtl8723b_config, so as to other chips. Customers should copy the normal config file and rename it to mp_rtlxxx_conifg.

3. MP Tool Usage​

3.1 MP Initial Commands​

These commands used to initialize Bluetooth DUT in MP mode are listed as below:

MP CommandParametersReturnDescription
rtlbtmpNone[success]Start the MP CMD tool.
enableUSB: enable usb:/dev/rtk btusb _[success]Enable USB I/F Bluetooth MP stack and download FW code. Device node is fixed as rtk btusb. _
UART5: enable uart:/dev/ttyS0 enable uart5:/dev/ttyS0 UART4: enable uart4:/dev/ttyS0[success]Enable Uart I/F Bluetooth MP stack and download FW code. Device node is chosen by vendor specifically. H5 (UART5) or H4 (UART4) is determined by the chip configurations. Customers can consult FAE for detailed information.
disableNone[success]Disable Bluetooth MP stack and close the device.
quitNoneNoneExit from the MP CMD tool.
helpNoneNoneList all MP CMDs supported.

NOTE: Before running the MP CMD tool, BT on UI settings should be disabled; otherwise, MP tool will be at abnormal status.

3.1.1 Start MP CMD Tool

# rtlbtmp

3.1.2 Enable MP Stack

Check Bluetooth stack HCI interface first, then run the enable MP stack CMD. > enable usb:/dev/rtk_btusb // usb I/F > enable uart:/dev/ttyS0

// uart I/F, device node specified by vendor (platform)

3.1.3 Disable MP Stack

> disable

3.1.5 Exit MP Tool

> quit

3.1.6 Lookup MP CMDs

> help

3.2 MP Mode Control Parameters Commands​

3.2.1 Control Parameters Commands Format

These commands used to set/get Bluetooth DUT parameters.

MP CommandParametersReturn
bt mp SetParam _ _Return IndexReturn Status
Index0,value0;Index1,value1;...;IndexN,valueN
bt mp GetParam _ _Return IndexReturn StatusReturn Value
Index

TABLE CONTROL_PARAM_CMD

3.2.2 Control Commands: Set/Get parameter command

You can use “bt_mp_SetParam” to set parameters and can use ”bt_mp_GetParam” to check it. The Format is “bt_mp_SetParam Index0,value0; Index1,..;IndexN,valueN”.

Example : If you want to set the channel 10 and packet type “BT_PKT_3DH5”, you can use” bt_mp_SetParam 0x01,0x0a;0x02,0x08”

Or set channel and packet type separately.

Usebt_mp_GetParam to check parameter settings. The parameter Indexes define in “PARAM_INDEX” Table.

INDEXVALUELengthValue RangeTable Index
(Byte)
0PGRawData256Row dataNone
1ChannelNumber10~78None
2PacketType10~9See PKT TYPE _
3PayloadType10~7See PAYLOAD TYPE _
4TxPacketCount (only for packet tx)20~0x3FFFSee Section3.2.3
6WhiteningCoeffValue10x00~0x7F0x00~0x7F: Enable Whitening 0x80: Disable Whitening
7TxGainIndex1Realtek defineSee Section3.2.5
9PacketHeader40x0~0x3FFFFSee PACKET HEADER _
10HoppingFixChannel (for Hopping mode)10 : Disable 1 : Enable Fix ChannelNone
11HitTarget66 bytesNone
14Xtal40~0x3FNone
15LEDataLen10~0x25None

Table PARAM_INDEX

The packet types are defined in Table PKT_TYPE:

NAMEINDEXPayload Length in bits
BT PKT DH1 _ _00~27*8
BT PKT DH3 _ _10~183*8
BT PKT DH5 _ _20~339*8
BT PKT 2DH1 _ _30~54*8
BT PKT 2DH3 _ _40~367*8
BT PKT 2DH5 _ _50~679*8
BT PKT 3DH1 _ _60~83*8
BT PKT 3DH3 _ _70~552*8
BT PKT 3DH5 _ _80~1021*8
BT PKT LE _ _90~39*8

Table PKT_TYPE

The payload types are defined in Table PAYLOAD_TYPE.

NAMEINDEX
BT PAYLOAD TYPE ALL0 _ _ _0
BT PAYLOAD TYPE ALL1 _ _ _1
BT PAYLOAD TYPE 0101 _ _ _2
BT PAYLOAD TYPE 1010 _ _ _3
BT PAYLOAD TYPE 0x0 0xF _ _ _ _4
BT PAYLOAD TYPE 0000 1111 _ _ _ _5
BT PAYLOAD TYPE 1111 0000 _ _ _ _6
BT PAYLOAD TYPE PRBS9 _ _ _7

Table PAYLOAD_TYPE

Packet typePayload(Bits)Packet Header Hex
DH121633820
DH3146439858
DH52712A078
2DH143233820
2DH32936C050
2DH554323F870
3DH166415C40
3DH3441639858
3DH58168A078

Table PACKET_HEADER

3.2.3 TxPacketCount parameter

TxPacketCount is used to set how many TX packets will be transmitted. The range of TxPacketCount is from 0 to 0xFFF. In UI mode, the value of TxPacketCount is “0” that means to send the most tx packet counts “0xFFF”. In FW mode, the value of TxPacketCount is “0” that means to send tx packet counts continuously.

3.2.4 WhiteningCoeffValue parameter

The range of WhiteningCoeffValue is from 0 to 0x7F. However, if WhiteningCoeffValue is “0x80”, it means to disable whitening. 3.2.5 TxGainIndex parameter

IC TYPEMODEGET DEFAULT POWERUSED by “bt mp Exec” _ _
COMMAND
RTL8723BUI modeLoad Tx Table # ./bt mp Exec 5 // SET TX GAIN TABLE _ _ #./ bt mp Exec 6 //SET TX DAC TABLE _ _ Default Tx Index(usb) 1M/2M/3M/LE : 5/5/5/4 Default Tx Index(uart) 1M/2M/3M/LE : 4/4/4/4“bt mp Exec” _ _ 1214(pkt tx) 1517(cont tx) 1820(pkt rx) 2829(le cont tx)
RTL8821AUI modeLoad Tx Table # ./bt mp Exec 5 // SET TX GAIN TABLE _ _ #./ bt mp Exec 6 //SET TX DAC TABLE _ _ Default Tx Index 1M/2M/3M/LE : 7/7/7/6
RTL8703BUI modeLoad Tx Table # ./bt mp Exec 5 // SET TX GAIN TABLE _ _ #./ bt mp Exec 6 //SET TX DAC TABLE _ _ Default Tx Index 1M/2M/3M/LE : 6/6/6/6
RTL8761AUI modeLoad Tx Table # ./bt mp Exec 5 // SET TX GAIN TABLE _ _ #./ bt mp Exec 6 //SET TX DAC TABLE _ _ Default Tx Index 1M/2M/3M/LE : 6/6/6/5
FW modeGet Tx Power Info #./ bt mp Exec 38 _ _ #./bt mp Report 17 _ _ [Retuen format] 17,Status, max tx power index, 1M, 2M, 3M, LE default tx power index The range of “TxGainIndex” value is from 0 to max tx index.“bt mp Exec” _ _ 3031(pkt tx) 3233(pkt rx) 3435(cont tx) 3637(le cont tx)
Get Tx Power Info“bt mp Exec” _ _
#./ bt mp Exec 38 _ _
#./bt mp Report 17 _ _12~14(pkt tx)
RTL8723D[Retuen format] 17,Status, max tx power index,15~17(cont tx)
RTL8822B1M, 2M, 3M, LE default tx power index18~20(pkt rx)
RTL8821CFW modeThe range of “TxGainIndex” value is from 0 to max28~29(le cont tx)
tx index.
30~31(pkt tx)
32~33(pkt rx)
34~35(cont tx)
36~37(le cont tx)

Only in packet tx, the UI mode and FW mode are different. In other operations they are the same. In UI mode, the value of TxPacketCount is “0” that means to send packet “0xFFF”counts. In FW mode, the value of TxPacketCount is “0” that means to send packets continuously.

3.3 MP Mode execute Commands​

Using this command to control bt mp action, and get current report.

MP CommandParametersReturn
bt mp Exec _ _ActionReturn ActionReturn Status

You can use “bt_mp_Exec ACTION_INDEX”. The definition of ACTION_INDEX can refer to “BT_ACTIONCONTROL_TAG” Table. Example: If you want to run “PACKET_TX_START” this action, please use the “bt_mp_Exec 12” command. On the contrary “bt_mp_Exec 14” is “PACKET_TX_STOP”.

Support Chip
RTL8723BRTL8723D
CommandIndex
RTL8761ARTL8821C
RTL8821ARTL8822B
HCI RESET _0▓▓
TEST MODE ENABLE _ _1▓▓
WRITE EFUSE DATA _ _2▓▓
SET TX GAIN TABLE _ _ _3▓▓
SET TX DAC TABLE _ _ _4▓▓
SET DEFAULT TX GAIN TABLE _ _ _ _5▓▓
SET DEFAULT TX DAC TABLE _ _ _ _6▓▓
SET POWER GAIN INDEX _ _ _7▓▓
SET POWER GAIN _ _8▓▓
SET POWER DAC _ _9▓▓
SET XTAL _10▓▓
REPORT CLEAR _11▓▓
PACKET TX START _ _12▓
PACKET TX UPDATE _ _13▓
PACKET TX STOP _ _14▓
CONTINUE TX START _ _15▓
CONTINUE TX UPDATE _ _16▓
CONTINUE TX STOP _ _17▓
PACKET RX START _ _18▓
PACKET RX UPDATE _ _19▓
PACKET RX STOP _ _20▓
HOPPING DWELL TIME _ _21▓▓
LE TX DUT TEST CMD _ _ _ _22▓▓
LE RX DUT TEST CMD _ _ _ _23▓▓
LE DUT TEST END CMD _ _ _ _24▓▓
READ EFUSE DATA _ _25▓▓
LE CONTINUE TX START _ _ _28▓
LE CONTINUE TX STOP _ _29▓
FW PACKET TX START _ _ _30▓
FW PACKET TX STOP _ _ _31▓
FW PACKET RX START _ _ _32▓
FW PACKET RX STOP _ _ _33▓
FW CONTINUE TX START _ _ _34▓
FW CONTINUE TX STOP _ _ _35▓
FW LE CONTINUE TX START _ _ _ _36▓
FW LE CONTINUE TX STOP _ _ _ _37▓
FW READ TX POWER INFO _ _ _ _38▓

Table BT_ACTIONCONTROL_TAG

3.4 MP Mode Report Commands​

These commands used to report Bluetooth DUT TX/RX status are listed as below: #./bt_mp_Report “Item Index”

ItemReturn
Item Index
Index
PKT TX = 11StatusTXBitsTxCounts
2StatusTXBitsTxCount s
CONT TX = 2
PKT RX = 33StatusRxRssiRXBitsRxCountsRxErrorBits
Tx Gain Table = 44StatusTx Gain Table
Tx DAC Table = 55StatusTx DAC Table
Xtal = 66StatusXtal
Thermal = 77StatusThermal
Stage = 88StatusStage
Efuse = 1010StatusEfuse
LE RX = 1111StatusRxCounts
LE CONT TX=1212StatusTXBitsTxCounts
FW PKT TX=13 _ _13StatusTXBitsTxCounts
FW CONT TX=14 _ _14StatusTXBitsTxCounts
FW PKT RX=15 _ _15StatusRxRssiRXBitsRxCountsRxErrorBits
FW LE CONT TX=16 _ _ _16StatusTXBitsTxCounts
17StatusMax tx power index1M default tx power index2M default tx power index3M default tx power indexLE default tx power index
TX POWER INFO=17 _ _

4. RF Test Mode (Certification)​

This chapter describes the entering BQB test and RF safety testing

4.1 Direct Test Mode - BR/EDR (BQB Certification)​

Enter the Bluetooth device to Bluetooth DUT Test and stop DUT Test Mode command below: --Enter DUT Test Mode: Use bt_mp_Exec(TEST_MODE_ENABLE) to enter Bluetooth test mode. --Stop Test Mode Use bt_mp_Exec(HCI_RESET) to stop Bluetooth test mode.

The Test connection diagram :

Bluetooth test Bluetooth device Air instrument

For example by ADB for android : ex usb interface and use Anritsu 8852B to test (a) Enter MP Mode and download patch code

(b) Enter DUT MP Mode

(c) Begin MP test by Bluetooth test instrument (e.g. Anritsu 8852B) (d) bt_mp_Exec(HCI_RESET) to stop test.

(e) exit MP Mode

4.2 TX Test- BR/EDR (Certification)​

In order to transmit a continuous signal, follow the process below: Step0: Get default tx power index

IC TYPEMODEGET DEFAULT POWER
RTL8723BUI modeLoad Tx Table # ./bt mp Exec 5 // SET TX GAIN TABLE _ _ #./ bt mp Exec 6 //SET TX DAC TABLE _ _ Default Tx Index(usb) 1M/2M/3M/LE : 5/5/5/4 Default Tx Index(uart) 1M/2M/3M/LE : 4/4/4/4Load Tx Table
RTL8821AUI modeLoad Tx Table # ./bt mp Exec 5 // SET TX GAIN TABLE _ _ #./ bt mp Exec 6 //SET TX DAC TABLE _ _ Default Tx Index 1M/2M/3M/LE : 7/7/7/6
RTL8703BUI modeLoad Tx Table # ./bt mp Exec 5 // SET TX GAIN TABLE _ _ #./ bt mp Exec 6 //SET TX DAC TABLE _ _ Default Tx Index 1M/2M/3M/LE : 6/6/6/6
RTL8761AUI modeLoad Tx Table # ./bt mp Exec 5 // SET TX GAIN TABLE _ _ #./ bt mp Exec 6 //SET TX DAC TABLE _ _ Default Tx Index 1M/2M/3M/LE : 6/6/6/5
FW modeGet Tx Power Info #./ bt mp Exec 38 _ _ #./bt mp Report 17 _ _ [Retuen format] 17,Status, max tx power index, 1M, 2M, 3M, LE default tx power index The range of “TxGainIndex” value is from 0 to max tx index.
Get Tx Power Info
#./ bt mp Exec 38 _ _
#./bt mp Report 17 _ _
RTL8723D[Retuen format] 17,Status, max tx power index,
RTL8822B1M, 2M, 3M, LE default tx power index
RTL8821CFW modeThe range of “TxGainIndex” value is from 0 to max
tx index.

Step1: bt_mp_SetParam

INDEXVALUE
1ChannelNumber
2PacketType
3PayloadType
6WhiteningCoeffValue
7TxGainIndex
9PacketHeader
11HitTarget

Step2: bt_mp_Exec(CONTINUE_TX_START = 15) or (FW_CONTINUE_TX_START=34)

Step3: bt_mp_Report 2

Step4: bt_mp_Exec(CONTINUE_TX_STOP = 17) or (FW_CONTINUE_TX_STOP=35)

4.3 LE Direct Test Mode (BQB Test)​

After testing BT4.0 only enable device and download patch code, you should jump interface to the instrument. Step 1:rtlbtmp Step 2:enable (xxxxxxxx) Step 3: Jump hardware interface to the instrument. Step 4:Begin test. BLE is a schematic diagram of the test for Certification:

4.4 LE Certification TX Mode(Certification)​

In order to facilitate RF safety testing, such as the band edge. We often use to facilitate continuous tx RF safety testing. eg.Bandedge Step0: Get default tx power index

IC TYPEMODEGET DEFAULT POWER
RTL8723BUI modeLoad Tx Table # ./bt mp Exec 5 // SET TX GAIN TABLE _ _ #./ bt mp Exec 6 //SET TX DAC TABLE _ _ Default Tx Index(usb) 1M/2M/3M/LE : 5/5/5/4 Default Tx Index(uart) 1M/2M/3M/LE : 4/4/4/4Load Tx Table
RTL8821AUI modeLoad Tx Table # ./bt mp Exec 5 // SET TX GAIN TABLE _ _ #./ bt mp Exec 6 //SET TX DAC TABLE _ _ Default Tx Index 1M/2M/3M/LE : 7/7/7/6
RTL8703BUI modeLoad Tx Table # ./bt mp Exec 5 // SET TX GAIN TABLE _ _ #./ bt mp Exec 6 //SET TX DAC TABLE _ _ Default Tx Index 1M/2M/3M/LE : 6/6/6/6
UI modeLoad Tx Table # ./bt mp Exec 5 // SET TX GAIN TABLE _ _ #./ bt mp Exec 6 //SET TX DAC TABLE _ _ Default Tx Index 1M/2M/3M/LE : 6/6/6/5
RTL8761AFW modeGet Tx Power Info #./ bt mp Exec 38 _ _ #./bt mp Report 17 _ _ [Retuen format] 17,Status, max tx power index, 1M, 2M, 3M, LE default tx power index The range of “TxGainIndex” value is from 0 to max tx index.
Get Tx Power Info
#./ bt mp Exec 38 _ _
#./bt mp Report 17 _ _
RTL8723D[Retuen format] 17,Status, max tx power index,
RTL8822B1M, 2M, 3M, LE default tx power index
RTL8821CFW modeThe range of “TxGainIndex” value is from 0 to max
tx index.

Step1: bt_mp_SetParam : Channel Number = 0~39

INDEXVALUE
1ChannelNumber
7TxGainIndex

Step2: bt_mp_Exec(LE_ CONTINUE _TX _START = 28) or

(FW_LE_CONTINUE_TX_START=36)

Step3: bt_mp_Exec(LE_ CONTINUE _TX _STOP = 29) or (FW_LE_CONTINUE_TX_STOP=37)

4.5 Hopping Test Mode(Certification- Dwell time)​

In order to start hopping mode test, follow the steps below: Step 1: bt_mp_SetParam….(to setting packet type:DH1,DH2….3DH5)

NAMEINDEX
BT PKT DH1 _ _0
BT PKT DH3 _ _1
BT PKT DH5 _ _2
BT PKT 2DH1 _ _3
BT PKT 2DH3 _ _4
BT PKT 2DH5 _ _5
BT PKT 3DH1 _ _6
BT PKT 3DH3 _ _7
BT PKT 3DH5 _ _8
BT PKT LE _ _9
BT PKT NULL _ _10
INDEXVALUE
2PacketType
10HoppingFixChannel (0 or 1)
1ChannelNumber (0~78)
6WhiteningCoeffValue

Step 2: bt_mp_Exec(HOPPING_DWELL_TIME = 21) Step 3: bt_mp_Exec(HCI_RESET = 0) to disable hopping mode. PS. If HoppingFixChannel = 1, it enable fix channel that is controlled by “ChannelNumber”. If HoppingFixChannel = 0, “ChannelNumber” is useless.

5. MP Mode Test Control Steps (Certification)​

5.1 DUT Single Tone TX Mode​

To Set Single-Tone Tx, step by step:

Step0: Get default tx power index

IC TYPEMODEGET DEFAULT POWER
RTL8723BUI modeLoad Tx Table # ./bt mp Exec 5 // SET TX GAIN TABLE _ _ #./ bt mp Exec 6 //SET TX DAC TABLE _ _ Default Tx Index(usb) 1M/2M/3M/LE : 5/5/5/4 Default Tx Index(uart) 1M/2M/3M/LE : 4/4/4/4Load Tx Table
RTL8821AUI modeLoad Tx Table # ./bt mp Exec 5 // SET TX GAIN TABLE _ _ #./ bt mp Exec 6 //SET TX DAC TABLE _ _ Default Tx Index 1M/2M/3M/LE : 7/7/7/6
RTL8703BUI modeLoad Tx Table # ./bt mp Exec 5 // SET TX GAIN TABLE _ _ #./ bt mp Exec 6 //SET TX DAC TABLE _ _ Default Tx Index 1M/2M/3M/LE : 6/6/6/6
UI modeLoad Tx Table # ./bt mp Exec 5 // SET TX GAIN TABLE _ _ #./ bt mp Exec 6 //SET TX DAC TABLE _ _ Default Tx Index 1M/2M/3M/LE : 6/6/6/5
RTL8761AFW modeGet Tx Power Info #./ bt mp Exec 38 _ _ #./bt mp Report 17 _ _ [Retuen format] 17,Status, max tx power index, 1M, 2M, 3M, LE default tx power index The range of “TxGainIndex” value is from 0 to max tx index.
Get Tx Power Info
#./ bt mp Exec 38 _ _
#./bt mp Report 17 _ _
RTL8723D[Retuen format] 17,Status, max tx power index,
RTL8822B1M, 2M, 3M, LE default tx power index
RTL8821CFW modeThe range of “TxGainIndex” value is from 0 to max
tx index.

Step1: bt_mp_SetParam

INDEXVALUE
1ChannelNumber
2PacketType
3PayloadType
6WhiteningCoeffValue
7TxGainIndex
9PacketHeader
11HitTarget

Set fix parameter list below as:

PacketType=3DH5;
PayloadType=ALL0;
TxPacketCount=Infinite;
WhiteningCoeffValue =0xFF(disable);
TxGainIndex=7;
PacketHeader=0XA078;

HitTarget=0x000000c6967e

In this example we use 0X3FFFF that different PACKET_HEADER, please check PACKET_HEADER table. Step2: Execute : CONTINUE_TX_START = 15 or FW_CONTINUE_TX_START=34

Step 3: Stop Single-Tone Tx. CONTINUE_TX_STOP = 17 or FW_CONTINUE_TX_STOP=35

5.2 DUT TX Mode(MP)​

In order to transmit a packet signal, follow the process below: Step0: Get default tx power index

IC TYPEMODEGET DEFAULT POWER
RTL8723BUI modeLoad Tx Table # ./bt mp Exec 5 // SET TX GAIN TABLE _ _ #./ bt mp Exec 6 //SET TX DAC TABLE _ _ Default Tx Index(usb) 1M/2M/3M/LE : 5/5/5/4 Default Tx Index(uart) 1M/2M/3M/LE : 4/4/4/4Load Tx Table
RTL8821AUI modeLoad Tx Table # ./bt mp Exec 5 // SET TX GAIN TABLE _ _ #./ bt mp Exec 6 //SET TX DAC TABLE _ _ Default Tx Index 1M/2M/3M/LE : 7/7/7/6
RTL8703BUI modeLoad Tx Table # ./bt mp Exec 5 // SET TX GAIN TABLE _ _ #./ bt mp Exec 6 //SET TX DAC TABLE _ _ Default Tx Index 1M/2M/3M/LE : 6/6/6/6
RTL8761AUI modeLoad Tx Table # ./bt mp Exec 5 // SET TX GAIN TABLE _ _ #./ bt mp Exec 6 //SET TX DAC TABLE _ _ Default Tx Index 1M/2M/3M/LE : 6/6/6/5
FW modeGet Tx Power Info #./ bt mp Exec 38 _ _ #./bt mp Report 17 _ _ [Retuen format] 17,Status, max tx power index, 1M, 2M, 3M, LE default tx power index
The range of “TxGainIndex” value is from 0 to max tx index.
Get Tx Power Info
#./ bt mp Exec 38 _ _
#./bt mp Report 17 _ _
RTL8723D[Retuen format] 17,Status, max tx power index,
RTL8822B1M, 2M, 3M, LE default tx power index
RTL8821CFW modeThe range of “TxGainIndex” value is from 0 to max
tx index.

Step1: bt_mp_SetParam….

INDEXVALUE
1ChannelNumber
2PacketType
3PayloadType
4TxPacketCount
6WhiteningCoeffValue
7TxGainIndex
9PacketHeader
11HitTarget

Step2: bt_mp_Exec(PACKET_TX_START =12) or (FW_PACKET_TX_START=30) Step3: bt_mp_Report 1 (if need report, to do..) Step4: bt_mp_Exec(PACKET_TX_STOP =14) or (FW_PACKET_TX_STOP=31)

5.2 DUT RX Mode(MP)​

In order to receive a packet signal, follow the process below: Step1: bt_mp_SetParam….

INDEXVALUE
1ChannelNumber
2PacketType
3PayloadType
6WhiteningCoeffValue
9PacketHeader
11HitTarget

Step2: bt_mp_Exec(PACKET_RX_START =18) or (FW_PACKET_RX_START=32) Step3: bt_mp_Report 3 Step4: bt_mp_Exec(PACKET_RX_STOP=20) or (FW_PACKET_RX_STOP=33)

PS. bt_mp_Report 3” should be excuted every 1s.

5.3 LE DUT Test Mode-TX/RX (MP)​

To start LE TX DUT test mode, follow the steps below: Step0: Get default tx power index

IC TYPEMODEGET DEFAULT POWER
RTL8723BUI modeLoad Tx Table # ./bt mp Exec 5 // SET TX GAIN TABLE _ _ #./ bt mp Exec 6 //SET TX DAC TABLE _ _ Default Tx Index(usb) 1M/2M/3M/LE : 5/5/5/4 Default Tx Index(uart) 1M/2M/3M/LE : 4/4/4/4Load Tx Table
RTL8821AUI modeLoad Tx Table # ./bt mp Exec 5 // SET TX GAIN TABLE _ _ #./ bt mp Exec 6 //SET TX DAC TABLE _ _ Default Tx Index 1M/2M/3M/LE : 7/7/7/6
RTL8703BUI modeLoad Tx Table # ./bt mp Exec 5 // SET TX GAIN TABLE _ _ #./ bt mp Exec 6 //SET TX DAC TABLE _ _ Default Tx Index 1M/2M/3M/LE : 6/6/6/6
RTL8761AUI modeLoad Tx Table # ./bt mp Exec 5 // SET TX GAIN TABLE _ _ #./ bt mp Exec 6 //SET TX DAC TABLE _ _ Default Tx Index 1M/2M/3M/LE : 6/6/6/5
FW modeGet Tx Power Info #./ bt mp Exec 38 _ _ #./bt mp Report 17 _ _ [Retuen format] 17,Status, max tx power index, 1M, 2M, 3M, LE default tx power index The range of “TxGainIndex” value is from 0 to max tx index.
Get Tx Power Info
#./ bt mp Exec 38 _ _
#./bt mp Report 17 _ _
RTL8723D[Retuen format] 17,Status, max tx power index,
RTL8822B1M, 2M, 3M, LE default tx power index
RTL8821CFW modeThe range of “TxGainIndex” value is from 0 to max
tx index.

Step 1: bt_mp_SetParam

INDEXVALUEValue Range
1ChannelNumber0~39
3PayloadTypeBT LE PAYLOAD TYPE PRBS9 = 0, _ _ _ _ BT LE PAYLOAD TYPE 1111 0000 = 1, _ _ _ _ _ BT LE PAYLOAD TYPE 1010 = 2, _ _ _ _ BT LE PAYLOAD TYPE PRBS15 = 3, _ _ _ _ BT LE PAYLOAD TYPE ALL1 = 4, _ _ _ _ BT LE PAYLOAD TYPE ALL0 = 5, _ _ _ _ BT LE PAYLOAD TYPE 0000 1111 = 6, _ _ _ _ _ BT LE PAYLOAD TYPE 0101 = 7, _ _ _ _
7TxGainIndex1~MAX POWER INDEX _ _
15LEDataLen0x00~0x25

Step 2: bt_mp_Exec(LE_TX_DUT_TEST_CMD = 22) Step 3: bt_mp_Exec(LE_DUT_TEST_END_CMD=24) to stop LE TX DUT mode.

To start LE RX DUT test mode, follow the steps below: Step 1: bt_mp_SetParam

INDEXVALUEValue Range
1ChannelNumber0~39

Step 2: bt_mp_Exec(LE_RX_DUT_TEST_CMD=23) Step 3: bt_mp_Exec(LE_DUT_TEST_END_CMD=24) to stop LE RX DUT mode. Step 4: bt_mp_Report 11

6. MP Test Flow​

6.1 Bluetooth Calibrates Crystal (Xtal) Cap by Non-Signaling​

mode​

First, take a look at eFuse content about setting of Crystal Cap. . Normal driver will load this value in initial step. So this value must be well-calibrated and filled on correct eFuse location. The flow of calibration Bluetooth step is as below:

Set Index = Measure Carrier Start to Find Index Set Single-Tone Tx InitIndex Frequency (Hz)

Abs. Value of No Set Index = Index + (TargetCFOffset - MeasuredCFOffset) / Step Set New Index for binary search MeasuredCFOffset < 2ppm

YES

Have Found Index

Finding Crystal Cap. Index Flow​

InitIndex: the default value is 0x20. Index range is 0x0 to 0x3F. MeasuredCFOffset: Carrier frequency measured by instrument - Ideal Carrier Frequency Target range Abs. Value of 2ppm in 2.441GHz band is about 10KHz(±5KHz).

Step1 : Get default tx gain index

IC TYPEMODEGET DEFAULT POWER
RTL8723BUI modeLoad Tx Table # ./bt mp Exec 5 // SET TX GAIN TABLE _ _ #./ bt mp Exec 6 //SET TX DAC TABLE _ _ Default Tx Index(usb) 1M/2M/3M/LE : 5/5/5/4 Default Tx Index(uart) 1M/2M/3M/LE : 4/4/4/4Load Tx Table
RTL8821AUI modeLoad Tx Table # ./bt mp Exec 5 // SET TX GAIN TABLE _ _ #./ bt mp Exec 6 //SET TX DAC TABLE _ _ Default Tx Index 1M/2M/3M/LE : 7/7/7/6
RTL8703BUI modeLoad Tx Table # ./bt mp Exec 5 // SET TX GAIN TABLE _ _ #./ bt mp Exec 6 //SET TX DAC TABLE _ _ Default Tx Index 1M/2M/3M/LE : 6/6/6/6
RTL8761AUI modeLoad Tx Table # ./bt mp Exec 5 // SET TX GAIN TABLE _ _ #./ bt mp Exec 6 //SET TX DAC TABLE _ _ Default Tx Index 1M/2M/3M/LE : 6/6/6/5
FW modeGet Tx Power Info #./ bt mp Exec 38 _ _ #./bt mp Report 17 _ _ [Retuen format] 17,Status, max tx power index, 1M, 2M, 3M, LE default tx power index The range of “TxGainIndex” value is from 0 to max tx index.
Get Tx Power Info
#./ bt mp Exec 38 _ _
#./bt mp Report 17 _ _
RTL8723D[Retuen format] 17,Status, max tx power index,
RTL8822B1M, 2M, 3M, LE default tx power index
RTL8821CFW modeThe range of “TxGainIndex” value is from 0 to max
tx index.

Step 2: Set Index = InitIndex(0x20)

Step 3: Set Single-Tone Tx

Channel=39;
PacketType=3DH5;
PayloadType=ALL0;
TxPacketCount=Infinite;
WhiteningCoeffValue =0xFF(disable);
TxGainIndex=7;
PacketHeader=0XA078;

HitTarget=0x000000c6967e CONTINUE_TX_START = 15 or FW_CONTINUE_TX_START=34 In this example we use 0X3FFFF that different PACKET_HEADER, please check PACKET_HEADER table.

Step 4: Stop Single-Tone Tx. CONTINUE_TX_STOP = 17 or FW_CONTINUE_TX_STOP=35

Step 5: Go to Step2and re-tune Index value until find the best Crystal index value.

6.2 Verify Bluetooth Legacy Tx Performance by Non-Signaling​

mode​

To measure the DUT TX power/initial Carrier offset/modulation characteristics to check Tx performance is ok or not. Bluetooth TX criterion is shown as below:

Verify Tx DH1Criterion
Test ItemSub Test ItemPacket TypeChannel
Bluetooth Spec.
Average PowerDH1Low (CH6- 2408MHZ)> 0dBm
Middle (CH42- 2444MHZ)> 0dBm
Maximum Output Power
High (CH70- 2472MHZ)> 0dBm
Delta F1 Avg.DH1Low (CH6- 2408MHZ)140KHz ~ 175KHz
Delta F2 Max.Middle (CH42- 2444MHZ)> 115KHz
Modulation Characteristics
Modulation IndexHigh (CH70- 2472MHZ)> 0.8
DH1Low (CH6- 2408MHZ)-20KHz ~ 20KHz
Middle (CH42- 2444MHZ)
Initial Carrier Frequency Error
High (CH70- 2472MHZ)
Verify Tx 3DH1Average Power3DH1Low (CH6- 2408MHZ)> 0dBm
Middle (CH42- 2444MHZ)> 0dBm
Maximum Output Power
High (CH70- 2472MHZ)> 0dBm
RMS DEVM3DH1Low (CH6- 2408MHZ)0.13
Peak DEVMMiddle (CH42- 2444MHZ)0.25
Modulation Characteristics
99% DEVMHigh (CH70- 2472MHZ)0.20
Initial Carrier Frequency Error3DH1All-20KHz ~ 20KHz

For example, use adb commands android platform, device is UART interface. step by step command: (1) Enter MP Mode and download patch code

Get default tx gain index

IC TYPEMODEGET DEFAULT POWER
RTL8723BUI modeLoad Tx Table # ./bt mp Exec 5 // SET TX GAIN TABLE _ _ #./ bt mp Exec 6 //SET TX DAC TABLE _ _ Default Tx Index(usb) 1M/2M/3M/LE : 5/5/5/4 Default Tx Index(uart) 1M/2M/3M/LE : 4/4/4/4Load Tx Table
RTL8821AUI modeLoad Tx Table # ./bt mp Exec 5 // SET TX GAIN TABLE _ _ #./ bt mp Exec 6 //SET TX DAC TABLE _ _ Default Tx Index 1M/2M/3M/LE : 7/7/7/6
RTL8703BUI modeLoad Tx Table # ./bt mp Exec 5 // SET TX GAIN TABLE _ _ #./ bt mp Exec 6 //SET TX DAC TABLE _ _ Default Tx Index 1M/2M/3M/LE : 6/6/6/6
RTL8761AUI modeLoad Tx Table # ./bt mp Exec 5 // SET TX GAIN TABLE _ _ #./ bt mp Exec 6 //SET TX DAC TABLE _ _ Default Tx Index 1M/2M/3M/LE : 6/6/6/5
FW modeGet Tx Power Info #./ bt mp Exec 38 _ _ #./bt mp Report 17 _ _ [Retuen format] 17,Status, max tx power index, 1M, 2M, 3M, LE default tx power index The range of “TxGainIndex” value is from 0 to max tx index.
Get Tx Power Info
#./ bt mp Exec 38 _ _
#./bt mp Report 17 _ _
RTL8723D[Retuen format] 17,Status, max tx power index,
RTL8822B1M, 2M, 3M, LE default tx power index
RTL8821CFW modeThe range of “TxGainIndex” value is from 0 to max
tx index.

(2) Set Parameter :

Test Itemadb command
Test ItemChannel = 6
DH1Maximum Powerbt mp SetParam 1,0x06;2,0x00;3,0x07;4,0x00;6,0x7F;7,0x7;9, 0x33820;11,0x0000009e8b33 _ _
DH1Delta F1bt mp SetParam 1,0x06;2,0x00;3,0x05;4,0x00;6,0xFF;7,0x7;9, 0x33820;11,0x0000009e8b33 _ _
DH1Delta F2bt mp SetParam 1,0x06;2,0x00;3,0x02;4,0x00;6,0xFF;7,0x7;9, 0x33820;11,0x0000009e8b33 _ _
3DH1ALLbt mp SetParam 1,0x06;2,0x06;3,0x07;4,0x00;6,0x7F;7,0x7;9, 0x15C40;11,0x0000009e8b33 _ _
Test Itemadb command
Test ItemChannel = 42
DH1Maximum Powerbt mp SetParam 1,0x2a;2,0x00;3,0x07;4,0x00;6,0x7F;7,0x7;9, 0x33820;11,0x0000009e8b33 _ _
DH1Delta F1bt mp SetParam 1,0x2a;2,0x00;3,0x05;4,0x00;6,0xFF;7,0x7;9,0x33820;11,0x0000009e8b33 _ _
DH1Delta F2bt mp SetParam 1,0x2a;2,0x00;3,0x02;4,0x00;6,0xFF;7,0x7;9,0x33820;11,0x0000009e8b33 _ _
3DH1ALLbt mp SetParam 1,0x2a;2,0x06;3,0x07;4,0x00;6,0x7F;7,0x7;9,0x15C40;11,0x0000009e8b33 _ _
Test Itemadb command
Test ItemChannel = 70
DH1Maximum Powerbt mp SetParam 1,0x46;2,0x00;3,0x07;4,0x00;6,0x7F;7,0x7;9, 0x33820;11,0x0000009e8b33 _ _
DH1Delta F1bt mp SetParam 1,0x46;2,0x00;3,0x05;4,0x00;6,0xFF;7,0x7;9, 0x33820;11,0x0000009e8b33 _ _
DH1Delta F2bt mp SetParam 1,0x46;2,0x00;3,0x02;4,0x00;6,0xFF;7,0x7;9, 0x33820;11,0x0000009e8b33 _ _
3DH1ALLbt mp SetParam 1,0x46;2,0x06;3,0x07;4,0x00;6,0x7F;7,0x7;9, 0x15C40;11,0x0000009e8b33 _ _

(3)Run Packe Tx (PACKET_TX_START =12) or (FW_PACKET_TX_START=30)

(4) measured by Bluetooth test instrument (e.g. Litepoint IQNxN) (5)Stop Packet Tx (PACKET_TX_STOP =14) or (FW_PACKET_TX_STOP=31)

-- If you need to test other parameters, please stop packet tx and go back to step 2 (6)exit MP Mode

6.3 Verify Bluetooth Rx Performance by Non-Signaling mode​

Measure the DUT Rx sensitivity to check Rx performance is ok or not. The Rx performance test can be measured in Signaling mode (ex: Anritsu 8852B, Agilent N4010A) or Non-Signaling mode (ex:LitePoint IQNxN). Bluetooth Rx criterion is shown as below:

Verify Bluetooth RxTest ItemPacket TypeCriterion
Bluetooth Spec
SensitivityDH1 or 3DH5< -70dBm

For final MP, Rx can just test DH1, 3DH5 BER at sensitivity criterion power level at channel 0 and 78 to reduce time. All Bluetooth Rx criterion is shown as:

Test ItemCriterion(Bluetooth Spec)
ChannelPacket type< -70dBm
6DH1< -70dBm
42DH1< -70dBm
70DH1< -70dBm
63DH1< -70dBm
423DH1< -70dBm
703DH1< -70dBm

(1) Enter MP Mode and download patch code

Set default table

(2) Set Parameter

Test Itemadb command
ChannelPacket typePayloadType=PRBS9; WhiteningCoeffValue = 0xFF(disable); PacketHeader=PACKET HEADER Table; HitTarget= 0x000000c6967e _
6DH1bt mp SetParam 1,0x06;2,0x00;3,0x07;6,0xFF;9, 0x33820;11,0x000000c6967e _ _
42DH1bt mp SetParam 1,0x2a;2,0x00;3,0x07;6,0xFF;9, 0x33820;11,0x000000c6967e _ _
70DH1bt mp SetParam 1,0x46;2,0x00;3,0x07;6,0xFF;9, 0x33820;11,0x000000c6967e _ _
63DH1bt mp SetParam 1,0x06;2,0x06;3,0x07;6,0xFF;9, 0x15C40;11,0x000000c6967e _ _
423DH1bt mp SetParam 1,0x2a;2,0x06;3,0x07;6,0xFF;9, 0x15C40;11,0x000000c6967e _ _
703DH1bt mp SetParam 1,0x46;2,0x06;3,0x07;6,0xFF;9, 0x15C40;11,0x000000c6967e _ _

Please refer to Chapter 3. (3)To setting Parameter with the Bluetooth test instrument. Bluetooth test instrument begin transmit.. (4)Run Packe Rx (PACKET_RX_START =18) or (FW_PACKET_RX_START=32)

(5) Report Received Result. -- “bt_mp_Report 3” should be executed every 1s. (6)Stop Packet Rx

(PACKET_RX_STOP=20) or (FW_PACKET_RX_STOP=33)

-- If you need to test other parameters, please stop packet Rx and go back to step 2. (7)exit MP Mode

6.4 Verify Bluetooth BLE Tx Performance​

To measure the DUT BLE TX power and modulation index to check BLE TX performance is ok or not. Bluetooth BLE TX criterion is shown as below:

Verify BLE TxCriterion
Test ItemSub Test ItemPayload TypeChannel
Bluetooth Spec.
Average PowerPRBS9Low (CH0- 2402MHZ)> 0dBm
Middle (CH19- 2440MHZ)> 0dBm
BLE Output Power
High (CH34- 2470MHZ)> 0dBm
Delta F1 Avg.BT PAYLOAD TYPE 1111 0000 _ _ _ _2440MHZ CH19-225 kHz ~ 275 kHz
Modulation CharacteristicsDelta F2 Max.BT PAYLOAD TYPE 1010 _ _ _≥ 185 kHz
Modulation IndexNone≥ 0.8

For example, use adb commands android platform, device is UART interface. step by step command: (1) Enter MP Mode and download patch code (2) Set Parameter :

Test Itemadb command
ChannelTest itemPayloadType=PRBS9; WhiteningCoeffValue = 0x(dis80able); PacketHeader=PACKET HEADER Table; HitTarget= _ 0x000000c6967e
0Avg power _bt mp SetParam 1,0x00;3,0x00;7,0x06 _ _
19Avg power _bt mp SetParam 1,0x13;3,0x00;7,0x06 _ _
34Avg power _bt mp SetParam 1,0x22;3,0x00;7,0x06 _ _
0Delta F1bt mp SetParam 1,0x00;3,0x01;7,0x06 _ _
0Delta F2bt mp SetParam 1,0x00;3,0x02;7,0x06 _ _

6.5 Verify Bluetooth BLE Rx Performance​

Measure the DUT BLE Rx sensitivity to check Rx performance is ok or not. The Bluetooth Rx criterion is shown as below:

ChannelPayload TypeBLE sensitivity limitCriterion
Bluetooth Spec
Low (CH0-2402MHZ)PRBS9PER<= 30.800 %< -70dBm
Middle (CH19-2440MHZ)
High (CH34-2470MHZ)

To calculate the Packet Error Rate(PER) PER%= 100*(1-(Packets Received /Packets Send)

The step by step list below : (1) Enter MP Mode and download patch code (2) Set Parameter :

Test Itemadb command
ItemPayload type
SensitivityPRBS9bt mp SetParam 1,0x00;3,0x0 _ _
SensitivityPRBS9bt mp SetParam 1,0x13;3,0x0 _ _
SensitivityPRBS9bt mp SetParam 1,0x22;3,0x0 _ _

(3)To setting Parameter with the Bluetooth test instrument. (4)Run LE Packet Rx (5)Stop LE Packet Rx and to obtain the receive packet count

(6) Calculate PER If ( PER< limit) , goto step (3) , else Stop