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.

CC2652R: How to find out the Connection time

Expert 1760 points
Part Number: CC2652R

Hi,

I'm working on the CC2652R evaluation board.(BLE SDK simplelink_cc13x2_26x2_sdk_4_40_00_44)

For me, the connection time (and not connection interval) is very important. Means how fast the BLE device connects to a smartphone.

I already tried to find it using nRF Connect Mobile App from the logs it generate. Following are the steps in the logs:

4:27.728 Connecting to 80:6F:B0:31:DA:A9...
D 14:34:27.728 gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE, preferred PHY = LE 1M)
D 14:34:30.104 [Callback] Connection state changed with status: 0 and new state: CONNECTED (2)
I 14:34:30.105 Connected to 80:6F:B0:31:DA:A9
V 14:34:30.107 Discovering services...
D 14:34:30.107 gatt.discoverServices()
D 14:34:30.126 [Broadcast] Action received: android.bluetooth.device.action.ACL_CONNECTED
I 14:34:30.622 Connection parameters updated (interval: 7.5ms, latency: 0, timeout: 5000ms)
D 14:34:30.775 [Callback] Services discovered with status: 0
I 14:34:30.775 Services discovered

Marked in RED is the time from Connecting till Connected and it is around 2.5 seconds (which varies between 1-5 secs). 

I have 2 questions here.

1. From the logs mentioned above (from nRF Connect App) it is not possible to understand what is going on between Connecting to Connected. So is there any way/tool I get a detailed log of the connection procedure?

2. When I compared the connection time with our product version1 which is using BLE4.2 SDK (ble_sdk_2_02_01_18), I don't observe any improvement in the Connection time. Why is the connection time more, and how can I improve or reduce the connection time.?

Please let me know if more details are required to answer my question.

Thanks.

  • Hi,

    1- The best tool to have a complete look at the BLE packets exchanged is packet sniffer. You could for example leverage PACKET-SNIFFER. Please make sure to open a dedicated thread if you need help with this tool.

    2- No matter the Bluetooth specification version used, the packets exchanged at connection establishment are almost the same. In other words, you should not expect much improvement by moving to a different device or stack version.

    I hope this will help,

    Best regards,

  • Hi Clement,

    Thanks, I understood the answer to the 2nd question.

    But 1st one, how can we use the packet sniffer to find out the clear for me, like you told leveraging sniffer.

    I'm using packet sniffer from some time and I use it only for capturing the packets, for example to know the advertising interval, check the advertisement packet data. But not used it for finding the connection time. Would be interested to know about it.

    Thanks.

  • Hi,

    Generally speaking protocol analyzers provide the timing of the packets sniffed. PACKET-SNIFFER provides this information too.

    Please refer to https://www.ti.com/tool/PACKET-SNIFFER for more details.

    Best regards,

  • Hi Clement,

    Just for aligning with what you have told, I mean about Connection time ( the time it takes for a device to establish the connection time). I dont mean Advertisement time (time between each packets sent) or connection interval.

    I also didnt understand how can we calculate the connection establishment time using the packet sniffing time.

    Thanks

  • Hi,

    Any good protocol analyzer provides the timing of the received PDUs. Based on this timing and the content of the PDUs you can find the the connection time.

    For example, considering the results below, you can assess how much time is required between the last advertisement and the first ATT request.

    Best regards,