Skip to content

Commit d1d98c7

Browse files
samples: bluetooth: pbp_public_broadcast: Fix PACS register issue
- Add sink PACS register for PBP public broadcast sink example to make it work with PBP broadcast source Signed-off-by: Vinit Mehta <[email protected]>
1 parent 366d45f commit d1d98c7

File tree

1 file changed

+10
-0
lines changed
  • samples/bluetooth/pbp_public_broadcast_sink/src

1 file changed

+10
-0
lines changed

samples/bluetooth/pbp_public_broadcast_sink/src/main.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,10 @@ int main(void)
419419
{
420420
int err;
421421

422+
const struct bt_pacs_register_param pacs_param = {
423+
.snk_pac = true,
424+
.snk_loc = true,
425+
};
422426
err = bt_enable(NULL);
423427
if (err != 0) {
424428
printk("Bluetooth init failed (err %d)\n", err);
@@ -427,6 +431,12 @@ int main(void)
427431
}
428432
printk("Bluetooth initialized\n");
429433

434+
err = bt_pacs_register(&pacs_param);
435+
if (err) {
436+
printk("Could not register PACS (err %d)\n", err);
437+
return err;
438+
}
439+
430440
printk("Initializing BAP Broadcast Sink\n");
431441
err = bap_broadcast_sink_init();
432442
if (err != 0) {

0 commit comments

Comments
 (0)