STM32WBA Bluetooth® LE – Long Range

Revision as of 13:15, 8 December 2023 by Registered User (→‎On-board buttons configuration)


1. STM32WBA Long Range

Long range or LE coded feature is a way to extend BLE range up to 1,6 km or more.

Advertising extension feature is the way to activate advertising Primary (and secondary) PHY with new parameters values in HCI and ACI commands.
Based on BLE_p2pClient_Ext and BLE_p2pServer_Ext applications, two new applications have been developed to demonstrate the feature and to provide range measurements: BLE_App_Long_Range_Central and BLE_App_Long_Range_Peripheral.

Applications functionalities are derived from BLE_p2pClient and BLE_p2pServer applications:
Refer to the following page for Peer to Peer project explanation.

1.1. Principles

Modified or new GAP commands have been implemented to enable this feature.

To set advertising parameters:

aci_gap_adv_set_configuration: Adv_Mode parameter: 0x02: use LE coded as primary advertising PHY.

Scan procedure:

aci_gap_ext_start_scan: scanning_PHY parameter: 0x04: use of LE coded as scan PHY.

Connection:

aci_gap_ext_create_connection: 0x04: use of LE coded as scan connectable PHY.

1.2. Advertising data

At startup, Peer To Peer Server application starts Advertising.
Data advertised are composed as follows:

P2P Server Long Range Advertising packet
Description Length AD Type Value
Device Name 8 0x09 p2pS_LR_XX (XX: last byte of BD address)
Manufacturer Data 15 0xFF See table below
Flags 2 0x01 0x06
(GeneralDiscoverable, BrEdrNotSupported)



Manufacturer data are encoded following STMicroelectronics BlueST SDK v2 as described below:

STMicroelectronics Manufacturer Advertising data
Byte Index 0 1 2-3 4 5 6 7 8 9 10-15
Function Length Manufacturer ID Company BlueST SDK Version Device ID Firmware ID Option 1 Option 2 Option 3 Device Address
Value 0x0F 0xFF 0x0030 STMicro 0x02 0x8B Nucleo-WBA 0x8F - p2p Server Long Range 0x00 0x00 0x00 0x08E12Axxxx


Info white.png Information
Advertising is stopped after 30s. You can press B1 to restart it.

1.3. STM32WBA Long Range Central application

It acts as a Central device with the support of GATT Client Layer.
At startup, by pressing B1 button, Long Range Client application:

  • Starts scanning to detect Long Range Server application by filtering the Firmware ID of the STMicroelectronics Manufacturer advertising data
  • Stops Scanning once Long Range server detected
  • Connects to the Long Range Server to establish the connection.
  • Discovers GATT Service & Characteristics of the Long Range server
  • Enable all GATT server notification characteristics

Once connected, the Long Range Client application:

  • By pressing B1 button, write a message to toggle the Blue LED of the Long Range Server
  • Receive notification to toggle the on board Blue LED from remote Long Range Server Application.
Example of flow diagram between STM32WBA Long Range Server & Long Range Client
STM32WBA P2P Flow Diagram


1.4. On-board buttons configuration

Button configuration for Bluetooth® Low Energy Long Range application on Nucleo-WBA52CG boards
Application Condition B1 Click B1 Long Press B2 Click B2 Long Press B3 Click B3 Long Press
Long Range Server Idle

Connected

-

Starts/Stops notification

/ -

Change LE coded PHY Options

/ -

-

/
Long Range Client Idle

Connected

Starts scan then connects

Starts/Stops write data

/ -

Change LE coded PHY Options

/ -

-

/

2. Requirements

2.1. Software and system requirements

The following list contains the required software as well as the required minimum IDE version:

  • IAR Embedded Workbench for ARM (EWARM) toolchain V9.20.1, plus a patch available in WBA Firmware Package: STM32Cube_FW_WBA_Vx.x.x/Utilities/PC_Software/EWARMv8_STM32WBAx_V1.2.zip

The following programmer software is required to flash the board with an already generated binary:

  • STM32CubeProgrammer[1]

2.2. Hardware requirements

NUCLEO-WBA52CG [2] is necessary to install the application.

Hardware platform illustration
Nucleo-WBA5


2.3. Collector applications compatibility

The BLE_App_Long_Range_Peripheral project is compatible with the following collector:

3. References

No categories assignedEdit