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

How long should connection establishment take when devices are already bound?

How long should it take for connection to to re-establish after two devices have been bounded? In my case it takes 5 - 10s no matter whether central and peripheral are already bound.

I would suspect that this delay should be far smaller in this case. Specifically, I was testing this on ble_app_hrs and ble_app_hrs_c from SDK 10.0.0 where binding is implemented. My guess is that it takes so long because in every DM_EVT_CONNECTION event dm_security_setup_req() is called, which causes re-binding. Is my guess correct? If not, how can I make rebinding as fast as possible (under 1s) ?

EDIT: I found out that what takes a long time is service discovery. Now I jusgt need to find out how I can use dm_application_context_get and dm_application_context_set.

Parents
  • To establish a connection faster between two devices, the central needs to be performing a 100% duty cycle scan with the peripheral advertising in the shortest interval. Once the connection is established, you should be using the fastest possible connection interval possible to rebind faster. As far as I know, bonding does not affect speed of connection establishment but only establishes a secure connection.

    Central Scan example: Scan window = 50ms Scan Interval = 50ms

    Peripheral advertise example: Advertise interval 20ms (fastest allowed)

    Central connection interval: 7.5ms (fastest allowed).

    This should make things work as fast as possible.

    One other thing that can take time is discovery of services and characteristics of the peripheral so if there is any way to store the handles on central that you need in persistent storage, you can skip discovery.

Reply
  • To establish a connection faster between two devices, the central needs to be performing a 100% duty cycle scan with the peripheral advertising in the shortest interval. Once the connection is established, you should be using the fastest possible connection interval possible to rebind faster. As far as I know, bonding does not affect speed of connection establishment but only establishes a secure connection.

    Central Scan example: Scan window = 50ms Scan Interval = 50ms

    Peripheral advertise example: Advertise interval 20ms (fastest allowed)

    Central connection interval: 7.5ms (fastest allowed).

    This should make things work as fast as possible.

    One other thing that can take time is discovery of services and characteristics of the peripheral so if there is any way to store the handles on central that you need in persistent storage, you can skip discovery.

Children
No Data
Related