Problem encoding and advertising the BT_UUID_NUS_VAL

Hi. I am working on a project trying to encode the BT_UUID_NUS_VAL into advertising packets without success. 

In am using the unicast_server.c file as a reference. There there is the following : 

static uint8_t unicast_server_adv_data[] = {
	BT_UUID_16_ENCODE(BT_UUID_ASCS_VAL),
	BT_AUDIO_UNICAST_ANNOUNCEMENT_TARGETED,
	BT_BYTES_LIST_LE16(AVAILABLE_SINK_CONTEXT),
	BT_BYTES_LIST_LE16(AVAILABLE_SOURCE_CONTEXT),
	0x00, /* Metadata length */
};

This advertises fine as expected. However, instead of advertising BT_UUID_ASCS_VAL which has a simple value of 0x1853, I would like to advertise BT_UUID_NUS_VAL. The problem is that this has a large value of 6e400001-b5a3-f393-e0a9-e50e24dcca9e. 

I tried the following without success :  

static uint8_t unicast_server_adv_data[] = {
	BT_DATA_BYTES(BT_DATA_UUID128_ALL, BT_UUID_NUS_VAL),
	BT_AUDIO_UNICAST_ANNOUNCEMENT_TARGETED,
	BT_BYTES_LIST_LE16(AVAILABLE_SINK_CONTEXT),
	BT_BYTES_LIST_LE16(AVAILABLE_SOURCE_CONTEXT),
	0x00, /* Metadata length */
};

How could I go about possibly solving this? Thank you in advance.

Parents
  • Hi again Sam

    I don't see how an application crashing when the receiver disconnects (already in a connection) would be because of the advertising data. What error exactly is causing this disconnect, do you have an error log to show?

    Can you confirm you're trying to develop for the Audio application or not, since this bt_mgmt_adv_start() function is specifically made for ACL connections in the LE audio application. If not bt_mgmt_adv_start() won't be the correct call to use here. I will need to ask the devs about if it's possible to use bt_mgmt_adv_start() with 128 bit UUIDs as I haven't been able to find a way on my own unfortunately.

    Best regards,

    Simon

Reply
  • Hi again Sam

    I don't see how an application crashing when the receiver disconnects (already in a connection) would be because of the advertising data. What error exactly is causing this disconnect, do you have an error log to show?

    Can you confirm you're trying to develop for the Audio application or not, since this bt_mgmt_adv_start() function is specifically made for ACL connections in the LE audio application. If not bt_mgmt_adv_start() won't be the correct call to use here. I will need to ask the devs about if it's possible to use bt_mgmt_adv_start() with 128 bit UUIDs as I haven't been able to find a way on my own unfortunately.

    Best regards,

    Simon

Children
Related