Extended and Periodic Advertising#

Extended Advertising#

Extended advertising in Bluetooth Low Energy (BLE) 5.0 and later enables larger advertising payloads (up to 200 bytes) and multiple concurrent advertising sets, addressing limitations of legacy 31-byte advertising. Currently advertising data chaining is not supported.

Extended Advertising Overview#

Key Benefits:

  • Larger Payloads: Up to 200 bytes of advertising data (vs. 31 bytes for legacy)

  • Multiple Advertising Sets: Support for concurrent independent advertising configurations

  • Secondary Channels: Uses data channels (0-36) in addition to advertising channels (37-39)

  • PHY Options: Can use 1M, 2M, or Coded PHY on secondary channels

Architecture:

  • Primary Advertising: Initial packet on advertising channels (37, 38, 39) pointing to secondary channels

  • Secondary Advertising: Actual data transmitted on data channels (0-36)

  • Auxiliary Packets: Extended advertising packets on secondary channels

Setting Up Extended Advertising#

0. Enable extended advertising in opermode: Extended advertising must be enabled before use. Set the appropriate config macros (for example, RSI_BLE_ENABLE_ADV_EXTN = 1, RSI_BLE_AE_MAX_ADV_SETS = 2) in your build or config header so they are in effect when wireless init runs with a BLE coex mode. The number of supported advertising sets is configured this way. For bit definitions and BLE coex setup, see the Extended BLE custom feature bitmap in the API reference.

1. Configure Extended Advertising Parameters (Creates Advertising Set):

  • Use rsi_ble_set_ae_params() to configure extended advertising parameters

  • Provide a new adv_handle to implicitly create and configure an advertising set.

  • Parameters include: interval, advertising type, PHY selection, channel map

  • Each advertising set has an independent configuration.

2. Set Extended Advertising Data:

  • Use rsi_ble_set_ae_data() to set extended advertising data and optionally scan response and periodic advertising data through the type field

  • Maximum 200 bytes of advertising data per set. Advertising data chaining is not supported.

  • Obey rsi_ble_ae_data_s field and buffer limits in the API reference; total payload must not exceed 251 bytes.

3. Set Random Address (Optional):

  • Use rsi_ble_set_ae_set_random_address() to set random address for privacy

  • Each advertising set can have its own random address

4. Start Extended Advertising:

  • Use rsi_ble_start_ae_advertising() to start extended advertising on the set

  • Advertising continues until stopped or connection established (if connectable)

5. Stop Extended Advertising:

  • Use rsi_ble_start_ae_advertising() with the enable field set to disable, to stop extended advertising on the set

  • Pass the advertising handle of the set to be stopped

6. (Optional) Clear or Remove Advertising Set:

  • When you need to recycle an adv_handle, call rsi_ble_app_adv_set_clear_or_remove(type, adv_handle) with type = 1 to clear or type = 2 to remove the advertising set.

  • This step is typically done after you have stopped advertising (for example, to free controller resources before creating a new set).

Extended Advertising Parameters#

Advertising Interval:

  • Range: 20 ms to 10,485.759375 s (supported time range for extended advertising; set through rsi_ble_set_ae_params())

  • Longer intervals reduce power but increase discovery latency

  • Can be different from periodic advertising interval

PHY Selection:

  • Extended and periodic advertising support 1M, 2M, and Coded PHY (primary and secondary; set through rsi_ble_set_ae_params() and the ae_adv_params_s structure).

  • Primary PHY: 1M or Coded on advertising channels

  • Secondary PHY: 1M, 2M, or Coded on data channels

  • 2M PHY provides faster transmission and lower power for large payloads

Channel Map:

  • Select which data channels to use for secondary advertising

  • All channels (default) provides best reliability

  • Fewer channels reduce power consumption

Extended Scanning#

Setting Up Extended Scanning:

  • Register callbacks using rsi_ble_adv_ext_events_register_callbacks() before starting extended scanning

  • Use rsi_ble_ae_set_scan_params() to configure extended scanning parameters

  • Use rsi_ble_ae_set_scan_enable() to start extended scanning

  • Receive extended advertising reports through rsi_ble_ae_report_complete_t callback (contains rsi_ble_ae_adv_report_t structure)

Extended Scanning Benefits:

  • Can receive larger advertising payloads

  • More efficient for discovering devices with extended advertising

  • Supports filtering and selective reception

Periodic Advertising#

Periodic advertising (BLE 5.0+) enables synchronized data transmission at fixed intervals without maintaining a connection. It builds on extended advertising and is ideal for beacon applications and sensor data broadcasting.

Key Benefits:

  • Synchronized Transmission: Fixed interval enables receiver synchronization

  • No Connection Overhead: Data transmission without connection establishment

  • Large Payloads: Up to 200 bytes per periodic advertising event

  • Power Efficient: Receivers can sleep between periodic events

Architecture:

  • Based on extended advertising

  • Periodic advertising information included in extended advertising packets

  • Periodic advertising packets sent on secondary channels at fixed intervals

Periodic Advertising Benefits:

  • No connection overhead

  • Synchronized data reception

  • Large data payloads (up to 200 bytes)

  • Power efficient for periodic data transmission

Periodic advertising procedures: Broadcaster role — Periodic Advertising (Broadcaster), Observer role — Periodic Advertising Sync.


APIs Used in This Section#

Topic

APIs / symbols

Reference

Extended advertising — opermode

RSI_BLE_ENABLE_ADV_EXTN, RSI_BLE_AE_MAX_ADV_SETS

Extended BLE custom feature bitmap

Extended advertising — advertising set

rsi_ble_app_adv_set_clear_or_remove(), rsi_ble_set_ae_params(), rsi_ble_set_ae_data(), rsi_ble_ae_data_s, rsi_ble_set_ae_set_random_address(), rsi_ble_start_ae_advertising()

GAP

Extended advertising — scanning

rsi_ble_ae_set_scan_params(), rsi_ble_ae_set_scan_enable(), rsi_ble_adv_ext_events_register_callbacks(), rsi_ble_ae_report_complete_t, rsi_ble_ae_adv_report_t

GAP, Register Callbacks, Callbacks Declarations