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.

CC2340R2: Connection Update

Expert 4090 points
Part Number: CC2340R2


Tool/software:

Hi team,

Customer is calling GAP_UpdateLinkParamReq() to update the connection interval. And sometimes they are seeing this function return bleProcedureComplete which is not defined in the prototype.

They don’t see the connection update request in their BLE sniffer log.

Any thoughts?

Best,

Luke

  • Hey Luke,

    Thank you for reaching out! This is strange behavior for sure. Could you possibly answer the following questions:|

    1. What SDK is being used?
    2. Where is the customer calling Gap_UpdateLinkParamReq?
    3. Can you provide the params the customer is passing in the function?
    4. Could you provide the packet sniffer log?

    These questions should help me in pinpointing the issue.

    Best Regards,

    Tarek

  • [deleted]
  • Hi Tarek,

    They are using SDK 8.40 and will not be updating to the latest SDK as they already upgraded previously and are too close to production at this point. 

    They are calling it from a task and shared the below for the params:

    void Connection_interval_update(void)
    {
       gapUpdateLinkParamReq_t connectionParameters;
    
        connectionParameters.connectionHandle = 0; 
        connectionParameters.connLatency = 0;
        connectionParameters.connTimeout = 200; // 2 secs
    
        connectionParameters.intervalMax = 56; // 70 msec
        connectionParameters.intervalMin 24; // 30 msec
        connectionParameters.signalIdentifier = 0u; //not sure about this parameter
    
        
        if(BLEAppUtil_paramUpdateReq(&connectionParameters) != USUCCESS)
        {
            // failed
        }
    }
    
    bStatus_t BLEAppUtil_paramUpdateReq(gapUpdateLinkParamReq_t *pReq)
    {
        bStatus_t status = FAILURE;
        linkDBInfo_t linkInfo;
    
        // Verify that the connection is active and send the param update request
        if (linkDB_GetInfo(pReq->connectionHandle, &linkInfo) == SUCCESS)
        {
            status = GAP_UpdateLinkParamReq(pReq);
        }
    
        return status;
    }
    

    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/538/ConnectionIntervalNegotiation_5F00_75ms_5F00_-SnifferLog_5F00_4_5F00_16_5F00_2025-B.cfa

    Sniffer log attached. Initial connection interval was 75ms.

    It appears if they send the update request immediately after receiving the BLEAPPUTIL_LINK_ESTABLISHED_EVENT event, the request is sent. But if they send it after pairing is completed or after the link is encrypted (which is how their code was originally), GAP_UpdateLinkParamReq returns bleProcedureComplete.

    Best,

    Luke

  • Hello Luke,

    Thanks for providing that! Just to clarify, is sending  the request immediately after receiving the BLEAPPUTIL_LINK_ESTABLISHED_EVENT event acceptable by the customer, or are they blocked on this issue?

    Best Regards,

    Tarek

  • Hi Tarek,

    I will have to check the requirements regarding when they should send the update request. As I mentioned previously, they used to send the request after pairing and after the link encryption (when reconnecting to a previously paired device). But I am not sure if that was a requirement or just how they did it. I will check with the customer.

    My feeling is it was a soft requirement. If that is the case, then it may be a blocker.

    One of my concerns is that they didn’t have this issue (I don’t think) at one time during the project. However, they haven’t found that version of code although they do have the sniffer file confirming the update request was sent. They are still looking for this version of the code.

    Best,

    Luke

  • Hi Tarek,

    The issue started occurring when they moved from SDK simplelink_lowpower_f3_sdk_8_20_00_119 to simplelink_lowpower_f3_sdk_8_40_00_6. If they go back to 8.20.00.119 the sending of the connection update request as it did previously.

    Could the parameters that they need to pass to GAP_UpdateLinkParamReq() have changed?

    Best,

    Luke

  • Hey Luke,

    I provided a response on email!

    Best Regards,

    Tarek