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

How to advertise for less than one second with nrf51422

I would like to ask how to make advertisements which are less than one second. In my application, i need to scan for devices, when i find my specific device, i start to advertise with specific data. I know that i can advertise for 1 second by setting APP_ADV_TIMEOUT_IN_SECONDS = 1. Then im scanning, advertising for one second, then scanning again and so on and this application is working without any problems. But i want to make advertising intervals shorter. Lets say 150ms, 200ms or 250ms. What is the best way to achieve this?

Thank you in advance,

Regards.

Parents
  • Advertising timeout controls how long you advertise before stopping, the advertising interval controls how long between advertising events. If you want to advertise repeatedly for an interval less than 1 second, set the advertising timeout to zero and the interval to your sub-second interval. It becomes a bit more cumbersome if you only want to emit one advertisement before stopping, then you would probably need to use the radio notification feature so you could stop advertising after the first advertising event.

    Its tough to give you a more specific answer without going into a ton of detail without knowing exactly what advertising pattern you are attempting to achieve.

  • You should be able to call sd_ble_gap_adv_stop() to stop advertising after less than one second

Reply Children
No Data
Related