NRF Connect SDK: How to set Advertising Timeout?

Hello,
I'm using the nrf52DK for the chip nrf52832 with nrf connect SDK v2.6.1 

I want to implement an advertising timeout say 5 minutes. How can I achieve that? any example code would be nice.

Thanks for the help. 

Parents Reply
  • Sorry for the late reply, you should be able to use BT_LE_AD_LIMITED in the advertising flag and have the CONFIG_BT_LIM_ADV_TIMEOUT being set to timeout value in your prj.conf. This should work as reported by some of our customers but in case it did not, it should be quite simple to add a timer with a callback and a timeout. In the timeout callback handler just call bt_le_adv_stop to stop the advertisement. 

Children
Related