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.

LAUNCHXL-CC26X2R1: Does GAP_TerminateLinkReq() create an event?

Part Number: LAUNCHXL-CC26X2R1

Hi,

I'm trying to terminate a connection from within my peripheral.  I'm using GAP_TerminateLinkReq() and I verified that it gets execute and returns success.  The code looks like:

void CONN_terminateConnection(uint8_t reason)
{
    Display_printf(dispHandle, 0, 0, "CONN_terminateConnection");

     bStatus_t status = (status_t)GAP_TerminateLinkReq(connectionHandle, reason);

    // There should be no issues when terminating the connection
    if (status != (status_t)SUCCESS)
    {    
        ASSERT(0); // there shouldn't be any pending Param updates
    }

}

I know the connection is not being terminated because after I create the condition to terminate the connection, I can still execute a connection command like GATT_DiscCharDescs.  I do not see any indication in the btool log that the connection is terminated.

Do I need to do any clean up code after the call to GAP_TerminateLinkReq() (such as NULL-ing out connectionHandle)?

Does the call to GAP_TerminateLinkReq() create an event that I can trap on?  In my code, it doesn't seem to generate GAP_LINK_TERMINATED_EVENT.

Thanks,

Dawn