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

Slow connect in a SDK15 previously bonded peripherial device.

Hi!

I have SDK15 central (nRF52832) with previously bonded peripherial device also SDK15 (nRF52810).

All works. But sometime when power on on the peripherial device, connect establish up to 5 seconds. 

In a LOG central i see next:

0> <info> app: Starting scan.
0> <info> app: Connected ble_advertising.
0> <info> app: Connected to a previously bonded device.

In the debugging of central I have also debug in a BLE_GAP_EVT_ADV_REPORT case.

Switch on peripherial device and see above logs on the central device:

up to 5 seconds pause, when I get BLE_GAP_EVT_ADV_REPORT event, right next 

0> <info> app: Connected ble_advertising.
0> <info> app: Connected to a previously bonded device.

Why I have this delay for connect? Scan windows is:

#define SCAN_INTERVAL   0x00A0 
#define SCAN_WINDOW    0x0096
#define SCAN_DURATION 0x0000
#define SCAN_DURATION_WITELIST 0x0000

Also I have same project on a SDK13, and there is no same behavior- connect establish right after power on peripherial device.

Parents Reply
  • The Scanner interval and window you are using 

    Scan interval: 100ms (160 * 0.625ms)

    Scan window: 98.75ms (158 * 0.625ms) 

    means that you are effectivly scanning for 98,75% of the time, there is a 1,25ms gap between the end of one scan event and the start of the next. In addition there is also some time that the SD needs to reconfigure the RADIO frequency when swiching channels.  So if you want to increase the time it take to connect you will have to decrease the advertisement interval on the peripheral side. 

    Best regards

    Bjørn

Children
Related