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.

CC2564: FCC/ETSI test Example Code

Part Number: CC2564

I am working with a customer who is going through FCC certification using the Bluetopia stack.  We have reviewed the following E2E threads:

...but we still have additional questions.  First off, the wiki site references a code example to be found "here", but there is no code example at that location:

One big difference is that our testing house needs to run everything as a standalone unit, so we aren’t able to use the PC based Hardware Eval Tool, which is what most of the e2e threads mention.

It does seem like it’s able to be done entirely in software, and it seems like VS_Enable_FCC_Test_Mode seems like it should be helpful, but I can’t find any documentation on that, or how it relates to HCI_VS_DRPb_Tester_Packet_TX_RX,which has no documentation either.

Any suggestions?

Thanks,

Stuart

  • Stuart,

    I am looking into the process for FCC testing entirely in software, but attached is documentation for HCI_VS_DRPb_Tester_Packet_TX_RX and  another e2e post regarding FCC testing.

    I will update with more information as soon as I come across it.

  • Hello,

    Thanks for the help.

    Stuart submitted this on my behalf, so perhaps I can add some additional info.

    The post referenced in the link you posted at 

    References using various HCI commands (that are either different or missing from my stack) to get the chip into test mode.

    How does this method differ from using VS_Enable_FCC_Test_Mode()?

    Are they doing the same thing in a different way? Is one a newer method? Do they do different things entirely?

    I haven't found any info on VS_Enable_FCC_Test_Mode() other than the function prototype in BTVSAPI.h, but it seems significantly more straightforward.

    Also the TI FCC certification page at: 

    seems to be using VS_Enable_FCC_Test_Mode() as well, but as Stuart mentioned above, the included link to example code is missing.

    Thanks,

    Mike

  • Mike,

    VS_Enable_FCC_Test_Mode() implements a continuous TX command, while HCI_VS_DRPb_Tester_Packet_TX_RX is packet TX. To implement HCI_VS_DRPb_Tester_Packet_TX_RX, you would need to create a new API in the BTVS.c file, which I am currently working on and should have instructions for you shortly.
  • Mike,

    To implement HCI_VS_DRPb_Tester_Packet_TX_RX, add the following opcode to BTVS.c

    #define VS_DRPB_TESTER_PACKET_TX_RX_OPCODE                       ((Word_t)(0xFD85))

    and the following code into the body of BTVS.c

    int BTPSAPI VS_DRPb_Tester_Packet_TX_RX(unsigned int BluetoothStackID, VS_Packet_Tester_Config_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->FreqMode);
           Index += 1;
           ASSIGN_HOST_BYTE_TO_LITTLE_ENDIAN_UNALIGNED_BYTE(&CommandBuffer[Index], Params->TXFreq);
           Index += 1;
           ASSIGN_HOST_BYTE_TO_LITTLE_ENDIAN_UNALIGNED_BYTE(&CommandBuffer[Index], Params->RXFreq);
           Index += 1;
           ASSIGN_HOST_BYTE_TO_LITTLE_ENDIAN_UNALIGNED_BYTE(&CommandBuffer[Index], Params->ACLPktType);
           Index += 1;
           ASSIGN_HOST_BYTE_TO_LITTLE_ENDIAN_UNALIGNED_BYTE(&CommandBuffer[Index], Params->ACLDataPattern);
           Index += 1;
           ASSIGN_HOST_BYTE_TO_LITTLE_ENDIAN_UNALIGNED_BYTE(&CommandBuffer[Index], Params->Reserved);
           Index += 1;
           ASSIGN_HOST_WORD_TO_LITTLE_ENDIAN_UNALIGNED_WORD(&CommandBuffer[Index], Params->ACLDataLen);
           Index += 2;
           ASSIGN_HOST_BYTE_TO_LITTLE_ENDIAN_UNALIGNED_BYTE(&CommandBuffer[Index], Params->PowerLvl);
           Index += 1;
           ASSIGN_HOST_BYTE_TO_LITTLE_ENDIAN_UNALIGNED_BYTE(&CommandBuffer[Index], Params->DisableWhiten);
           Index += 1;
           ASSIGN_HOST_WORD_TO_LITTLE_ENDIAN_UNALIGNED_WORD(&CommandBuffer[Index], Params->PRBS9Init);
           Index += 2;
    
           Length        = sizeof(CommandBuffer);
           CommandLength = Index;
           OGF           = VS_COMMAND_OGF(VS_DRPB_TESTER_PACKET_TX_RX_OPCODE);
           OCF           = VS_COMMAND_OCF(VS_DRPB_TESTER_PACKET_TX_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);
    }

    and in BTVSAPI.h define the following struct

    typedef struct _tagVS_Packet_Tester_Config_Params_t
    {
        Byte_t FreqMode;
        Byte_t TXFreq;
        Byte_t RXFreq;
        Byte_t ACLPktType;
        Byte_t ACLDataPattern;
        Byte_t Reserved;
        Word_t ACLDataLen;
        Byte_t PowerLvl;
        Byte_t DisableWhiten;
        Word_t PRBS9Init;
    } VS_Packet_Tester_Config_Params_t;

    and add the function prototype in BTVSAPI.h

          BTPSAPI_DECLARATION int BTPSAPI VS_DRPb_Tester_Packet_TX_RX(unsigned int BluetoothStackID, VS_Packet_Tester_Config_Params_t *Params);
    
          #ifdef INCLUDE_BLUETOOTH_API_PROTOTYPES
             typedef int (BTPSAPI *PFN_VS_EnableWBS_t)(unsigned int BluetoothStackID, VS_Packet_Tester_Config_Params_t *Params);
          #endif

    Now, the API is available for your use as needed. Refer to its usage in this wiki here, and let me know if you need more assistance implementing it in your code.

  • This seems to be working.

    There is no special patch needed when adding in the new opcode?

    Thank you for your help.

    Mike

  • Mike,

    I don't believe so. In the sample code, we include the "ability" to use the opcode but not the source code for implementing it for memory purposes, but once you add in the code I've specified it should work.

  • I am posting to the forum on behalf of the same customer that started this thread.  They are at the FCC Lab.

     

    We’re having issues getting Bluetooth to run in the continuous wave (unmodulated) mode.


    We’re using the CC2564 with the Bluetopia stack.

     

    The issue is with using VS_Enable_FCC_Test_Mode().

     

    In there, when it sends the first raw HCI command (VS_DRPB_TESTER_CON_TX_COMMAND_OPCODE) we can see it start transmitting correctly for a brief period (<1sec) but then immediately stops.

     

    One of the guys here who has worked with this module before seems to remember something about needing to disable some kind of scan setting to be able to use the FCC Test Mode Function?

     

    Please respond as quickly as possible.

     

    Thank you!

  • Make sure the device is non-connectable, non-discoverable, and non-pairable. Additionally, make sure there is no additional RF activity (i.e. active connection). All of these things could cause the FCC test to stop.
  • Calling:

    HCI_Write_Scan_Enable(BluetoothStackID, HCI_SCAN_ENABLE_NO_SCANS_ENABLED, &StatusResult);

    before doing VS_Enable_FCC_Test_Mode() did the trick.