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

Synchronize advertisig with connection intervals

I am looking for a way to start advertising as soon as connection event.

Our use-case is: we have 1 peripheral that's connected on CODED PHY to a central with a relatively large connection interval (> 1s). While it is in connected state, the peripheral will advertise on 1MBPS to allow connection to mobiles. The problem is, if you're unfortunate with when PHY central connects the advertising will happen right in the middle between 2 connection intervals which will kill our current usage, especially since CODED is quite taxing. 

I have read about radio notifications, however I'm not sure they actually solve my problem. What I want is for radio to be remained on and start advertising right after connection event or at least right in the middle of it so radio doesn't have to be wasted.

Is there some other API I'm overlooking that would allow to query in the main sleep loop what woke up CPU?

Parents
  • Hi,

    Unfortunately, Advertising cannot be synchronized with a connection as advertisement requires a random delay to comply with the spec. You can see the details on scheduling here: Advertiser timing

    Not sure why having this in between two connection events will kill you powert budget? radio will have to ramp up and send regardless. I guess there is a small penalty from stopping and starting the High frequency crystal oscillator. But as mentioned the random delay is required so I am afraid there is not any options in this case.

Reply
  • Hi,

    Unfortunately, Advertising cannot be synchronized with a connection as advertisement requires a random delay to comply with the spec. You can see the details on scheduling here: Advertiser timing

    Not sure why having this in between two connection events will kill you powert budget? radio will have to ramp up and send regardless. I guess there is a small penalty from stopping and starting the High frequency crystal oscillator. But as mentioned the random delay is required so I am afraid there is not any options in this case.

Children
No Data
Related