Skip to content

Commit 5182bf1

Browse files
alexsvenkoffes
authored andcommitted
samples: nrf_auraconfig: Set device name
- Set device name explicitly instead of using OPT_USE_NAME - OCT-3384 Signed-off-by: Alexander Svensen <[email protected]>
1 parent aa2ad20 commit 5182bf1

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

samples/bluetooth/nrf_auraconfig/src/nrf_auraconfig.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -526,6 +526,19 @@ static int ext_adv_populate(uint8_t big_index, struct broadcast_source_ext_adv_d
526526
ext_adv_buf[ext_adv_buf_cnt].data = ext_adv_data->uuid_buf->data;
527527
ext_adv_buf_cnt++;
528528

529+
ext_adv_buf[ext_adv_buf_cnt].type = BT_DATA_NAME_COMPLETE;
530+
if (strnlen(broadcast_param[big_index].adv_name,
531+
ARRAY_SIZE(broadcast_param[big_index].adv_name)) > 0) {
532+
/* Use custom advertising name */
533+
ext_adv_buf[ext_adv_buf_cnt].data = broadcast_param[big_index].adv_name;
534+
ext_adv_buf[ext_adv_buf_cnt].data_len = strlen(broadcast_param[big_index].adv_name);
535+
} else {
536+
/* Use default device name */
537+
ext_adv_buf[ext_adv_buf_cnt].data = CONFIG_BT_DEVICE_NAME;
538+
ext_adv_buf[ext_adv_buf_cnt].data_len = strlen(CONFIG_BT_DEVICE_NAME);
539+
}
540+
ext_adv_buf_cnt++;
541+
529542
ret = bt_mgmt_manufacturer_uuid_populate(ext_adv_data->uuid_buf,
530543
CONFIG_BT_DEVICE_MANUFACTURER_ID);
531544
if (ret) {

0 commit comments

Comments
 (0)