diff --git a/src/content/reference/device-os/firmware.md b/src/content/reference/device-os/firmware.md index ff8df9c1f2..7c5e8cff3f 100644 --- a/src/content/reference/device-os/firmware.md +++ b/src/content/reference/device-os/firmware.md @@ -8394,7 +8394,7 @@ See [`BleScanParams`](/reference/device-os/firmware/#blescanparams) for more inf #### BLE.setScanParameters() -Sets the parameters used for scanning. Typically you will only ever need to change the scan timeout, but if you need finer control you can use this function. +Sets the parameters used for scanning. Typically you will only ever need to change the scan timeout, but if you need finer control you can use this function. Also used to set up scanning for devices advertising in BLE 5 Coded Phy mode. ```cpp // PROTOTYPE @@ -9662,6 +9662,7 @@ uint16_t timeout; hal_ble_adv_evt_type_t type; uint8_t filter_policy; uint8_t inc_tx_power; +uint8_t primary_phy; uint8_t reserved; // EXAMPLE @@ -9677,6 +9678,7 @@ int res = BLE.getAdvertisingParameters(¶m); - `timeout` Advertising timeout in 10 ms units. Default is 0. - `type` See [`BleAdvertisingEventType`](/reference/device-os/firmware/#bleadvertisingeventtype). Default is `CONNECTABLE_SCANNABLE_UNDIRECTED` (0). - `filter_policy` Default is 0. +- `primary_phy` Default is BLE_PHY_1MBPS (standard). Set to BLE_PHY_CODED for BLE 5 Coded Phy (long range). - `inc_tx_power` Default is 0. ### BleScanParams @@ -9691,6 +9693,7 @@ uint16_t interval; uint16_t window; uint16_t timeout; uint8_t active; uint8_t filter_policy; +uint8_t scan_phys; // EXAMPLE BleScanParams scanParams; @@ -9706,6 +9709,7 @@ int res = BLE.getScanParameters(&scanParams); - `timeout` Scan timeout in 10 ms units. Default value is 500. - `active` Boolean value, typically 1. - `filter_policy` Default is 0. +- `scan_phys` Default is BLE_PHYS_1MBPS. Use BLE_PHYS_CODED to scan for Coded Phy, or (BLE_PHYS_1MBPS | BLE_PHYS_CODED) to scan for both. ### iBeacon