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: SPPLEDemo HCI Role Discovery failed. -14

Part Number: CC2564

Hi,

I'm testing SPPLEDemo. i modified MAX_SIMULTANEOUS_SPP_PORTS to connect over 2 boards.

but error like screenshot occurs sometime.

What it is and why it happens? 

And how can i fix it?

  • Dong,

    The error -14 refers to the BTPS_ERROR_HCI_DRIVER_ERROR macro, defined in the BTErrors.h.

    This error is generally returned by HCI_* API when the HCI command could not be sent to the controller due to some error in the HCI driver. If you are only using two boards, one as SPP server and another as SPP client, you can change the SPP_PERFORM_MASTER_ROLE_SWITCH to 0 in the SPPLEDemo.c.

    #define SPP_PERFORM_MASTER_ROLE_SWITCH              (0) /* Defines if TRUE    */
                                                            /* that a role switch */
                                                            /* should be performed*/
                                                            /* for all SPP        */
                                                            /* connections.       */

    Best regards,

    Vihang

  • Vihang,

    Thank for your advice.
    i have one more question,
    I using two boards but I use both of them as server and client.
    so they are become server and client of each other.
    is it possible? and How can i avoid that error?
  • Dong Won Lee said:
    I using two boards but I use both of them as server and client.
    so they are become server and client of each other.
    is it possible?

    I do not see any problem with it. 

    Dong Won Lee said:
    and How can i avoid that error?

    I do not think the problem is with the device being SPP server and client to each other at the profile level. It is related to the role switch and role discovery at the LMP layer (lower protocol). This is most likely because of the modifications to the sample application. The suggestion above regarding the role switch flag should solve it.