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 parametersProvide a new
adv_handleto 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 thetypefieldMaximum 200 bytes of advertising data per set. Advertising data chaining is not supported.
Obey
rsi_ble_ae_data_sfield 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 privacyEach advertising set can have its own random address
4. Start Extended Advertising:
Use
rsi_ble_start_ae_advertising()to start extended advertising on the setAdvertising continues until stopped or connection established (if connectable)
5. Stop Extended Advertising:
Use
rsi_ble_start_ae_advertising()with theenablefield set to disable, to stop extended advertising on the setPass the advertising handle of the set to be stopped
6. (Optional) Clear or Remove Advertising Set:
When you need to recycle an
adv_handle, callrsi_ble_app_adv_set_clear_or_remove(type, adv_handle)withtype = 1to clear ortype = 2to 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 theae_adv_params_sstructure).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 scanningUse
rsi_ble_ae_set_scan_params()to configure extended scanning parametersUse
rsi_ble_ae_set_scan_enable()to start extended scanningReceive extended advertising reports through
rsi_ble_ae_report_complete_tcallback (containsrsi_ble_ae_adv_report_tstructure)
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 |
| |
Extended advertising — advertising set |
| |
Extended advertising — scanning |
|