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

How does the Mesh SDK use the Timeslot API through advertising & scanning interval?

Hi guys,

I'm struggling over some basic concepts related to the Mesh SDK, specifically with the Bearer layer and why the Mesh SDK uses the Timeslot API. I'll try to explain what's not clear to me below.

  • Why does the Mesh SDK use the TimeSlot API? : As I understand from the documentation, this is to be able to talk with non-BLE devices while also being able to support Mesh SDK in the same application. In the long run, this is handy to give support for the GATT bearer. I'm not really sure if the Mesh SDK itself uses other code from inside the SoftDevice to offer concepts as advertising, scanning ... or if the Mesh stack implements this in his own way, using the resources becoming available for use via the TimeSlot API (Radio, Timer, etc.)?
  • Why do advertiser.c and scanner.c still need advertising & scanner interval respectively? : It's also not fully clear to me why these two still need such intervals if they clearly are not used. I tried setting both of them pretty high but I don't see any significant timing changes in measuring the communication in my mesh network.

Specifically in advertiser.c, I see that sending a packet is done via the method schedule_first_time(timer_event_t * p_timer_evt, uint32_t max_delay), where the second parameter is set with the advertisement interval. In the method itself, it seems that a kind of random back-off mechanism is used to schedule the packet to be send over the radio (probably to try and avoid collisions) and that the advertising interval or thus max_delay is used as modulus (upper limit, or thus maximum delay for the packet to be send). Is this the only way the advertising interval is being used (and thus not in the way normal BLE uses it)?

Specifically in scanner.c, here it seems that scan interval & window are being used as they are in normal BLE. But I don't understand how this is possible, if the TimeSlot API is being used. Because then for example continuous scanning isn't possible because you don't always have a timeslot? Or is the SoftDevice itself used for scanning (without TimeSlot API)?

Thank you in advance.

Kind regards,

Mathias

Related