cancel
Showing results for 
Search instead for 
Did you mean: 

WICED Smart Bluetooth

New Contributor II

To conduct regulatory testing on a device containing a WICED chip I've used two different methods in the past

1. Expose the HCI UART outside the device and use CyBlueTool

2. Make API calls to blecm_StartTransmitterTest(). I then have the device's normal external pushbuttons cycle through the tests.

For my latest project I'm using a 20719-B1 based CYBT-413034-02.

From my reading of Putting 2073x, 2070x, and 20719 Based Devices or Modules in HCI Mode – KBA225450  it appears the only way to put the device into HCI mode is to erase the bluetooth code and put in some non-bluetooth code. This defeats the purpose of testing, as the device also needs to be able to operate normally (with bluetooth code). Is there any way to put the 20719-B1 in HCI mode without erasing the bluetooth code?

This leads me to want to call regulatory tests from the API, and control them from within the device, but I can't find blecm_StartTransmitterTest() or equivalents in WICED 6.2. What are the regulatory API calls in WICED 6.2?

0 Likes
Reply
1 Solution
New Contributor II

For others who are wondering the same thing, I have code that initiates regulatory testing programmatically.

Combining the test strings in wiced_tools\wmbt\wmbt.cpp and the function calls from the apps\demo\watch example, the following code works within the CYBT-413034-02 module to trigger the desired tests.

void regulatoryTxTest(uint16_t tx_frequency, uint8_t length, uint8_t pattern)

{

    UINT8 tx_channel = (tx_frequency - 2402) / 2;

    UINT8 hci_le_transmitter_test[] = { 0x01, 0x1E, 0x20, 0x03, 0x00, 0x00, 0x00 };

    UINT8 hci_le_transmitter_test_cmd_complete_event[] = { 0x04, 0x0e, 0x04, 0x01, 0x1E, 0x20, 0x00 };

    UINT8 hci_reset[] = {0x01, 0x03, 0x0c, 0x00};

    hci_le_transmitter_test[4] = tx_channel;

    hci_le_transmitter_test[5] = length;

    hci_le_transmitter_test[6] = pattern;

    hci_control_test_handle_command(HCI_CONTROL_TEST_COMMAND_ENCAPSULATED_HCI_COMMAND,hci_reset,4);

    hci_control_test_handle_command(HCI_CONTROL_TEST_COMMAND_ENCAPSULATED_HCI_COMMAND,hci_le_transmitter_test,7);

}

View solution in original post

4 Replies
Moderator
Moderator

Hi,

There is no blecm_StartTransmitterTest() API available in WICED 6.2 for 20719.

Below are the options for RF test:

1. CyBluetool as mentioned here: RF Testing on Cypress BT Devices - KBA228303

2. mbt or Wbt tool available in WICED SDK : /20719-B1_Bluetooth/wiced_tools/mbt

3. Use directly HCI commands for RF test as listed in the attached doc

Please note , for running RF test its not mandatory to run BT application in the chip. When you use HCI interface and commands, it will enable the required BT activities for the RF test .

Its recommended to use non BT application to make reliable communication with HCI host and CY20XX devices

Thanks,

Anjana

Moderator
Moderator

Hi,

I am sorry, I am not able to attach the doc mentioned previously.

You can refer the same doc shared in the thread : Re: CYW43455 Blue tooth HCI command for Modulated RX

Thanks,

Anjana

New Contributor II

So from your answer "Its recommended to use non BT application to make reliable communication with HCI host and CY20XX devices" I can infer that there is no way to issue HCI test commands programmatically? and also that I need to remove my bluetooth application code before sending my device for regulatory testing?

0 Likes
Reply
New Contributor II

For others who are wondering the same thing, I have code that initiates regulatory testing programmatically.

Combining the test strings in wiced_tools\wmbt\wmbt.cpp and the function calls from the apps\demo\watch example, the following code works within the CYBT-413034-02 module to trigger the desired tests.

void regulatoryTxTest(uint16_t tx_frequency, uint8_t length, uint8_t pattern)

{

    UINT8 tx_channel = (tx_frequency - 2402) / 2;

    UINT8 hci_le_transmitter_test[] = { 0x01, 0x1E, 0x20, 0x03, 0x00, 0x00, 0x00 };

    UINT8 hci_le_transmitter_test_cmd_complete_event[] = { 0x04, 0x0e, 0x04, 0x01, 0x1E, 0x20, 0x00 };

    UINT8 hci_reset[] = {0x01, 0x03, 0x0c, 0x00};

    hci_le_transmitter_test[4] = tx_channel;

    hci_le_transmitter_test[5] = length;

    hci_le_transmitter_test[6] = pattern;

    hci_control_test_handle_command(HCI_CONTROL_TEST_COMMAND_ENCAPSULATED_HCI_COMMAND,hci_reset,4);

    hci_control_test_handle_command(HCI_CONTROL_TEST_COMMAND_ENCAPSULATED_HCI_COMMAND,hci_le_transmitter_test,7);

}

View solution in original post