Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

samples: Bluetooth: PBP: Source: Fix advertising data #80925

Merged
merged 1 commit into from
Nov 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions samples/bluetooth/pbp_public_broadcast_source/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ static int setup_extended_adv_data(struct bt_cap_broadcast_source *source,
NET_BUF_SIMPLE_DEFINE(ad_buf,
BT_UUID_SIZE_16 + BT_AUDIO_BROADCAST_ID_SIZE);
NET_BUF_SIMPLE_DEFINE(base_buf, 128);
NET_BUF_SIMPLE_DEFINE(pbp_ad_buf, BT_UUID_SIZE_16 + 1 + ARRAY_SIZE(pba_metadata));
NET_BUF_SIMPLE_DEFINE(pbp_ad_buf, BT_PBP_MIN_PBA_SIZE + ARRAY_SIZE(pba_metadata));
static enum bt_pbp_announcement_feature pba_params;
struct bt_data ext_ad[4];
struct bt_data per_ad;
Expand Down Expand Up @@ -211,7 +211,7 @@ static int setup_extended_adv_data(struct bt_cap_broadcast_source *source,
net_buf_simple_add_le16(&ad_buf, BT_UUID_BROADCAST_AUDIO_VAL);
net_buf_simple_add_le24(&ad_buf, broadcast_id);
ext_ad[2].type = BT_DATA_SVC_DATA16;
ext_ad[2].data_len = ad_buf.len + sizeof(ext_ad[2].type);
ext_ad[2].data_len = ad_buf.len;
ext_ad[2].data = ad_buf.data;

/**
Expand All @@ -227,8 +227,8 @@ static int setup_extended_adv_data(struct bt_cap_broadcast_source *source,
pba_params |= BT_PBP_ANNOUNCEMENT_FEATURE_HIGH_QUALITY;
printk("Starting stream with high quality!\n");
}
err = bt_pbp_get_announcement(&pba_metadata[1], ARRAY_SIZE(pba_metadata) - 1,
pba_params, &pbp_ad_buf);
err = bt_pbp_get_announcement(pba_metadata, ARRAY_SIZE(pba_metadata), pba_params,
&pbp_ad_buf);
if (err != 0) {
printk("Failed to create public broadcast announcement!: %d\n", err);

Expand Down
Loading