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.

CC26xx Connection Times Variation

Other Parts Discussed in Thread: CC2640

Hello,

I'm using the CC2640 BLE transceiver and I'm noticing a larger than expected variation in connections times between my device and phones.  I have set the advertising rate to 1second and know the devices are in very good range and in screen room.  

Here are the times we are seeing with an iPhone 6+, this is the time from when the user presses the button to the time we receive the callback on the iphone that we are connected: 

2.7 , 1.7 , 2.6 , 3.0 , 2.0 , 1.7 , 3.8 , 1.1 , 2.8 , 2.4 

Correct me if I'm wrong, but I understand that the following process has to take place:

1. the user presses the button and the iPhone opens a scan

2. it could take up to 1 sec to receive the first advertisment

3. it takes 1 more second to finish the connection process

According to this assumption it should take up to 2 seconds for the connection to be established... it really bothers me that it can take up to 3.8sec

My questions:

1. Have you measured the connection times with the TI Stack?

2. is my above assumption about the process correct?

3. Is there any way to make this more reliable? 

4. How can I test this... the only resolution I currently have on the device side is the callback of link established?

Thanks,

Ryan

  • Hi Ryan,

    With a 1s advertising interval it can take quite a long time for the Central side to discover the CC2640.

    Apple does not provide any details on what their scan intervals are but they are probably not receiving continouosly. When scanning the phone is receiving on channels 37-38-39 every time and the probability of the phone hitting the same channel as the peripheral decreases with increasing advertising interval. On top of this the phone might decide to process other things first, further increasing the delay.

    Ryan Truer said:
    1. Have you measured the connection times with the TI Stack?

    Not that I am aware of but the limitation here is not set by the CC2640 but by advertising interval and the phone. If the phone side does a scan request before connecting this will further add to the delay.

    Ryan Truer said:
    2. is my above assumption about the process correct?

    Not entirely. If there are interference nearby or if the phone does not scan continously I imagine that connection setup can take more time than your measurements as well (easily up to 10s)

    I suggest reading through the BT Core spec v4.1 vol 6B chapters 4.4/4.5 for a better understanding of the process.

    Ryan Truer said:

    3. Is there any way to make this more reliable? 

    Yes, following Apple's guidelines on this will make improve connection performance drastically but at the same time have an impact on battery lifetime. You basically need to do a tradeoff here on what you think is acceptable performance.

    More info here in chapter 3.5 here: https://developer.apple.com/hardwaredrivers/BluetoothDesignGuidelines.pdf

    Ryan Truer said:

    4. How can I test this... the only resolution I currently have on the device side is the callback of link established?

    You can time this using the callback from the link layer as you mention to measure the difference in time between the events GAPROLE_ADVERTISING and GAPROLE_CONNECTED.

    Best regards,
    Svend