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

SDK 14.2: Slow directed advertising doesn't work

I'm having issues with slow directed advertising. I'm having a BLE peripheral where I want the device to advertise (direct) upon disconnects. I initialize the advertising module as follows:

    init.config.ble_adv_fast_enabled            = true;
    init.config.ble_adv_fast_interval           = APP_ADV_INTERVAL;
    init.config.ble_adv_fast_timeout            = APP_ADV_TIMEOUT_IN_SECONDS;
    init.config.ble_adv_directed_enabled        = true;
    init.config.ble_adv_directed_slow_enabled   = true;
    init.config.ble_adv_directed_slow_interval  = 40;
    init.config.ble_adv_directed_slow_timeout   = 10;

When I disconnect my central (I have tried with both macOS and Android) I am able to connect I am really quick - hence regular (one-off) directed advertising seems to work, but if I wait until the slow directed advertising starts, I never manage to connect to it from the central. Once it times out and goes to regular fast advertising it works (my long-term goal is to disable the regular advertising to get a reconnect-to-last-device behavior).

I have an event handler registered and answers BLE_ADV_EVT_PEER_ADDR_REQUEST as expected (otherwise the one-off directed advertising wouldn't work, right?). I have added checks in ble_advertising.c and there is no error code returned by sd_ble_gap_adv_start. I get a BLE_ADV_EVT_DIRECTED_SLOW event.

Thanks, Jacob

Parents Reply Children
No Data
Related