Skip to content

Commit

Permalink
applications: nrf5340_audio: Add BASS service data
Browse files Browse the repository at this point in the history
Added BASS service data for fixing the IOP issue from phone.
OCT-3207
Signed-off-by: Jui-Chou Chung <jui-chou.chung@nordicsemi.no>
  • Loading branch information
rick1082 authored and koffes committed Dec 5, 2024
1 parent a71e058 commit 24706db
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ static bool paused;
static struct bt_csip_set_member_svc_inst *csip;

static uint8_t flags_adv_data;
static uint8_t bass_service_uuid[BT_UUID_SIZE_16];
static uint8_t gap_appear_adv_data[BT_UUID_SIZE_16];
static uint8_t csip_rsi_adv_data[BT_CSIP_RSI_SIZE];

Expand Down Expand Up @@ -144,6 +145,19 @@ int broadcast_sink_adv_populate(struct bt_data *adv_buf, uint8_t adv_buf_vacant)
}
}

/*
* AD format required for broadcast sink with scan delegator.
* Details can be found in Basic Audio Profile Section 3.9.2.
*/
sys_put_le16(BT_UUID_BASS_VAL, &bass_service_uuid[0]);

ret = bt_mgmt_adv_buffer_put(adv_buf, &adv_buf_cnt, adv_buf_vacant,
sizeof(bass_service_uuid), BT_DATA_SVC_DATA16,
(void *)bass_service_uuid);
if (ret) {
return ret;
}

sys_put_le16(CONFIG_BT_DEVICE_APPEARANCE, &gap_appear_adv_data[0]);

ret = bt_mgmt_adv_buffer_put(adv_buf, &adv_buf_cnt, adv_buf_vacant,
Expand Down

0 comments on commit 24706db

Please sign in to comment.