This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Compiler/CC2564: How to test the radio frequency of Bluetooth?

Part Number: CC2564

Tool/software: TI C/C++ Compiler

 I use the TI SPPdemo of CC2564B,We need CE authentication for Bluetooth terminals。

Bluetooth is now required for the following modes:

 1、Bluetooth Fixed Frequency Transmitting 2402 Mhz。

 2、Bluetooth Fixed Frequency Transmitting 2440 Mhz

  3、Bluetooth Fixed Frequency Transmitting 2480 Mhz

  4、Bluetooth Full Frequency Transmission

  5、Bluetooth Single Carrier Fixed Frequency Transmitting 2402 Mhz

  6、Bluetooth Single Carrier Fixed Frequency Transmitting 2440Mhz

 7、Bluetooth Single Carrier Fixed Frequency Transmitting 2480 Mhz

 8、Bluetooth reception frequency is 2402 Mhz

9、Bluetooth reception frequency is 2440 Mhz

10、Bluetooth reception frequency is 2480 Mhz

What program should I use to achieve several Bluetooth output modes?

  • Hi,

    For these test modes, you need to connect the CC256x controller's HCI interface to a PC (running HCITester tool) instead of the MCU.

    More details : http://processors.wiki.ti.com/index.php/CC256x_Testing_Guide#BT_RF_FCC_Modes

    Best regards,

    Vihang

  • Hi,

    My Bluetooth chip CC2564B has made a device with MCU. The communication interface between them is serial port. HCI serial signal line is not drawn out on the circuit board.

    How does the MCU implement the above different modes by sending different commands, but I don't know which program to call now, and the whole step of testing the mode at the same time?

  • user4618137 said:
    My Bluetooth chip CC2564B has made a device with MCU. The communication interface between them is serial port. HCI serial signal line is not drawn out on the circuit board.

    I understand. The TI Bluetooth stack has the following API that is implementation of the continuous TX test. (for 1, 2, 4, 5, 6 and 7 above)

    BTPSAPI_DECLARATION int BTPSAPI VS_Enable_FCC_Test_Mode(unsigned int BluetoothStackID, VS_Modulation_Type_t Modulation_Type, Byte_t Test_Pattern, Byte_t Frequency_Channel, Byte_t Power_Level, DWord_t Generator_Init_Value, DWord_t EDR_Generator_Mask);

    Similarly, you will need to implement APIs in the BTVS.c for the continuous RX test (for 8, 9 ,10 above) and packet TX test (for 4 above).

  • Hi,:

           Thanks for your help!

           Under the SPPDDemo protocol procedure, how can I enter the FCC test mode? I have tried different methods, that is, different constant frequency continuous output。

            

    HCI_Write_Scan_Enable(BluetoothStackID, HCI_SCAN_ENABLE_NO_SCANS_ENABLED, &StatusResult);
    VS_Enable_FCC_Test_Mode(BluetoothStackID,0x00,VS_TEST_PATTERN_PN9,1,15,0,0);

  • Hi,

    user4618137 said:
    HCI_Write_Scan_Enable(BluetoothStackID, HCI_SCAN_ENABLE_NO_SCANS_ENABLED, &StatusResult);
    VS_Enable_FCC_Test_Mode(BluetoothStackID,0x00,VS_TEST_PATTERN_PN9,1,15,0,0);

    These two API calls are correct to enter the FCC test mode (continuous TX test). What are the return values from these two API calls?

  • Hi,:

            I have settled the above problem.

          Now,I have three questions.

          1、Which parameter needs to be set for fixed frequency and single carrier transmission?

          2、How to Set Full Frequency Transmitting?

          3、How does Bluetooth receive test mode enter? Is it possible to use a program?

    For example, the program in the following connection: 

    VS_DRPb_Tester_Packet_TX_RX(BluetoothStackID,??)?

  • user4618137 said:

          1、Which parameter needs to be set for fixed frequency and single carrier transmission?

          2、How to Set Full Frequency Transmitting?

    The parameters are explained in the following HCI VS command documentation.

    http://processors.wiki.ti.com/index.php/CC256x_VS_HCI_Commands#HCI_VS_DRPb_Tester_Packet_TX_RX_.280xFD85.29

    user4618137 said:
    3、How does Bluetooth receive test mode enter? Is it possible to use a program?

    There is a separate HCI VS command for continuous RX test mode.

    http://processors.wiki.ti.com/index.php/CC256x_VS_HCI_Commands#HCI_VS_DRPb_Tester_Con_RX_.280xFD17.29

    From the 2 examples above, you should be able to implement this third command for your tests.

  •  Hi,:

               our testing needs to run everything as a standalone unit, so we aren’t able to use the PC based Hardware Eval Tool,

              

               So your above reply cannot be realized, I use the TI SPPdemo of CC2564B in the STM32F405  board,In the SPPDEMO program, what program should I use to get CC2564 into continuous RX mode?

  • Hi Vihang Parmar:

        The VS_Enable_FCC_Test_Mode API is an implementation of the HCI_VS_DRPb_Tester_Con_TX (0xFD84) command. How to write HCI_VS_DRPb_Tester_Con_RX program? Do I need to add it to my SPPDEMO program so that CC2564B can enter the receive test mode?

  • user4618137 said:
    Do I need to add it to my SPPDEMO program so that CC2564B can enter the receive test mode?

    Yes, you can add a new API to the BTVS.c that implements the HCI_VS_DRPb_Tester_Con_TX command. You can use the HCI_VS_DRPb_Tester_Con_TX command and its implementation (VS_Enable_FCC_Test_Mode API) as an example.

  • Hi,

            I see what you're saying,but  How to write a continuous RX test program based on the command of HCI_VS_DRPb_Tester_Con_RX ? Could you please provide a routine for continuous RX?

    As follows:

           

  • Hi Vihang Parmar:

             Would you please help me check if my program is correct?

             in BTVS.c

    #define VS_DRPB_TESTER_PACKET_RX_OPCODE    ((Word_t)(0xFD17))

    int BTPSAPI VS_DRPb_Tester_Packet_RX(unsigned int BluetoothStackID, VS_Packet_Tester_Config_RX_Params_t *Params){
        int          ret_val;
        Byte_t       CommandBuffer[sizeof(*Params)];
        Byte_t       CommandLength;
        Word_t       OCF;
        Byte_t       OGF;
        Byte_t       Length;
        Byte_t       Status;
        unsigned int Index;
        /* Verify that the parameters that were passed in appear valid.      */
        if(Params != NULL)
        {
           BTPS_MemInitialize(CommandBuffer, 0, sizeof(CommandBuffer));
           Index = 0;
           ASSIGN_HOST_BYTE_TO_LITTLE_ENDIAN_UNALIGNED_BYTE(&CommandBuffer[Index], Params->RX_Freq);
           Index += 1;
           ASSIGN_HOST_BYTE_TO_LITTLE_ENDIAN_UNALIGNED_BYTE(&CommandBuffer[Index], Params->AD_PLLloop);
           Index += 1;
           Length        = sizeof(CommandBuffer);
           CommandLength = Index;
           OGF           = VS_COMMAND_OGF(VS_DRPB_TESTER_PACKET_RX_OPCODE);
           OCF           = VS_COMMAND_OCF(VS_DRPB_TESTER_PACKET_RX_OPCODE);
           ret_val       = HCI_Send_Raw_Command(BluetoothStackID, OGF, OCF, CommandLength, CommandBuffer, &Status, &Length, CommandBuffer, TRUE);
           /* Map the Send Raw return results.                               */
           ret_val = MapSendRawResults(ret_val, Status, Length, CommandBuffer);
        }
        else
           ret_val = BTPS_ERROR_INVALID_PARAMETER;
        /* Return the result the caller.                                     */
        return(ret_val);
    }
    in  BTVSAPI.h 
       
    typedef struct _tagVS_Packet_Tester_Config_RX_Params_t
    {
        Byte_t RX_Freq;
        Byte_t AD_PLLloop;
    } VS_Packet_Tester_Config_RX_Params_t;
    BTPSAPI_DECLARATION int BTPSAPI VS_DRPb_Tester_Packet_RX(unsigned int BluetoothStackID, VS_Packet_Tester_Config_RX_Params_t *Params);
    #ifdef INCLUDE_BLUETOOTH_API_PROTOTYPES
       typedef int (BTPSAPI *PFN_VS_EnableWBS_t)(unsigned int BluetoothStackID, VS_Packet_Tester_Config_RX_Params_t *Params);
    #endif
          
  • Hi,

    Yes, the API you added is correct. 

    One minor recommendation to avoid confusion.

    user4618137 said:
    #define VS_DRPB_TESTER_PACKET_RX_OPCODE    ((Word_t)(0xFD17))

    user4618137 said:
           OGF           = VS_COMMAND_OGF(VS_DRPB_TESTER_PACKET_RX_OPCODE);
           OCF           = VS_COMMAND_OCF(VS_DRPB_TESTER_PACKET_RX_OPCODE);

    The opcode 0xFD17 is correct. However, I would recommend changing the name of the macro to something like "VS_DRPB_TESTER_CON_RX_OPCODE" since this test modes enabled continuous RX. The PACKET_RX is a bit misleading. 

    Besides this, please make sure to call the HCI_Write_Scan_Enable API before the continuous RX test mode to disable both page and inquiry scans. If either of these periodic scan activities are active, they may interfere with your continuous RX test.

    e.g. 

    #define VS_DRPB_TESTER_CON_RX_OPCODE    ((Word_t)(0xFD17))
    
    int BTPSAPI VS_DRPb_Tester_Con_RX(unsigned int BluetoothStackID, VS_Packet_Tester_Config_RX_Params_t *Params){
        int          ret_val;
        Byte_t       CommandBuffer[sizeof(*Params)];
        Byte_t       CommandLength;
        Word_t       OCF;
        Byte_t       OGF;
        Byte_t       Length;
        Byte_t       Status;
        unsigned int Index;
        /* Verify that the parameters that were passed in appear valid.         */
        if(Params != NULL)
        {
           /* Send HCI Write Scan Enable Command to turn off page and inquiry   */
           /* scans.                                                            */
           if((!HCI_Write_Scan_Enable(BluetoothStackID, HCI_SCAN_ENABLE_NO_SCANS_ENABLED, &StatusResult)) && (StatusResult == HCI_ERROR_CODE_NO_ERROR))
           {
              BTPS_MemInitialize(CommandBuffer, 0, sizeof(CommandBuffer));
              Index = 0;
              ASSIGN_HOST_BYTE_TO_LITTLE_ENDIAN_UNALIGNED_BYTE(&CommandBuffer[Index], Params->RX_Freq);
              Index += 1;
              ASSIGN_HOST_BYTE_TO_LITTLE_ENDIAN_UNALIGNED_BYTE(&CommandBuffer[Index], Params->AD_PLLloop);
              Index += 1;
              Length        = sizeof(CommandBuffer);
              CommandLength = Index;
              OGF           = VS_COMMAND_OGF(VS_DRPB_TESTER_CON_RX_OPCODE);
              OCF           = VS_COMMAND_OCF(VS_DRPB_TESTER_CON_RX_OPCODE);
              ret_val       = HCI_Send_Raw_Command(BluetoothStackID, OGF, OCF, CommandLength, CommandBuffer, &Status, &Length, CommandBuffer, TRUE);
              /* Map the Send Raw return results.                               */
              ret_val = MapSendRawResults(ret_val, Status, Length, CommandBuffer);
           }
           else
           {
              ret_val = BTPS_ERROR_INVALID_PARAMETER;
           }
        }
        else
           ret_val = BTPS_ERROR_INVALID_PARAMETER;
        
    /* Return the result the caller.                                            */
        return(ret_val);
    }

    Best regards,

    Vihang