Skip to content

Commit

Permalink
[nrf fromlist] Samples: Bluetooth: Fix PAwR sample failed to set sube…
Browse files Browse the repository at this point in the history
…vent data

Be respectful of PAwR subevents while scheduling scan activities.
The radio will be swtiched from scan to PAwR when it is closed to
the next subevent interval.

Upstream PR: zephyrproject-rtos/zephyr#70678

Signed-off-by: Ryan Chu <ryan.chu@nordicsemi.no>
  • Loading branch information
ryanjh committed Mar 25, 2024
1 parent a55a68f commit c89f8d4
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion samples/bluetooth/periodic_adv_rsp/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,14 @@ int main(void)
}

while (num_synced < MAX_SYNCS) {
err = bt_le_scan_start(BT_LE_SCAN_PASSIVE, device_found);
struct bt_le_scan_param scan_param = {
.type = BT_LE_SCAN_TYPE_PASSIVE,
.options = BT_LE_SCAN_OPT_FILTER_DUPLICATE,
.interval = per_adv_params.interval_min * 2,
.window = per_adv_params.interval_min * 2,
};

err = bt_le_scan_start(&scan_param, device_found);
if (err) {
printk("Scanning failed to start (err %d)\n", err);
return 0;
Expand Down

0 comments on commit c89f8d4

Please sign in to comment.