Bluetooth: BAP: Shell: Stop scan on broadcast found
When the broadcast assistant have found the expected broadcast source it should stop scanning. Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This commit is contained in:
parent
acc59cfc9a
commit
addc8a538a
1 changed files with 5 additions and 0 deletions
|
@ -529,6 +529,11 @@ static bool broadcast_source_found(struct bt_data *data, void *user_data)
|
|||
shell_print(ctx_shell, "Found BAP broadcast source with address %s and ID 0x%06X\n",
|
||||
addr_str, broadcast_id);
|
||||
|
||||
err = bt_le_scan_stop();
|
||||
if (err) {
|
||||
shell_error(ctx_shell, "Failed to stop scan: %d", err);
|
||||
}
|
||||
|
||||
bt_addr_le_copy(¶m.addr, info->addr);
|
||||
param.adv_sid = info->sid;
|
||||
param.pa_interval = info->interval;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue