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

Advertise for Limited time

Hi,

I have a application that needs to advertise only for 120 seconds and on change in values of accelerometer , it needs to start advertise again. presently i have a application that advertises forever i tried it to change by looking at examples but it doesnt seem to work. Can anyone please help me with this. Thanks.

Parents
  • There is a parameter for advertising timeout in ble_adv_modes_config_t. There is one for "fast" and one for "slow" advertising. For example only having "fast" advertising and no "slow" advertising means the nRF will stop advertising after the timeout parameter for fast.

    Then to restart, in your interrupt handler put ble_advertising_start(ble_adv_mode_t advertising_mode) and if the nRF is not advertising it will and if it is advertising will continue.

Reply
  • There is a parameter for advertising timeout in ble_adv_modes_config_t. There is one for "fast" and one for "slow" advertising. For example only having "fast" advertising and no "slow" advertising means the nRF will stop advertising after the timeout parameter for fast.

    Then to restart, in your interrupt handler put ble_advertising_start(ble_adv_mode_t advertising_mode) and if the nRF is not advertising it will and if it is advertising will continue.

Children
Related