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 Bluetooth Pairing problem

Other Parts Discussed in Thread: CC2564MODN, MSP430BT5190, CC2564, CC2564MODNEM, MSP430F5438A

Hi all,

I am using CC2564ModN with MSP430BT5190. And using SPP stack from Stonestreet One (Bluetopia)

I am able to discover , open port with CC2564 as server. I am entering the same authentication pin in both android phone and SPP stack (CC2564).

I am able to execute till the following method

GAP_Authentication_Response(), Pin Code Response Success.

Immediately after this on the phone i am getting error message "unable to pair with DEVICE. Incorrect PIN or password"

Thanks

Arun

  • Hi,

    That is strange, Could you provided the terminal out (what you see on Tera term)
  • Hi Sundeep,

    We are not using evaluation board and Tera term, we are using custom board and hardcoding the commands in the SPPDemo.c file.

    Following code is used for opening the port.
    /*************************
    ParameterList_t tem;
    tem.NumberofParameters = 1;
    tem.Params[0].intParam = 1;
    OpenServer(&tem)
    /************************

    We are executing the following code in "case atPINCodeRequest:" inside method "GAP_Event_Callback"
    /*************************
    ParameterList_t tem;
    tem.NumberofParameters = 1;
    char Char[] = {'1','2','3','4'};
    tem.Params[0].strParam = Char;
    PINCodeResponse(&tem);
    /**************************

    Please let me know if any other information is needed.
    Thanks

    Arun
  • Hi,

    Could you please try with "0000" instead of "1234", may be the android auto pairing mechanism is coming in between (which will use "0000" as the default pin)
  • Hi,

    I tried it without any PIN(simple, secure pairing), it is working fine.

    With PIN, device is getting paired (taking 2 to 3 minutes on android device) but link key is not getting generated.

    Thanks
    Arun
  • Hi,

    You mean to say you are not receiving link key creation event (or you are receiving it and you are not handling it).

    Do you have any sniffer logs that you can share.
  • Hi,

    I am not receiving the link key creation event.
    Sorry i don't have sniffer log.

    Thanks
    Arun
  • Hi ,

    Without pin, I am able to transfer the data from both end but i can send only 290 bytes at a time from cc2564modn.

    When i checked the getConfigParams();

    Result is : -
    MaximumFrameSize : 58
    TransmitBufferSize : 58
    ReceiveBufferSize : 58

    here transmitBufferSize is 58 but i am able to send 58*5 = 290 bytes at a time.

    and when i am tring to change the configParams, getting -1 error all the time .

    BaudRate is 115200.

    how can i increase my transmitBufferSize . I want to transmit 2-3 Kbytes at a time .is it possible ?
  • Hi,

    What is the profile you are using? and what is the maximum MTU, the two devices accepted on? 

    If we have sniffer logs it will be easier to see what is happening?

    see http://processors.wiki.ti.com/index.php/CC256x_MSP430_TI%27s_Bluetooth_Stack_Basic_SPPDemo_APP_Improving_throughput_v14

    Also have a look at the Bluetooth specification for better understanding.

    Regarding the pairing issue see http://e2e.ti.com/support/wireless_connectivity/f/660/p/391597/1383481#1383481

  • 5023.btsnoop_hci.log

    Hi,

    We are using the SPP profile. 

    Maximum RFCOMM buffersize 58

    Where can we check the MTU size?

    We have taken the HCI sniffer log through Android 4.4 which  i have inserted here.

  • Hi,

    From the logs it looks like the authentication is successful and the data packet size is 58. could you please let me know whre did you get the 290 bytes from?

    and the L2CAP MTU is 265.
  • Hi,
    Sorry Sundeep , It was my mistake at a time i am able to send only 58 byte not 290 bytes.

    Now my question is how can i increase this data packet size / throughput ?

    as you have suggested

    http://processors.wiki.ti.com/index.php/CC256x_MSP430_TI%27s_Bluetooth_Stack_Basic_SPPDemo_APP_Improving_throughput_v14

    I tried setConfigParams() with

    MaximumFrameSize : 58
    TransmitBufferSize : 116
    ReceiveBufferSize : 116

    parameters but i am always getting -4 error.

    I tried changing the baudrate using setBaudrate() by 460800 which is getting changed successfully
    but with this baudrate i am not able to connect to the device (getting message "not able to connect").

    Thanks And Regards
    Arun
  • Hi,

    I have tried it myself on MSP430F5438A + CC2564MODNEM with the default demo that is provided as part of the release and did not face any issue any issue.

    see attached 

    OpenStack().
    HCI_VS_InitializeAfterHCIReset
    HCI_VS_InitializeAfterHCIReset Success
    Bluetooth Stack ID: 1
    Device Chipset: 4.1
    BD_ADDR: 0x0017E9505F95
    
    ******************************************************************
    * Command Options: Server, Client, Help                          *
    ******************************************************************
    
    Choose Mode>Server
    
    ******************************************************************
    * Command Options: Inquiry, DisplayInquiryList, Pair,            *
    *                  EndPairing, PINCodeResponse, PassKeyResponse, *
    *                  UserConfirmationResponse,                     *
    *                  SetDiscoverabilityMode, SetConnectabilityMode,*
    *                  SetPairabilityMode,                           *
    *                  ChangeSimplePairingParameters,                *
    *                  GetLocalAddress, GetLocalName, SetLocalName,  *
    *                  GetClassOfDevice, SetClassOfDevice,           *
    *                  GetRemoteName, SniffMode, ExitSniffMode,      *
    *                  Open, Close, Read, Write,                     *
    *                  GetConfigParams, SetConfigParams,             *
    *                  GetQueueParams, SetQueueParams,               *
    *                  Loopback, DisplayRawModeData,                 *
    *                  AutomaticReadMode, SetBaudRate, Send          *
    *                  Help, Quit                                    *
    ******************************************************************
    
    Server>SetBaudRate 460800
    VS_Update_UART_Baud_Rate(460800): Success.
    
    Server>GetConfigParams
    SPP_Get_Configuration_Parameters(): Success
       MaximumFrameSize   : 58 (0x3A)
       TransmitBufferSize : 58 (0x3A)
       ReceiveBufferSize  : 58 (0x3A)
    
    Server>SetConfigParams 58 116 116
    SPP_Set_Configuration_Parameters(): Success
       MaximumFrameSize   : 58 (0x3A)
       TransmitBufferSize : 116 (0x74)
       ReceiveBufferSize  : 116 (0x74)
    
    Server>GetConfigParams
    SPP_Get_Configuration_Parameters(): Success
       MaximumFrameSize   : 58 (0x3A)
       TransmitBufferSize : 116 (0x74)
       ReceiveBufferSize  : 116 (0x74)
    
    Server>Open 1
    Server Opened: 1.
    
    Server>
    atLinkKeyRequest: 0x10683F59E8A1
    
    GAP_Authentication_Response success.
    
    Server>
    atPINCodeRequest: 0x10683F59E8A1
    Respond with: PINCodeResponse
    
    Server>PINCodeResponse 0000
    GAP_Authentication_Response(), Pin Code Response Success.
    
    Server>
    atLinkKeyCreation: 0x10683F59E8A1
    Link Key Stored.
    
    Server>
    SPP Open Indication, ID: 0x0001, Board: 0x10683F59E8A1.
    
    Server>
    SPP Data Indication, ID: 0x0001, Length: 0x0001.
    
    Server>
    SPP Data Indication, ID: 0x0001, Length: 0x0001.
    
    Server>
    SPP Data Indication, ID: 0x0001, Length: 0x0001.
    
    Server>
    SPP Data Indication, ID: 0x0001, Length: 0x0001.
    
    Server>
    SPP Data Indication, ID: 0x0001, Length: 0x0001.
    
    Server>read
    Read: 5.
    Message: dffgg
    Read: 0.
    
    Server>
    HCI Mode Change Event, Status: 0x00, Connection Handle: 1, Mode: Sniff, Interval                                                                                                                     : 800
    
    Server>write
    Wrote: 22.
    
    Server>

    I suspect either the Launchpad you are using does not support the this UART baud rate or it does not have sufficient memory.