This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

HFPAGDemo Audio Streaming Problem on STM32F4Discovery

Other Parts Discussed in Thread: CC2564

Hi,

The audio connection between a BT headset and cc2564 was established according to HFPAGDemo wiki.

But audio streaming from PC via stm32f4 processor as USB audio device wasn't heard on the headset.
When I did VS_EnableWBS(this command enables 16kHz/16bits, assisted WBS?) before Manageaudio command, a sound like a buzzer was heard.

Audio settings are as follows,
I2S3 audio frequency: 16 kHz
I2S3 data format : 16 bits
USB audio frequency : 48 kHz

What's the problem?
Other command is necessary?
Timing of VS_EnableWBS is wrong?

Best Regards,

Ryuya

  • Hi Ryuya,

    Have you called BSC_EnableFeature(BluetoothStackID, BSC_FEATURE_WIDE_BAND_SPEECH); prior to calling "EnableWBS" ?
    I'm not sure I understood "But audio streaming from PC via stm32f4 processor as USB audio device ". Can you please explain? Are you sure the audio goes to the device? Can you please share an air sniffer + logger log so I can understand better?

    Regards,
    Gigi Joseph.
  • Hi Joseph,

    Thank you for your reply.

    No. I will try that.

    I'm sorry for my poor English.
    My stm32f4 processor functions as a USB audio device and runs HFPAGDemo stack.
    The goal of the audio streaming is as follows,
    PC(playbacks an audio) -> (USB) -> stm32f4 -> (I2S) -> CC2564 -> (BT Radio) -> BT headset
    Finally I will want to implement microphone side too.
    I will also check I2S audio lines.

    I'm sorry that I can't share an air sniffer log because of inconvenience.

    Regards,

    Ryuya

  • Hi Joseph,

    I tried BSC_EnableFeature() before EnableWBS, but no effect.
    BSC_EnableFeature() was called during OpenStack();

    When I checked I2S audio lines, no audio signal was seen on CC2564's I2S input port.
    So I modified the I2S port setting and the audio signal went to CC2564.

    I checked VS_EnableWBS() code and I found CC2564's voice setting was wrong.
    It was set to a Master device.
    This seemed to cause a buzzer sound.

    I modified "SetCodec16KHzValues" and now CC2564 functions as a Slave, but no audio is heard.

    In addition, what should I check?

    Regards,

    Ryuya

  • Hi Ryuya,

    Please see the below link,
    processors.wiki.ti.com/.../CC256x_Advanced_Voice_and_Audio_Features

    and confirm if you are sending all the commands mentioned there.

    Regards,
    Gigi Joseph.
  • Hi Joseph,

    Thank you for your reply.

    I didn't call BLE/ANT_Desable() and HCI_Setup_Synchronous_Connection().
    I tried to sent them, but no audio was heard.

    I got a logger log using Logger 5.0 Build 14.

    Download link: srv04.bitsend.jp/.../fc49483ba81bf5225b073007415e553e.html

    In HCI/LMP viewer Setup, TIInit_6.7.16.xml was selected as a mapping file.
    The caputured log contain only LMP log for some reason.
    Can you check that?
    Why HCI log wasn't caputured?

    Regards,

    Ryuya

  • Hi Joseph,

    The mapping file was wrong.
    HCI logs were caputured using correct file.
    I attached HCI/LMP log again.
    Please check.

    Regards,

    Ryuya

    HFPAGDemo.zip

  • Hi Ryuya,

    I see that the remote device is rejecting the eSCO_Link_Req.
    Does the remote support HFP 1.6?

    Regards,
    Gigi Joseph.
  • Hi Joseph,

    I am using a CSR8610A04 Development board as the remote device.
    It supports HFP 1.6.
    Its HFP features are modifiable by config tool.
    I think the reason why the remote device rejects the eSCO_Link_Req is that the remote's HFP setting is not coincided with CC2564's.
    What do you think about it?

    Regards,

    Ryuya

  • Hi Joseph,

    I have additional 3 questions.

    Q1. The issue timing of the commands which says in processors.wiki.ti.com/.../CC256x_Advanced_Voice_and_Audio_Features isn't written.
    Where should I send them to CC2564? before pairing or after pairing?


    Q2. In the HCI log I attached, ANT_Disable() was done successfully.
    But BLE_Disable() command was disallowed.

    The log is as follows.
    ----------------------------------------------------------------------------------------------------------------------------------------------------------
    16027 1 11:15:35.868 +525:05:05.655 <No Port> 0x000083BB 0x000083BB sc Command Name:sc
    Layer = 0x01

    Event Opcode = 0xfd5b

    Length = 0x02

    Payload = "00:00"

    16028 4 11:15:35.872 +525:05:05.659 <No Port> 0x000083BB 0x000083BB HCI_Command_Complete_Event Event Name: HCI_Command_Complete_Event
    Number HCI commands = 0x01

    Command Opcode = 0xfd5b

    Status = 0x0c (Command Disallowed)

    16247 1 11:15:36.732 +525:05:06.519 <No Port> 0x0000864C 0x0000864C HCI_VS_ANT_Enable Command Name:HCI_VS_ANT_Enable
    Enable/Disable ANT = 0x00

    Code Upload = 0x00

    Reserved = 0x0

    16248 4 11:15:36.736 +525:05:06.523 <No Port> 0x0000864D 0x0000864D HCI_Command_Complete_VS_ANT_Enable_Event Event Name: HCI_Command_Complete_VS_ANT_Enable_Event
    Number HCI commands = 0x01

    Command Opcode = 0xfdd0

    Status = 0x00 (Success)
    ----------------------------------------------------------------------------------------------------------------------------------------------------------

    I did BLE_Disable() just before HFRE_Setup_Audio_Connection(BluetoothStackID, CurrentClientPortID);
    Why was this command disallowed?
    By the way, I tried to issue BLE_Disable() at the end of OpenStack(), but the result was the same.


    Q3. I send AVPR_Enable() in Assisted WBS setup sequence with command parameters as follows.
    Enable/disable AVPR:1(Enable)
    A3DP Role:0(A3DP functional as source)
    Upload code:0(Do not load A3DP code)

    Is these parameters correct?


    Regards,

    Ryuya
  • Hi Joseph,

    The remote device accepted the eSCO_Link_Req from CC2564B by coinciding eSCO parameter set each other.
    Then the eSCO Link with transparent data mode was established and the collapsed audio was heard.
    The remote device ran narrowband mode.
    I attach the HCI log here.

    HFPAGDemo eSCO_Link_established.zip

    What's the problem?

    Regards,

    Ryuya