Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob

Code flow and audio testing of demo.watch using CYW207xx devices

lock attach
Attachments are accessible only for community members.

Code flow and audio testing of demo.watch using CYW207xx devices

SheetalJ
Moderator
Moderator
Moderator
First comment on KBA 750 replies posted 500 likes received

Objective: This blog provides steps to test demo.watch app available in WICED SDK for CYW20706 and CYW20719 devices.

WICED version: WICED SDK 6.2.1 or 6.4

Supported WICED device: CYW920706WCDEVAL, CYW20706 based modules, CYW920719Q40EVB_01, CYW20719 based modules

(Here CYW20706 based CYBT-343026 module is used for testing.)

Implementation details:

The watch demo example available in WICED SDK allows the device to demonstrate as Bluetooth A2DP source, AVRCP controller/target and some Apple services. By default, device is configured to send a sine wave to the A2DP sink, for example Bluetooth speaker, Bluetooth earphones/headphones. There are two ways to test this app:

i. Using default sine wave in firmware - When HCI_CONTROL_AUDIO_ROUTE_SINWAVE macro is set, firmware won’t send data request to the transport. It will provide the sine wave internally itself.

ii. Transport case - In UART mode, device will send the audio request to ClientControl. ClientControl will provide the data ( sine wave by default) to the sink device. In SPI mode, ClientControl is connected using PUART with 115200 Baudrate. PCM data cannot be sent over this baudrate so we can't provide the data from ClientControl. Therefore, in this case, hci_uart_spi_bridge app is used to provide the stored sine wave data. Here hci_uart_spi_bridge app acts as SPI master and watch app acts as SPI slave. The connections for the same are given in app comments.

     By default, sine wave in the firmware is used to send to the sink device. The macro HCI_CONTROL_AUDIO_ROUTE_SINWAVE is defined in hci_control_audio.h file.

Code flow:

     Following flowchart shows the code flow of the watch application. Events in the flowchart are as follows:

1: if WICED_APP_LE_INCLUDED = TRUE

2: if WICED_APP_AUDIO_SRC_INCLUDED = TRUE

3: if WICED_APP_AUDIO_RC_CT_INCLUDED = TRUE

4: if WICED_APP_AUDIO_RC_TG_INCLUDED = TRUE

pastedImage_2.png

Testing steps:

1. Program the CYBT-343026 eval board with watch app using following Make Target: demo.watch-CYBT_343026_EVAL download UART=COM39

where COM39 is HCI COM port.

2. Open ClientContol.exe from /apps/host/client_control/Windows. Select HCI COM port from the list, Select Baudrate as 115200 and click on Open Port.

3. Press reset button on eval board, you should be able to see ClientControl tabs getting enabled.Check the attached snapshot for reference.

4. Click Start under BR/EDR Discovery section. Select your A2DP sink device from the list.

5. Select AV Source tab, click on Connect to connect to your sink device.

6. After successful connection, click on Start Streaming and you should be able to hear a sine-wave (continuous beep sound) in your Bluetooth speaker/ headphones.

Please refer attached snapshot.

     Similarly if you want to test the AVRCP functionality, then connect to your phone via Bluetooth and select AVRC TG/ AVRC CT options in ClientControl.

Attachments
1481 Views
Comments
HakanJ_21
Employee
Employee
25 sign-ins First comment on KBA First solution authored

I just tried this with WICED SDK 6.2.1 on CYW920706WCDEVAL and could not get it to work until I changed the Baudrate in test step 2 to 3000000.