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?
useful thread for Tx_test , Rx_test :Re: How to achive packet counter when test BT RX characteristics,how to reset this counter
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.
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)