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.

CC2564B: SPP Open Remote Server Failed issue

Part Number: CC2564B

SPP Server

SPPClient

Hi, 

I'm using SPPLE Demo with MSP430.

I want to connect multiple SPP at the same time, but there is some problem with connect on client.

at the top of this thread, i post screenshot of my tera term.

When execute [openserver] command on Server and execute [openremoteserver] command immediately on Client,

connection error occurs with a very high probability like screenshot.

It seems to connected successfully, but it does not. Just output open confirm message.

biggest problem is the waiting time to connect SPP is too random.

sometimes it can connect immediately, but sometimes it can connect 7~10 seconds left.

1) Is there any way to reduce waiting time to connect?

2) Or can I increase connection timeout on client?

Best regards,

DW

  • Dong,

    Dong Won Lee said:

    When execute [openserver] command on Server and execute [openremoteserver] command immediately on Client,

    connection error occurs with a very high probability like screenshot.

    I do not see any connection error in the screenshot. The error appears to be from the "sppwrite" command. I do not see any command like it in the SPPDemo or SPPLEDemo of the CC256XMSPBTBLESW. Have you modified the SDK sample application?

    Moreover, are you following the steps explained in the demo guide?

    http://processors.wiki.ti.com/index.php/CC256x_TI_Bluetooth_Stack_SPPDemo_App

  • Vihang,

    First, I'm sorry to confuse you.

    Yes I modified name of write() function but not its source. So sppwrite() and write are same.

    and also i modified parameters of open() of Client but not its source. I just want to skip inquiry progress.

    Anyway, I think there is no problem with functions. because it's totally same with SPPLEDemo.

    Not to confuse you again, i attach screenshot of when it is succeed and failed.

    When it failed, there is no other messages are printed from UART like screenshot I uploaded first.

    It seems to connected successfully, but it does not. Just print open confirm message.

    biggest problem is the waiting time to connect SPP is too random.

    sometimes it can connect immediately, but sometimes it can connect 7~10 seconds left.

    and my question is

    1) Is there any way to reduce waiting time to connect?

    2) Or can I increase connection timeout on client?

    Success

    Fail

  • Hi Dong,

    Success:

    SPP Open Confirmation, ID: 0x0001, Status 0x0000.

    Failure:

    SPP Open Confirmation, ID: 0x0001, Status 0x0001.

    The status of 0x0000 (Sucess) refers to the SPP_OPEN_PORT_STATUS_SUCCESS defined in the SPPAPI.h. The status of 0x0001 (Failure) refers to the SPP_OPEN_PORT_STATUS_CONNECTION_TIMEOUT. This usually happens when there is a connection timeout in creating the BT LMP layer connection. You can quickly verify by adding an etConnection_Complete_Event case in the HCI_Event_Callback.

    i.e.
    switch(HCI_Event_Data->Event_Data_Type)
          {
             case etConnection_Complete_Event:
                 /* Status value of zero indicates success. Non-zero values indicate error codes defined in the BT Spec.   */
                    Display(("HCI Connection Complete Event, Status : 0x%02X, Connection Handle: %d\r\n", HCI_Event_Data->Event_Data.HCI_Connection_Complete_Event_Data->Status,
                                                                                                          HCI_Event_Data->Event_Data.HCI_Connection_Complete_Event_Data->Connection_Handle));
             break;
    ...

    If you see a non-zero status in this HCI event in the failure case, that would mean that the remote device did not connect.

    Best regards,

    Vihang