2024-06-06 02:23 AM - edited 2024-06-06 02:25 AM
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.
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
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?
Solved! Go to Solution.
2024-06-06 07:05 PM
OK, i know now. We need implement BLE_ReadLocalSupportedCodecs to replace the api of ST
2024-06-06 07:05 PM
OK, i know now. We need implement BLE_ReadLocalSupportedCodecs to replace the api of ST