CYW920721Q40EVB-01 test commands

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

cross mob
lock attach
Attachments are accessible only for community members.
KoSh_4652521
Level 2
Level 2
First like received First like given

Hello,

I'm trying to send test commands to CYW920721Q40EVB-01.

My test command - Tx_Test:

0x3f 0x0051 0x00 0x01 0x02 0x03 0x04 0x05 0x01 0x00 0x03 0x01 0x00 0x02 0x00 0x00 0x00 0x00

If i use evaluation board and send this commands using wiced_bt_dev_vendor_specific_command()  function embedded in the Bluetooth application - response is correct:

0E 04 01 51 FC 00

Also i have a handset with mounted Bluetooth chip and trying to send the same test command by UART, but i receive wrong responses:

The request breaks in the middle and I immediately begin to receive the wrong response (see request_response attachment):

0x19 0x03 0x00 0x04 0x00 0x00 0x10 0x01 0x00 0x19 0x03 0x00 0x04 0x00 0x01 0x03 0x03 0x00

After 1ms i receive one more response:

0x19 0x03 0x00 0x07 0x00 0x00 0x0e 0x04 0x01 0x03 0x0c 0x00

After 35ms i receive the sequence of responses.

The UART connection is correct, i can upgrade Bluetooth chip using the same enviroment (with HCI command for upgrade).

I'm using Logical analyser connected to the Bluetooth chip to see logs.

Logs are attached as screenshots from Logical analyser.

Could you please explain, why do i receive this incorrect responses? why don't i receive 0E 04 01 51 FC 00 ? !

0 Likes
1 Solution

Hi,

The problem was solved by adding HCI_Reset as first command.

Was changed the format of request (test command): 01 51 FC 10 05 04 03 02 01 00 00 00 04 01 0F 00 00 00 00 00

01 - was added as first byte

Was changed a verification of the response: 04 0E 04 01 51 FC 00

04 - was added as first byte

Now i use this sequence:

1. Send HCI_Reset 01 03 0C 00

2. Wait for correct response: 04 0E 04 01 03 0C 00

3. Send any test command

I hope it'll helpful for someone)

View solution in original post

0 Likes
4 Replies
AnjanaM_61
Moderator
Moderator
Moderator
10 questions asked 5 comments on KBA First comment on KBA

Hi KoSh_4652521 ,

Could you please clarify the issue?

You mean when you try to send the test command directly to chip via HCI UART , you are getting wrong responses?

If then, could you please let me know what is the host / host tool you are using ? Are you running Rx_test command on the other side with the correct address provided in Tx_test ?

Could you please clarify?

Note:

useful thread for Tx_test , Rx_test :Re: How to achive packet counter when test BT RX characteristics,how to reset this counter

Regards,
Anjana

0 Likes

Hi,

I'll try to describe in more detail my issue:

I have a handset (phone) with mounted Bluetooth chip - CYW920721

The connection between the handset and Bluetooth chip is correct, so i can upgrade Bluetooth chip, for example, sending HCI commands from the handset to the Bluetooth chip. Also i have a possibility to control software Bluetooth chip pins to set recovery mode or restart chip. I can enable/disable Bluetooth, pair new devices.

Now i have a task to send test commands from the handset to the Bluetooth chip, for example: TX_test, Enable device under test mode, Write SCO PCM Int Param and other commands.

Also i have an evaluation board with the same Bluetooth chip.

I prepared the special firmware for this EVB, which performed wiced_bt_dev_vendor_specific_command() with some test command (TX_Test) and downloaded this firmware to the EVB

In logical analyser i can see correct response for this command - 0E 04 01 51 FC 00

First case: After that i tried to repeat the same sequence with the handset and mounted Bluetooth chip. I prepared the firmware, upgraded Bluetooth chip using the handset. Now there is the firmware with wiced_bt_dev_vendor_specific_command() function on the Bluetooth chip. So it should send Test command after enabling Bluetooth.

But i don't see any response for this command in logical analyser. The Bluetooth chip sends nothing for this test commands. In callback function for wiced_bt_dev_vendor_specific_command i can see status - Error code 0x01 - Unknown command.

Second case: i try to send test command directly from the handset  via HCI UART

The request breaks in the middle and I immediately begin to receive the wrong response (see request_response attachment from previous letter):

0x19 0x03 0x00 0x04 0x00 0x00 0x10 0x01 0x00 0x19 0x03 0x00 0x04 0x00 0x01 0x03 0x03 0x00

After 1ms i receive one more response:

0x19 0x03 0x00 0x07 0x00 0x00 0x0e 0x04 0x01 0x03 0x0c 0x00

After 35ms i receive the sequence of responses.

And i don't understand why the same commands are working on EVB and don't work on the mounted Bluetooth chip.

0 Likes

Hi,

The problem was solved by adding HCI_Reset as first command.

Was changed the format of request (test command): 01 51 FC 10 05 04 03 02 01 00 00 00 04 01 0F 00 00 00 00 00

01 - was added as first byte

Was changed a verification of the response: 04 0E 04 01 51 FC 00

04 - was added as first byte

Now i use this sequence:

1. Send HCI_Reset 01 03 0C 00

2. Wait for correct response: 04 0E 04 01 03 0C 00

3. Send any test command

I hope it'll helpful for someone)

0 Likes

Hi KoSh_4652521 ,

Yes you should sent RESET command first before starting the RF test commands.

Regards,

Anjana