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
  • Hi, I am no aware of a event that is returned every time an advertising event occurs. There may be one, but I didn't find one in my quick look around. You can use radio notifications for sure as you should get one prior to each advertising event. You could also just set a 400 mS timer and use that to call the stop advertising function as well. You'd probably want to make the timer a little longer than 400 mS just to make sure the last advertisement got out.

Reply
  • Hi, I am no aware of a event that is returned every time an advertising event occurs. There may be one, but I didn't find one in my quick look around. You can use radio notifications for sure as you should get one prior to each advertising event. You could also just set a 400 mS timer and use that to call the stop advertising function as well. You'd probably want to make the timer a little longer than 400 mS just to make sure the last advertisement got out.

Children
No Data
Related