cancel
Showing results for 
Search instead for 
Did you mean: 

WICED Studio Bluetooth

KoSh_4652521
New Contributor II

Hello,

I'm trying to send vendor-specific commands to CYW920719Q40EVB-01.

It's an example, which i'm trying to send (Tx_Test):

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

  1. 0x3f Vendor specific
  2. 0x0051 Command (Tx_Test)
  3. 0x00 0x01 0x02 0x03 0x04 0x05 Local BD address
  4. 0x01 Hopping mode(single freq)
  5. 0x00 2402 MHz
  6. 0x03 Modulation_type (0xAA pat)
  7. 0x01 Logical_channel (ACL basic)
  8. 0x00 Packet_Type (NULL)
  9. 0x02 0x00 Packet_Length
  10. 0x00 Tx_Power_Level (0dBm)
  11. 0x00 Transmit_Power_dBm
  12. 0x00 Transmit_Power_Table_idx

I've used CyBluetool for testing and it worked correct.

Now i want to create my own firmware and send vendor-specific command using wiced_bt_dev_vendor_specific_command() function from SDK.

It's a function prototype from SDK:

/**

* Function         wiced_bt_dev_vendor_specific_command

*

*                  Send a vendor specific HCI command to the controller.

*

* @param[in]       opcode                : Opcode of vendor specific command

* @param[in]       param_len         : Length of parameter buffer

* @param[in]       p_param_buf      : Parameters

* @param[in]       p_cback               : Callback for command complete

*

* @return

*

*                  WICED_BT_SUCCESS    : Command sent. Does not expect command complete event. (command complete callback param is NULL)

*                  WICED_BT_PENDING    : Command sent. Waiting for command complete event.

*                  WICED_BT_BUSY       : Command not sent. Waiting for command complete event for prior command.

*

*/

wiced_result_t wiced_bt_dev_vendor_specific_command (uint16_t opcode, uint8_t param_len, uint8_t *p_param_buf,

                                wiced_bt_dev_vendor_specific_command_complete_cback_t *p_cback);

Could you please clarify me which bytes of my command i  should use as param_len and p_param_buf ?

Or do you have any ideas how can i send vendor-specific commands another way?

0 Likes
Reply
1 Solution
AnjanaM_61
Moderator
Moderator

Hi KoSh_4652521 ,

According to the command and parameters you are using ,

param_len  should be 0x10 (16 in decimal) and p_param_buf should contain -  0x00 0x01 0x02 0x03 0x04 0x05 0x01 0x00 0x03 0x01 0x00 0x02 0x00 0x00 0x00 0x00

Attached RF test doc for reference.

Also , You can refer to the watch example included in WICED. In particular, you should take a look at the hci_control_test_handle_command() and wiced_bt_send_test_command() function in hci_control_test.c.

Thanks,

Anjana

View solution in original post

2 Replies
AnjanaM_61
Moderator
Moderator

Hi KoSh_4652521 ,

According to the command and parameters you are using ,

param_len  should be 0x10 (16 in decimal) and p_param_buf should contain -  0x00 0x01 0x02 0x03 0x04 0x05 0x01 0x00 0x03 0x01 0x00 0x02 0x00 0x00 0x00 0x00

Attached RF test doc for reference.

Also , You can refer to the watch example included in WICED. In particular, you should take a look at the hci_control_test_handle_command() and wiced_bt_send_test_command() function in hci_control_test.c.

Thanks,

Anjana

View solution in original post

KoSh_4652521
New Contributor II

Hello,

Thank you for your answer!

It was very helpful for me!

0 Likes
Reply