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.

CC2745R10-Q1: About GAP_UpdateLinkParamReq()

Part Number: CC2745R10-Q1

Tool/software:

Hi,

Please tell me about the return value of GAP_UpdateLinkParamReq().
When L2CAP_CHANNEL_ESTABLISHED_EVT is received during an L2CAP connection, GAP_UpdateLinkParamReq is executed to change the connection parameters, but the status is returned as 0x1A. When does it return 0x1A?

First of all, as far as the API specifications are concerned, 0x1A is not supposed to be returned, so is this phenomenon possible?

Best Regards,

Katsuya

  • Hello,

    0x1A usually translates to bleProcedureComplete. You are correct that this function should not (and does not) return 0x1A. 

    I have some questions:

    1. Are you using GATT at all? This appears to be a common return from GATT APIs.

    2. What example project are you using?

    3. Does the GAP_UpdateLinkParamReq go through successfully? Do you have an airtrace to confirm this?

    Best,

    Nima Behmanesh

  • Hello Nima,

    1. Are you using GATT at all? This appears to be a common return from GATT APIs.

    I am using L2CAP.

    2. What example project are you using?

    I'm currently checking this in my own project.

    3. Does the GAP_UpdateLinkParamReq go through successfully? Do you have an airtrace to confirm this?

    →I got a sniffer shot.
    The Connection Parameter Request was not sent.
    However, when I checked with another device, the Connection Parameter Request was sent and the status was returned as 0x00.

    ↓ Log when Connection Parameter Request is not sent.

    ↓ Log when Connection Parameter Request is sent.

    Best Regards,

    Katsuya

  • Hello,

    When L2CAP_CHANNEL_ESTABLISHED_EVT is received during an L2CAP connection, GAP_UpdateLinkParamReq is executed to change the connection parameters, but the status is returned as 0x1A. When does it return 0x1A?

    Do you mind sharing the code for this?

    Best,

    Nima Behmanesh

  • Hello Nima,

    Below is an excerpt from the code:

    static void L2capSignalEvt(l2capSignalEvent_t *pMsg)
    {
        switch (pMsg->opcode)
        {
        case L2CAP_CHANNEL_ESTABLISHED_EVT:
            EstablishL2capChannel((l2capSignalEvent_t *)pMsg);
            break;
        }
    }
    
    static void EstablishL2capChannel(l2capSignalEvent_t *pMsg)
    {
        l2capChannelEstEvt_t    *pstt_data      = &(pMsg->cmd.channelEstEvt);
        switch (pstt_data->result)
        {
        case L2CAP_CONN_SUCCESS:
            gapUpdateLinkParamReq_t     stt_reqParam;
            
            stt_reqParam.connectionHandle = connHandle;
            stt_reqParam.intervalMin      = 24;
            stt_reqParam.intervalMax      = 48;
            stt_reqParam.connLatency      = 0;
            stt_reqParam.connTimeout      = 100;
            stt_reqParam.signalIdentifier = 0;
            
            stt_result = GAP_UpdateLinkParamReq(&stt_reqParam); ← This returns 0x1A.
            
            break;
    }

    Best Regards,

    Katsuya

  • Hello,

    Do you mind trying to wrap the call to GAP_UpdateLinkParamReq with BLEAppUtil_invokeFunction?

    I believe this may be the cause of the issue.

    Best,

    Nima Behmanesh

  • Hi Nima,

    I checked with BLEAppUtil_invokeFunction, but the phenomenon did not change and 0x1A was returned.

    Best Regards,

    Katsuya

  • Hello,

    I saw in another thread that you are on 8.30 EA release of the SDK. Do you mind upgrading to the latest SDK? 

    It'll be difficult to rule out if this an SDK version specific issue, since EA releases typically don't go through the same testing cycle that our main releases go to. It'll be best to isolate it from the SDK. 

    Best,

    Nima Behmanesh