Bluetooth Classic Packet Error Rate#

Introduction#

This application demonstrates how to configure the necessary parameters to start transmitting or receiving BT PER packets.

Setting Up#

To use this application, the following hardware, software and project setup is required.

Hardware Requirements#

figureSetup Diagram for BT PER Example

Software Requirements#

Application Build Environment#

Platform#

The application is designed to run on any one of the following host platforms

Host Interface#

  • 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.

Project Configuration#

The Application is provided with the project folder containing Simplicity Studio and Keil project files.

Simplicity Studio

  • 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 <SDK>/examples/featured/bt_per/projects/bt_per-brd4180a-mg21.slsproj

    • If the radioboard is BRD4180B or BRD4181B, then access the path <SDK>/examples/featured/bt_per/projects/bt_per-brd4180b-mg21.slsproj

    • The radioboard version is shown in the following image

EFR Radioboards

  • EFM32GG11 Host Platform

    • The Simplicity Studio project is used to evaluate the application on EFM32GG11.

      • Project path:<SDK>/examples/featured/bt_per/projects/bt_per-brd2204a-gg11.slsproj

Keil Project

  • The Keil project is used to evaluate the application on STM32.

  • Project path: <SDK>/examples/featured/bt_per/projects/bt_per-nucleo-f411re.uvprojx

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.

Modifications to rsi_bt_per.c#

Device Name

  #define RSI_BT_LOCAL_NAME "PER Test"

Transmit mode

  #define RSI_CONFIG_PER_MODE  RSI_BLE_PER_TRANSMIT_MODE
  #define BT_TRANSMIT_CMD_ID   0x15

Receive mode

  #define RSI_CONFIG_PER_MODE  RSI_BLE_PER_RECEIVE_MODE
  #define BT_RECEIVE_CMD_ID    0x16

Payload Type

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

Channel numbers

  #define BT_RX_CHNL_NUM  10   // Receive channel number [0 .. 78]
  #define BT_TX_CHNL_NUM  10   // Transmit channel number [0 .. 78]

Scrambler Seed

  #define SCRAMBLER_SEED  0   //  Seed for whitening. Must be set to 0. 

Link Type

  #define ACL_LINK  1

Transmit Mode

   #define BURST_MODE       0
   #define CONTINUOUS_MODE  1
   #define TX_MODE          BURST_MODE

Hopping Type

  #define NO_HOPPING      0
  #define FIXED_HOPPING   1
  #define RANDOM_HOPPING  2
  #define HOPPING TYPE    NO_HOPPING

Antenna select

  #define ONBOARD_ANT_SEL  2
  #define EXT_ANT_SEL      3
  #define ANT_SEL          EXT_ANT_SEL

RF Type

   #define BLE_EXTERNAL_RF  0
   #define BLE_INTERNAL_RF  1
   #define RF_TYPE          BLE_INTERNAL_RF

RF Chain

  #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

PLL Mode

  #define PLL_MODE_0  0
  #define PLL_MODE_1  1
  #define PLL_MODE    PLL_MODE_0

Loopback Mode

  #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 to rsi_ble_config.h#

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 <SDK>/firmware/

Building the Application on the Host Platform#

EFX32 Platform

Refer to EFx32 Getting Started, to setup EFR32 & EFM32 host platforms.

  • Import the EFR32/EFM32 project from <SDK>/examples/eatured/bt_per/projects

    • Select the appropriate .slsproj to suit your EFRx32 radioboard OR select the *.brd2204a-gg11.slsproj project 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

STM32 Platform

Refer STM32 Getting Started

  • Open the project <SDK>/examples/featured/bt_per/projects/bt_per-nucleo-f411re.uvprojx in 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

Veryifying Operation#

A terminal output shows the following text during receive testing. Receive PER statistics are regularly printed to the terminal. Prints in Coolterm window

A terminal output shows the following text during transmit testing. Prints in Coolterm window

When transmitting, a spectrum analyser may be used to see transmitted packets (and the transmit spectrum) as shown in the following image.
Figure: Spectrum Analyzer BR Mode