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

Time cost to establish BLE connection

Dear experts, Currently I'm using the peripheral device(s130 softdevice) and central device(s120 softdevice) both base on nrf51822 to evaluate BLE connect time. The connection interval is configured as 30ms. The scan time is 300ms and scan window is 10ms. In my test, I just connect one peripheral to central device and simply measure the time between calling sd_ble_gap_connect() and getting BLE_GAP_EVT_CONNECTED event. Finally I found the connect time is at least 600ms, sometimes up to several seconds. It's confused for me that so long time is needed to establish BLE connection. I think for BLE concept this process should be finished in dozens of milliseconds. Actually I want to write some application like that the peripheral devices keep sleeping in some seconds and then wake up to collect sensor data and send to central device, then back to sleep to save power. But it the previous connect time I mentioned takes so long, then each time the peripheral devices have to wake up for more than 1 seconds. So my question is whether the time I measure is reasonable or not? Thanks!

Parents
  • Hi

    Do you know what the advertising interval of the advertising device is?

    With a scan interval of 300ms and a scan window of 10ms you are only scanning 3.3% of the time, and you will surely drop a lot of the advertise packets. Normally an advertiser can not advertise more quickly than every 20ms, which means you are lucky to receive even a single advertise packet in that 10ms scan window. The end result is that you have to wait for multiple periods before you receive an advertise packet that you can send a connection request on.

    If you know that the device is advertising, and you want to establish a connection quickly, I would recommend using a longer scan window and possibly a shorter scanning interval, to increase the chance of receiving an advertise packet quickly.

    Best regards
    Torbjørn

  • Sounds reasonable! Could you please tell me which part of which spec or protocol document which I can get this kind of information from? Thanks!

Reply Children
No Data
Related