This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

SDK 14.0 BLE Connection slower than SDK 11.0

I recently upgraded from SDK 11.0 to SDK 14.0 and am seeing much slower connection speeds from the new SDK. The old version would connect in about 400ms, but the new SDK takes over 1000ms for the connection to complete. I think I'm probably missing some configuration changes in the SDK, but I have been unable to identify any discrepancies between my old project and the new one.

  • Hi Nate,

    do mean the time from the peripheral receiving the connection request from the central to the  BLE_GAP_EVT_CONNECTED event is received in the peripheral application? Or are you measuring this in another way?

    Best regards

    Bjørn 

  • I'm measuring the time between BLE_GAP_EVT_CONNECTED to the time of BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST when all the handshaking and discoveries have been completed. Maybe I'm wrong to refer to this as "connection" but this is the time that is taking much longer and causing issues.

  • Hi Nate,

    I apologize for the late reply.

    the connection is established when  you get the BLE_GAP_EVT_CONNECTED event and the BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST is not apart of the connection setup, see Peripheral Connection Establishment and Termination. The BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST propagated to the application when the peer has sent a ATT Write/Read Request with authorization to the nRF device, see the GATTS Read Request with Authorization or GATTS Write Request with Authorization Message Sequence charts in the S132 v5.0.0 API documentation. 

    Hence, the time between the BLE_GAP_EVT_CONNECTED and the BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST event is determined by the peer that is issuing the write or read request with authorization. 

    Could you explain what the central that is connected to your peripheral is doing after the connection is established? Is it writting to one or more characteristics?

    Best regards

    Bjørn 

  • The central is doing a service discovery and then a characteristic discovery. After timing these operations on the central side it appears these two actions are the ones that are much slower than they were with the past SDK (and acompanying Soft Device). The problem that I am seeing though is that as far as I can tell there is no action on the part of my application during these processes, that it is all handled by the Soft Device. Are there settings that could be affecting this or maybe advertising paramaters that would help speed this up?

  • HI Nate, 

    I apologize for the late reply. 

    Are you testing this with the generic SDK examples or are you using custom application examples?

    Are you able to provide sniffer traces of the transactions so that we can compare the packets that are sent on air and their timing? Adjusting the advertisment interval will not affect the service discovery procedure as this is controlled by the central. 

    Which type of central device are you using? Are you seeing the same behaviour with different central devices?

    Best regards

    Bjørn 

Related