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

Advertising times out immediately - SDK 15

Hello,

I'm having issues with the advertising module in SDK 15.0. I basically want the device to fast advertise for 3 minutes and then switch to slow advertising forever.

I'm initializing the advertising module with this:

init.config.ble_adv_fast_enabled	= true;
init.config.ble_adv_fast_interval	= APP_FAST_ADV_INTERVAL;
init.config.ble_adv_fast_timeout	= APP_FAST_ADV_TIMEOUT_IN_SECONDS;

init.config.ble_adv_slow_enabled	= true;
init.config.ble_adv_slow_interval	= APP_SLOW_ADV_INTERVAL;
init.config.ble_adv_slow_timeout	= APP_SLOW_ADV_TIMEOUT_IN_SECONDS;

However, as soon as I start advertising, I get a BLE_GAP_EVT_ADV_SET_TERMINATED event with the reason being timeout and zero completed advertisement events.

This was working fine in SDK 13.1 (I just migrated). What else do I need to take care of for this to work properly again?

Thanks in advance!

EDIT: The module starts fast advertising, and then moves on to slow advertising immediately.

These are my definitions:

// Advertising intervals should be within the range of 20 ms and 10.24 s
#define APP_FAST_ADV_INTERVAL				300										/**< The advertising interval (in units of 0.625 ms. This value corresponds to 187.5 ms). */
#define APP_FAST_ADV_TIMEOUT_IN_SECONDS		120										/**< The advertising timeout in units of seconds. */

#define APP_SLOW_ADV_INTERVAL				2400									/**< The advertising interval (in units of 0.625 ms. This value corresponds to 1.5 seconds). */
#define APP_SLOW_ADV_TIMEOUT_IN_SECONDS		BLE_GAP_ADV_TIMEOUT_GENERAL_UNLIMITED	/**< The advertising timeout in units of seconds. */

Related