cancel
Showing results for 
Search instead for 
Did you mean: 

Did ST implement hci_read_local_supported_codecs_v2 api already?

Xiaojie
Associate III

HI, 

    I am using STM32WBA55G-DK1 board to develop ble audio device. When i call CAP_EnableAudioCodecController, it return 0x91.

   I have reviewed the assembly code of the project and found that CAP_EnableAudioCodecController will call hci_read_local_supported_codecs_v2 to get the codecs array. So i call hci_read_local_supported_codecs_v2 on my app code to test this api.

 

Spoiler

uint8_t num_supported_stand_codes = 0;

uint8_t standard_Codec[255] = {0};

uint8_t num_supported_vendor_specific_codes = 0;

uint8_t vendor_specific_codes[255] = {0};

status = hci_read_local_supported_codecs_v2( &num_supported_stand_codes,

standard_Codec,

&num_supported_vendor_specific_codes,

hci_read_local_supported_codecs_v2);

LOG_INFO_APP("hci_read_local_supported_codecs_v2() return status: 0x%02X\n", status);

for (loop = 0; loop < num_supported_stand_codes; loop++) {

LOG_INFO_APP(" %02x", standard_Codec[loop]);

if (loop % 16 == 15) {

LOG_INFO_APP("\n");

}

}

The value of num_supported_stand_codes is zero, it can cause CAP_EnableAudioCodecController return 0x91.

 

Looking at the assembly code of the project, I noticed a shocking phenomenon: hci_read_local_supported_codecs_v2 is almost empty。 The following assembly code was extracted by me

Xiaojie_0-1717665366641.pngXiaojie_1-1717665384003.png

Xiaojie_2-1717665483791.png

 

Fist,  hci_read_local_supported_codecs_v2 store a zero in Standard_Codec and Vendor_Specific_Codec, then call BLE_ReadLocalSupportedCodecs. But BLE_ReadLocalSupportedCodecs has not been made yet, except for assigning values of 0 to Num_Supported_Standard_Codecs and Num_Supported_Vendor_Specific_Codecs.

 

Did ST not implement this function? Or is there an error in my project configuration?

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Xiaojie
Associate III

OK, i know now. We need implement BLE_ReadLocalSupportedCodecs to replace the api of ST

View solution in original post

1 REPLY 1
Xiaojie
Associate III

OK, i know now. We need implement BLE_ReadLocalSupportedCodecs to replace the api of ST