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

How to disable advertising timeout in BLE peripheral in SDK 12.1?

I am attempting to disable the advertising timeout on the Nordic Beacon with the ble_app_uart example found in SDK 12.1. I am using SD 130.

Searching for this issue produced a lot of results, but most were from older SDKs. I've tried setting the APP_ADV_TIMEOUT_IN_SECONDS define to '0', but that completely disables advertising. I've also tried setting adv_params.timeout to 0 in ble_advertising_start(), but that did not work either.

How do I get advertising to run indefinitely without timing out?

Parents
  • Hi,

    The ble_app_uart example uses something called limited discoverable mode(BLE_GAP_ADV_FLAGS_LE_ONLY_LIMITED_DISC_MODE) , with this mode it is not allowed to advertise longer than a specified limited timeout period. But if you don't want the advertising to stop, you can switch to general discoverable mode(BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE), and set the timeout to 0 to do unlimited advertising:

    advdata.flags                 = BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE;
    options.ble_adv_fast_timeout  = 0; // APP_ADV_TIMEOUT_IN_SECONDS
    
  • HI Sigurd 

    I am using sdk 11 and softdevice S130, I did the above mentioned setting, but device failed to advertise.

    I am developing device which should advertise infinite time. Please help me with this. 

Reply Children
Related