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.

How to change the pairing way of HOGPDemo?

Other Parts Discussed in Thread: CC2564

I'm using TIVA M4+CC2564, and the pairing way of HOGPDemo is Simple Pairing, whose command is PassKeyResponse.

I want to change it to PIN Code Pairing like HFPDemo using command PINCodeResponse.

Could it be changed like this?

If can, could someone tell me how to do this?

Thank you!

  • Hi,

    Please see: e2e.ti.com/.../1157247
    It deals with a case similar to yours.

    You can disable Secure Simple Pairing by sending a VS command. Please see: processors.wiki.ti.com/.../CC256x_VS_HCI_Commands

    The "Byte" and "Bit" parameter values can be obtained from the BT Specification (www.bluetooth.org). Please see: Table -3.2 of Link manager protocol specification

    Regards,
    Gigi Joseph.
  • Hi,

    I tried to add the VS command "Send_HCI_VS_Set_Supported_Features 0xFF26, 0x06, 0x03, 0x00" to the SetPairable function but I got this:


    Send_HCI_VS_Set_Supported_Features" is undefined.

    Shouid I add any patch or files to the project? Acctually, I have no idea about how to use VS commands.

    Could you please tell me more about this?

    Thank you!

  • Hi,

    You need to use: "HCI_Send_Raw_Command()" API (ogf=0x3f, ocf=0x326).

    Regards,
    Gigi Joseph.
  • Hi,

    I added in this function:

    static int Close_SSP_Mode(void)
    {

        int    ret_val;
        Byte_t CommandBuffer[10];
        Byte_t Length;
        Byte_t Status;
        Byte_t ReturnBuffer[1];

        Length  = sizeof(ReturnBuffer);

        if(ApplicationStateInfo.BluetoothStackID)
        {

           ret_val = HCI_Send_Raw_Command(ApplicationStateInfo.BluetoothStackID, 0x3f, 0x0326, sizeof(CommandBuffer), (Byte_t *)(CommandBuffer), &Status, &Length, ReturnBuffer, TRUE);
           if(!ret_val)
           {
              Display(("CLOSESSP SUCCESS!"));
        }
        }

        return(ret_val);

    }

    I received the "CLOSESSP SUCCESS!" but the pairing mode does not changed.

    Do you know where goes wrong?

    Thanks!

  • Hi,

    How are you filling the "CommandBuffer"?
    For more information about the API, plesae see: "BluetopiaCoreAPI.pdf".

    Regards,
    Gigi Joseph.
  • Hi,

    I looked up the BluetopiaCoreAPI.pdf and found the "HCI_Send_Raw_Command(); "function,

    but there are just explainations to the function and its parameters, I did not find the command to close the Secure Simple Pairing mode.

    so, can you tell me where the command is?

    What's more, I found the "HCI_Write_Simple_Pairing_Mode"  and "HCI_Read_Simple_Pairing_Mode" functions, which can be use to solve this problem.

    and I add in this function:

    static int Close_SSP_Mode_2(void)
    {

    int result;

    Byte_t StatusResult;

    Byte_t Simple_Pairing_ModeResult;

    result = HCI_Write_Simple_Pairing_Mode(ApplicationStateInfo.BluetoothStackID, HCI_SIMPLE_PAIRING_MODE_NOT_ENABLED, StatusResult);

    Display(("result %d.\r\n", result));

    Display(("StatusResult %d.\r\n", StatusResult));

    Display(("Simple_Pairing_ModeResult %d.\r\n", Simple_Pairing_ModeResult));

    result = HCI_Read_Simple_Pairing_Mode(ApplicationStateInfo.BluetoothStackID, StatusResult, Simple_Pairing_ModeResult);

     Display(("result %d.\r\n", result));

     Display(("StatusResult %d.\r\n", StatusResult));

     Display(("Simple_Pairing_ModeResult %d.\r\n", Simple_Pairing_ModeResult));

    return(result);

    }

    but it is still no use while the feedback is:

    result 0.
    StatusResult 169.
    Simple_Pairing_ModeResult 62.
    result 0.
    StatusResult 169.
    Simple_Pairing_ModeResult 62.

    Do you konw where goes wong above?

    and can it be changed to PIN Code Pairing mode after I close the Secure Simple Pairing mode?

    Thanks!

  • There are three pairing ways for HOGPDemo: Just Works, Out of Band and Passkey Entry which can be changed with "ChangePairingParameters" command.plesae see: processors.wiki.ti.com/.../CC256x_TI_Bluetooth_Stack_HOGPDemo_App
    What's more, there are something wrong with my USB dongle, it seems to have remembered the pairing way of my CC2564b so that I can not change it no matter how I tried. I changed another USB dongle then it works.
    Thanks for your help!