4 Replies Latest reply on Oct 29, 2019 6:41 AM by BoCo_1857246

    API for Regulatory testing on the 20719-B1

    BoCo_1857246

      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 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?

        • 1. Re: API for Regulatory testing on the 20719-B1
          AnjanaM_61

          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

          1 of 1 people found this helpful
          • 2. Re: API for Regulatory testing on the 20719-B1
            AnjanaM_61

            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

            1 of 1 people found this helpful
            • 3. Re: API for Regulatory testing on the 20719-B1
              BoCo_1857246

              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?

              • 4. Re: API for Regulatory testing on the 20719-B1
                BoCo_1857246

                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);

                }

                1 of 1 people found this helpful