Bluetooth Classic Packet Error Rate#
This application demonstrates how to configure the necessary parameters to start transmitting or receiving BT PER packets.
To use this application, the following hardware, software and project setup is required.
Windows PC with Host interface (UART / SPI / SDIO).
Silicon Labs RS9116 Wi-Fi Evaluation Kit
Host MCU Eval Kit. This example has been tested with:
Spectrum Analyzer and/or Power Analyzer
Embedded Development Environment
Application Build Environment#
The application is designed to run on any one of the following host platforms
By default, the application is configured to use the SPI bus for interfacing between host platforms EFR32MG21 or STM32F411 Nucleo and RS9116W EVK.
The application may also be configured to use the SDIO bus for interfacing between the host platform EFM32GG11 and RS9116W EVK.
The Application is provided with the project folder containing Simplicity Studio and Keil project files.
The Simplicity Studio project is used to evaluate the application on EFR32MG21.
EFR32 Host Platform
If the radioboard is BRD4180A or BRD4181A, then access the path
If the radioboard is BRD4180B or BRD4181B, then access the path
The radioboard version is shown in the following image
EFM32GG11 Host Platform
The Simplicity Studio project is used to evaluate the application on EFM32GG11.
The Keil project is used to evaluate the application on STM32.
Bare Metal/RTOS Support#
This application supports bare metal and RTOS environment. By default, the application project files (Keil and Simplicity Studio) are provided with bare metal configuration.
Application Configuration Parameters#
The application can be configured to suit your requirements and development environment. Read through the following sections and make any changes needed.
#define RSI_BT_LOCAL_NAME "PER Test"
#define RSI_CONFIG_PER_MODE RSI_BLE_PER_TRANSMIT_MODE #define BT_TRANSMIT_CMD_ID 0x15
#define RSI_CONFIG_PER_MODE RSI_BLE_PER_RECEIVE_MODE #define BT_RECEIVE_CMD_ID 0x16
Defines the transmit payload.
#define SEQUENCE_0 0 // All 00s #define SEQUENCE_1 1 // All FFs #define SEQUENCE_2 2 // All 55s #define SEQUENCE_F0 3 // All F0s #define SEQUENCE_PRBS 4 // PRBS 9 sequence #define PAYLOAD_TYPE SEQUENCE_F0
Transmit Packet Type
#define PACKET_TYPE 15 // Types defined by Bluetooth Core 5.0 spec
Transmit Packet Length
#define PACKET_LEN 339 // Tx packet length in bytes
#define BT_RX_CHNL_NUM 10 // Receive channel number [0 .. 78] #define BT_TX_CHNL_NUM 10 // Transmit channel number [0 .. 78]
#define SCRAMBLER_SEED 0 // Seed for whitening. Must be set to 0.
#define ACL_LINK 1
#define BURST_MODE 0 #define CONTINUOUS_MODE 1 #define TX_MODE BURST_MODE
#define NO_HOPPING 0 #define FIXED_HOPPING 1 #define RANDOM_HOPPING 2 #define HOPPING TYPE NO_HOPPING
#define ONBOARD_ANT_SEL 2 #define EXT_ANT_SEL 3 #define ANT_SEL EXT_ANT_SEL
#define BLE_EXTERNAL_RF 0 #define BLE_INTERNAL_RF 1 #define RF_TYPE BLE_INTERNAL_RF
#define NO_CHAIN_SEL 0 #define WLAN_HP_CHAIN_BIT 0 #define WLAN_LP_CHAIN_BIT 1 #define BT_HP_CHAIN_BIT 2 #define BT_LP_CHAIN_BIT 3 #define RF_CHAIN BT_HP_CHAIN_BIT
#define PLL_MODE_0 0 #define PLL_MODE_1 1 #define PLL_MODE PLL_MODE_0
#define LOOP_BACK_MODE_DISABLE 0 #define LOOP_BACK_MODE_ENABLE 1 #define LOOP_BACK_MODE LOOP_BACK_MODE_DISABLE
Memory Usage Requirements
#define BT_GLOBAL_BUFF_LEN 15000 // The number of bytes required by the application and driver
Modifications are not needed to run this example, the following is for informational purposes only.
Opermode command parameters
#define RSI_FEATURE_BIT_MAP FEAT_SECURITY_OPEN #define RSI_TCP_IP_BYPASS RSI_DISABLE #define RSI_TCP_IP_FEATURE_BIT_MAP TCP_IP_FEAT_DHCPV4_CLIENT #define RSI_CUSTOM_FEATURE_BIT_MAP FEAT_CUSTOM_FEAT_EXTENTION_VALID #define RSI_EXT_CUSTOM_FEATURE_BIT_MAP 0
Testing the Application#
Loading the RS9116W Firmware#
Refer Getting started with PC to load the firmware into RS9116W EVK. The firmware binary is located in
Building the Application on the Host Platform#
Refer to EFx32 Getting Started, to setup EFR32 & EFM32 host platforms.
Import the EFR32/EFM32 project from
Select the appropriate
.slsprojto suit your EFRx32 radioboard OR select the
*.brd2204a-gg11.slsprojproject for the EFM32GG11 board.
Compile and flash the project to the EFx32
Debug the project and pause execution
If the RS9116W reset pin is NOT connected to the EFx32, press the RS9116W EVK Reset button
Free run the project
Proceed to Verifying Operation
Refer STM32 Getting Started
Open the project
<SDK>/examples/featured/bt_per/projects/bt_per-nucleo-f411re.uvprojxin Keil IDE.
Build and Debug the project, pause execution
If the RS9116W reset pin is NOT connected to the STM32, press the RS9116W EVK reset button
Run the project on the STM32
Proceed to Verifying Operation
A terminal output shows the following text during receive testing. Receive PER statistics are regularly printed to the terminal.
A terminal output shows the following text during transmit testing.
When transmitting, a spectrum analyser may be used to see transmitted packets (and the transmit spectrum) as shown in the following image.
Compressed Debug Logging#
To enable the compressed debug logging feature please refer to Logging User Guide