3 Replies Latest reply on Nov 25, 2019 6:34 PM by XinghaoZ_26

    Custom A2DP source bluetooth application.




      I am working on a project involving A2DP source application. For this task i've bought CYW20719 eval board and DSP which provides audio package via I2S (mixed signals from 8 microphones). I have made some changes in watch example and managed to stream audio from DSP, but there is some delay (it is not my concern for now). However in the project i can't control the app via HCI. I started developing custom a2dp source bluetooth app with the use of bluetooth designer. Once the template has been generated i've copied some functions and after hours of struggling i have managed to compile and run the app, but after trying to connect to mono receiver i get "Key retrival failure". The code got really messy and i don't really know what's going on inside of it.


      Because of the HCI control it is really hard for me to figure out whats going in in the app, i am basicly blindfolded. Does anyone have any guide for a2dp source application? Or can provide any help which would allow me to write custom app?




        • 1. Re: Custom A2DP source bluetooth application.

          The HCI control uses WICED HCI Control Protocol. You can refer to the command format in the doc/WICED-HCI-Control-Protocol.pdf.

          You can use the Client Control to control the device first.

          1 of 2 people found this helpful
          • 2. Re: Custom A2DP source bluetooth application.

            Hi OwenZ,


            The problem is how to write audio source application with control algorithm inside the CYW20719 without using UART HCI.

            I have a similar project on the table and need some guidance on how to control/establish the connection and then start a stream from inside the Cypress device.


            Now I am able to do that controlling the app through UART HCI from PC. But the goal is to use just the CYW20719 for BT as well for whole control/business logic application (NO EXTERNAL uC or PC).


            Please, could you give any hint of how to do it? Any examples?




            • 3. Re: Custom A2DP source bluetooth application.

              Hi Krzysztof,

              I think the quick way to realize the function is to check the HCI commands from the PC. Then you can find the corresponding functions and call these functions in a timer callback or button interrupt callback.

              For example, you can find the inquiry command in the HCI_CONTROL_GROUP_DEVICE and the function hci_control_inquiry( *p_data );. You can call this function in a button callback and then initiate the connection.

              1 of 1 people found this helpful