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

  • Hi Kenneth,

    Thanks for the reply. I need the advertising with the whitelist option so I can't disable it. Even if the APP_ADV_FAST_DURATION is reduced there is a slow advertising with whitelist mode(BLE_ADV_EVT_SLOW-WHITELIST) which can't be disabled separately. Ideally, if it is possible to set a different duration for the slow/fast whitelist advertising and normal slow/fast advertising that would be better(is it possible?).

    If it is not possible, will there be any problem if I call ble_advertising_restart_without_whitelist() in the BLE_ADV_EVT_FAST_WHITELIST event callback(by keeping the fast advertising interval low and a high slow advertising duration).

    Regards,

    Jibin Raj

Reply
  • Hi Kenneth,

    Thanks for the reply. I need the advertising with the whitelist option so I can't disable it. Even if the APP_ADV_FAST_DURATION is reduced there is a slow advertising with whitelist mode(BLE_ADV_EVT_SLOW-WHITELIST) which can't be disabled separately. Ideally, if it is possible to set a different duration for the slow/fast whitelist advertising and normal slow/fast advertising that would be better(is it possible?).

    If it is not possible, will there be any problem if I call ble_advertising_restart_without_whitelist() in the BLE_ADV_EVT_FAST_WHITELIST event callback(by keeping the fast advertising interval low and a high slow advertising duration).

    Regards,

    Jibin Raj

Children
Related