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.

CC2640R2F: [BLE5][SDK_3.10] Failure To Use GAP Connection Update Request

Part Number: CC2640R2F
Other Parts Discussed in Thread: BLE-STACK

Hello TI Experts,

Our customer encountered a problem regarding the connection parameters update.

We knew the BLE Peripheral could request to update the connection parameters after the link has been connected, and the TI example "Simple Peripheral" also does so either.

But, we found out this behavior that does not work on the SDK 3.10 but the oldest version SDK 1.40 could work.

So, we were trying to sniff all air packets and analysis that, please check our testing environment as below.

H/W : CC2640R2F / iPhone 7

S/W : SDK 1.40 Original Code "simple_periphaeral"(BLE5) / SDK 3.10 Original Code "simple_periphaeral"(BLE5)

Protocol Sniffer : Ellisys BEX400

The Connection Parameters we set according to SDK 3.10 Original Code "simple_periphaeral"(BLE5).

Minimum Connection Interval  : 80 (100 ms)

Maximum Connection Interval : 104 (130 ms)

Slave Latency                          : 0

Supervision Timeout                : 300 (3s)

Firstly, please check the figure as below, we could see the Connection Update behavior it works on the SDK 1.40. (Attachment : iPhone7_TI_Ori_SDK_1_40.pdf)

But, the SDK 3.10 it does not even work you could see. (Attachment : iPhone7_TI_Ori_SDK_3_10_GAP.pdf)

Interestingly, we try to order the API "L2CAP_ConnParamUpdateReq" directly on the SDK 3.10, it works, but this is not a correct orientation.(Attachment : iPhone7_TI_Ori_SDK_3_10_L2CAP.pdf)

We guess there is something problem in the API "GAP_UpdateLinkParamReq", please help to check this, Many Thanks.

Sniffer_MSC.zip

  • Hi Kenny,

    Per default, the simple peripheral waits for a param update request:

    // After the connection is formed, the peripheral waits until the central
    // device asks for its preferred connection parameters
    #define DEFAULT_ENABLE_UPDATE_REQUEST         GAPROLE_LINK_PARAM_UPDATE_WAIT_REMOTE_PARAMS

    When it is received, it replies with the parameters given in simple_peripheral.c. The API used is GAP_UpdateLinkParamReqReply(). See peripheral.c:

              else // GAPROLE_LINK_PARAM_UPDATE_WAIT_REMOTE_PARAMS
              {
                // Only use remote requested values.
                rsp.intervalMin = pReq->req.intervalMin;
                rsp.intervalMax = pReq->req.intervalMax;
                rsp.connLatency = pReq->req.connLatency;
                rsp.connTimeout = pReq->req.connTimeout;
              }
            }
    
            // Send application's requested parameters back.
            VOID GAP_UpdateLinkParamReqReply(&rsp);

    Can you try using GAP_UpdateLinkParamReq() driectly in your application or GAPRole?

  • Hi Marie,

    Thanks for your reply.

    Actually, we do test the example from the version of BLE5, could you check it again?

    Many Thanks.

    "S/W : SDK 1.40 Original Code "simple_periphaeral"(BLE5) / SDK 3.10 Original Code "simple_periphaeral"(BLE5)"

  • Hi Kenny,

    I just tested with the default ble5_simple_peripheral project from 3.10 SDK. It's sending a connection parameter update request 6 seconds after the connection has been established.

    Did you make any code changes before testing?

    Do you have a preference between LL and L2CAP connection parameter update?
  • Hi Marie,

    Do you try to use iPhone 7? this test is based on Bluetooth 4.2 device of iOS.

    The sniffing log MSC showed, we have definitely waited for over 6 Secs. You could check the timeline of MSC.

    Check the Testing environment what I mentioned before, we modified the connection update parameters of SDK 1.40 according to SDK 1.30.

    Please check it, Many Thanks.

  • Hi Kenny,

    I tested with iPhone 7 now. Turns out it doesn't support LL Connection Parameter Request Procedure. (You can see this in the LL_FEATURE_RSP packet the master sends just after the connection is formed.) The BLE-Stack on the CC264R2 will send a HCI command complete event to the application with the HCI_LE_CONNECTION_UPDATE opCode and the return status ( LL_STATUS_ERROR_UNSUPPORTED_REMOTE_FEATURE).

    Can you try using L2CAP_ConnParamUpdateReq() directly from your application? (API documentation: dev.ti.com/.../group___l2_c_a_p.html )
  • Hi Marie,

    Actually, "L2CAP_ConnParamUpdateReq()" it is ok what I mentioned before.

    Our customer just wants to clarify a paradox between SDK 1.40 and SDK 3.10.

    Why SDK 1.40 could work with iPhone 7 but SDK 3.10?

    Please help to explain that, Many Thanks.

  • Hello Marie,

    The question is how do you know your peripheral (CC2640R2F) is connected with an iPhone 7 (UNSUPPORT) or a non-iPhone 7? SDK 3.10 makes it a no turning back situation. Once you use LL Connection Parameter Rquest on an iPhone 7, it hangs there. Otherwise, the program can just try L2CAP procedure if the LL procedure fails. The problem is you cannot, because the failed LL or L2CAP procedure blocks the other connection update request forever until the connection is terminated.

    Samson

  • Hi Kenny,

    In the 1.40, L2CAP connection parameter update was used per default when connecting to iPhones. In 3.10 SDK it's not. They can replace GAP_UpdateLinkParamReq() with L2CAP_ConnParamUpdateReq() or use the solution I proposed above.
  • Hi Samson,

    If the peer device (iPhone 7) does not support LL Connection Parameter Request Procedure the CC2640R2 will not send this request. As I said, the application will receive a HCI command complete event to the application with the HCI_LE_CONNECTION_UPDATE opCode and the return status ( LL_STATUS_ERROR_UNSUPPORTED_REMOTE_FEATURE). It will not be blocked.
  • Hello Marrie,

    How did you get LL_STATUS_ERROR_UNSUPPORTED_REMOTE_FEATURE? I tried to intercept all HCI Command Complete Events, I didn't see any events after GAP_UpdateLinkParamReq() was called.

    Besides, after GAP_UpdateLinkParamReq() was called with the iPhone 7 connection, the call of L2CAP_ConnParamUpdateReq() would be rejected with the returned status code, bleAlreadyInRequestedMode, which is 0x11.

    So far, I don't see any events that can help me to determine that the GAP_UpdateLinkParamReq() has failed, and L2CAP_ConnParamUpdateReq() shall to be proceeded. Plus the L2CAP_ConnParamUpdateReq() simply does not work after GAP_UpdateLinkParamReq() has been used.

    Samson
  • Hi Marie,
    Thanks for your reply.
    Based on your explained, so we could be understanding the behavior of the connection parameter update is definitely different between SDK 1.40 and SDK 3.10? right? If so, but why? I thought they all are BLE5 Stacks, it should be the same result and behavior, not supposed to show like that.
    Many Thanks.
  • Hi Kenny, Samson,

    I am sorry, this is actually a bug. You won't receive any event in the application when this happens.

    There are a lot of changes from the 1.40 SDK version of the BLE5-Stack. For example, we have removed the GAPRoles and started using the gap_advertiser, gap_scanner and gap_initiator modules instead.
  • Hello Marie,

    Thanks a lot for the clarification. Let us wait for the next release. Looking forward to it.

    Samson