Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to set the duration of advertisement with whitelisting?

Hi,

I have an application where an nRF52840 DK(1.1.0) is configured to work as both central and peripheral. I want to set a lesser duration for advertising with whitelisting than without whitelisting as a new device is taking a few seconds to discover the nRF52840DK. If there is a solution to configure the duration during initialization that would be better than updating the duration during runtime.

Regards,

Jibin Raj

Parents
  • Hi,

    If you want to advertise without white list you can simply call ble_advertising_restart_without_whitelist(), or when you start advertisement you simply set:

    init.config.ble_adv_whitelist_enabled          = false;

    Also make sure to set:

    init.config.ble_adv_directed_enabled           = false;

    If you don't want to use any of the above, then the last option likely is to reduce APP_ADV_FAST_DURATION and increase APP_ADV_SLOW_DURATION.

    Best regards,
    Kenneth

Reply
  • Hi,

    If you want to advertise without white list you can simply call ble_advertising_restart_without_whitelist(), or when you start advertisement you simply set:

    init.config.ble_adv_whitelist_enabled          = false;

    Also make sure to set:

    init.config.ble_adv_directed_enabled           = false;

    If you don't want to use any of the above, then the last option likely is to reduce APP_ADV_FAST_DURATION and increase APP_ADV_SLOW_DURATION.

    Best regards,
    Kenneth

Children
Related