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

    I've been discussing this issue with a colleague that is more into the LE audio stack than me, and we would like to see if you can recreate this issue using the SoftDevice controller (SDC)as well, just to confirm this doesn't have something to do with the packetcraft controller specifically, so here are some steps you can try:

    1. Checkout the latest NCS main, since the SDC with ISO is merged after NCS 2.5.0, and also some modification are needed for applications to run with the SDC. This PR brings ISO onto the SDC, and this one updates buildprog.py for switching between SDC and PCFT.
    2. For using buildprog.py, add the command --ctlr="SDC" in the end. E.g., $ python buildprog.py -c both -b debug -d both -p --pristine--ctlr="SDC"
    3. For using west, we need to add -DCONFIG_BT_LL_ACS_NRF53=n
      E.g., $ west build -b nrf5340_audio_dk_nrf5340_cpuapp -d build_headset -p -- -DCONFIG_AUDIO_DEV=1 -DCONFIG_BT_LL_ACS_NRF53=n; west flash --build-dir=build_headset

    If that doesn't change anything either, we will need to take a closer look at your project. If you could upload a version of your project where we can reproduce this on our end that would be very helpful.

    I know that the LE audio application has been able to advertise custom UUIDs in the past, so we will get to the bottom of this, one way or the other.

    Best regards,

    Simon

Reply
  • Hi

    I've been discussing this issue with a colleague that is more into the LE audio stack than me, and we would like to see if you can recreate this issue using the SoftDevice controller (SDC)as well, just to confirm this doesn't have something to do with the packetcraft controller specifically, so here are some steps you can try:

    1. Checkout the latest NCS main, since the SDC with ISO is merged after NCS 2.5.0, and also some modification are needed for applications to run with the SDC. This PR brings ISO onto the SDC, and this one updates buildprog.py for switching between SDC and PCFT.
    2. For using buildprog.py, add the command --ctlr="SDC" in the end. E.g., $ python buildprog.py -c both -b debug -d both -p --pristine--ctlr="SDC"
    3. For using west, we need to add -DCONFIG_BT_LL_ACS_NRF53=n
      E.g., $ west build -b nrf5340_audio_dk_nrf5340_cpuapp -d build_headset -p -- -DCONFIG_AUDIO_DEV=1 -DCONFIG_BT_LL_ACS_NRF53=n; west flash --build-dir=build_headset

    If that doesn't change anything either, we will need to take a closer look at your project. If you could upload a version of your project where we can reproduce this on our end that would be very helpful.

    I know that the LE audio application has been able to advertise custom UUIDs in the past, so we will get to the bottom of this, one way or the other.

    Best regards,

    Simon

Children
No Data
Related