Skip to content

Commit 24706db

Browse files
rick1082koffes
authored andcommitted
applications: nrf5340_audio: Add BASS service data
Added BASS service data for fixing the IOP issue from phone. OCT-3207 Signed-off-by: Jui-Chou Chung <jui-chou.chung@nordicsemi.no>
1 parent a71e058 commit 24706db

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

applications/nrf5340_audio/src/bluetooth/bt_stream/broadcast/broadcast_sink.c

+14
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ static bool paused;
8383
static struct bt_csip_set_member_svc_inst *csip;
8484

8585
static uint8_t flags_adv_data;
86+
static uint8_t bass_service_uuid[BT_UUID_SIZE_16];
8687
static uint8_t gap_appear_adv_data[BT_UUID_SIZE_16];
8788
static uint8_t csip_rsi_adv_data[BT_CSIP_RSI_SIZE];
8889

@@ -144,6 +145,19 @@ int broadcast_sink_adv_populate(struct bt_data *adv_buf, uint8_t adv_buf_vacant)
144145
}
145146
}
146147

148+
/*
149+
* AD format required for broadcast sink with scan delegator.
150+
* Details can be found in Basic Audio Profile Section 3.9.2.
151+
*/
152+
sys_put_le16(BT_UUID_BASS_VAL, &bass_service_uuid[0]);
153+
154+
ret = bt_mgmt_adv_buffer_put(adv_buf, &adv_buf_cnt, adv_buf_vacant,
155+
sizeof(bass_service_uuid), BT_DATA_SVC_DATA16,
156+
(void *)bass_service_uuid);
157+
if (ret) {
158+
return ret;
159+
}
160+
147161
sys_put_le16(CONFIG_BT_DEVICE_APPEARANCE, &gap_appear_adv_data[0]);
148162

149163
ret = bt_mgmt_adv_buffer_put(adv_buf, &adv_buf_cnt, adv_buf_vacant,

0 commit comments

Comments
 (0)