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

S130 Adv/Scan Scheduling

Can someone from Nordic (or anyone who knows) comment on what happens when scanning and advertising simultaneously with S130. For example:

Scan Interval 100ms Scan Window 98ms Adv Interval 50ms

What does the schedule look like in terms of radio use (scan vs adv)?

Thanks,

Konstantin

  • Hi, this might be subject to change, but I will give this a go.

    This is an unfair arrangement of parameters to begin with, so there is not enough time to actually do both of these operations - and one of them will be blocked. When an operation has been blocked N times in a row, it will get its priority raised. This means that if e.g. the advertiser is running every 50ms, it will always collide with a scanner that wants to scan for 98ms. After N blocked attempts, the scanner will cancel out the planned advertisement and start up. The advertiser will then try to reschedule 50ms into the future instead, and will probably succeed doing so.

    For the current S130, I think N is 10. In future versions we hope to make this behavior a bit easier to determine.

  • My incorrect assumption was that the scan is going to start and be briefly interrupted for each advertising transmit. I'm not sure how long each advertisement radio event is but I imagine it's very short.

    Would it be better to schedule adv interval at 100ms so that it can fit in the 2ms dead slot in the scan? Is the scheduler smart enough to figure that out?

  • No, there is a random (spec-required) delay before the start of each advertisement of up to 10ms, so this will not work either. This means that advertisers will drift in time compared to the scanner that will always try to scan at the same timings.

  • Thanks. Any suggestions on how to maximize scanning while also advertising? The goal is to have bi-directional communication using advertising packets.

  • This is where I'm personally a bit uncertain. I think the earliest versions of the S130 have some identified problems regarding scanning with window~=interval and advertising, so your mileage may vary. But decreasing the scan window and shortening the advertising intervals will make the distribution in time a bit more fair. Alas, it will naturally also increase power consumption.

    Hoping someone can chime in with some experiences here, if not I recommend you to do some quick testing or raise a new question :)

Related