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

How to config BLE to minimize time of building connection

Hi 

I am a beginner of bluetooth

I want to build BLE connection between nrf52833 and nrf52810 as soon as possible (maybe in 100-200ms)

can I achieve that by config Advertising Interval,Scan Interval and Scan window or others configuration?

SDK: 17  BLE app uart example

Softdevice:

nrf52833 & S140 

nrf52810 & S132

My current setting are

Advertising Interval:20 ms 

Scan Interval & Scan window:40

Sometimes they build connection immediately but sometimes they spend 2-3 second,which longer a lot then I expect

Thanks for helping

  • Hi,

    want to build BLE connection between nrf52833 and nrf52810 as soon as possible (maybe in 100-200ms)

    can I achieve that by config Advertising Interval,Scan Interval and Scan window or others configuration?

    You can adjust the mentioned parameters for it to connect faster.

    Sometimes they build connection immediately but sometimes they spend 2-3 second,which longer a lot then I expect

    2-3 second does seem a bit long. Have you made any modifications other than the advertising interval, scan interval and scan window? Are you around a lot of wireless devices when testing?

  • Hi Mttrinh,

    thanks for your reply

    I didn't modify any default setting except advertising interval, scan interval and scan window(maintain the original configuration from nrf_ble_uart example),and I test it in a quiet room with seldom wireless devices.

    I want to know that is it possible to make it  connect  fast every time(as sometimes it can do),for example if I set:

    advertising interval: 20ms

    scan interval: 40ms

    scan window: 40ms

    Because master can catch the advertising a least once time in its scan window, the time cost of connection will less then 120 ms(for 3 channel*40 ms) is it correct?Or I misunderstand how scan and advertisement work ?

    And, is it any others configuration can help it connect faster(maybe whitelist...)?

    Thanks you very much!

  • Hi,

    Eric_H said:
    Because master can catch the advertising a least once time in its scan window, the time cost of connection will less then 120 ms(for 3 channel*40 ms) is it correct?Or I misunderstand how scan and advertisement work ?

    Yes, that is correct.

    Eric_H said:

    And, is it any others configuration can help it connect faster(maybe whitelist...)?

    You can try adding pairing/bonding to the example, that should help with the connection speed. You will need to add the peer manager to the example in order to support pairing/bonding. You should take a look at another example on how it is done, for example ble_app_hrs.

Related