<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>How does the Mesh SDK use the Timeslot API through advertising &amp;amp; scanning interval?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/29457/how-does-the-mesh-sdk-use-the-timeslot-api-through-advertising-scanning-interval</link><description>Hi guys, 
 I&amp;#39;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&amp;#39;ll try to explain what&amp;#39;s not clear to me below. 
 
 Why does the Mesh SDK use the TimeSlot</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 25 Jan 2018 08:48:52 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/29457/how-does-the-mesh-sdk-use-the-timeslot-api-through-advertising-scanning-interval" /><item><title>RE: How does the Mesh SDK use the Timeslot API through advertising &amp; scanning interval?</title><link>https://devzone.nordicsemi.com/thread/117131?ContentTypeID=1</link><pubDate>Thu, 25 Jan 2018 08:48:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e302fb24-2044-49a3-8ca1-5b86f0a5ea5e</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;You are welcome Mathias :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How does the Mesh SDK use the Timeslot API through advertising &amp; scanning interval?</title><link>https://devzone.nordicsemi.com/thread/117130?ContentTypeID=1</link><pubDate>Wed, 24 Jan 2018 17:14:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:38ef9566-3bd3-40d7-9443-0d966d1793db</guid><dc:creator>Mathias</dc:creator><description>&lt;p&gt;Okay, I think I understand it better now. Thank you again for all your help. I really applaud the DevZone community for all the effort in helping me out with all my questions all the time!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How does the Mesh SDK use the Timeslot API through advertising &amp; scanning interval?</title><link>https://devzone.nordicsemi.com/thread/117129?ContentTypeID=1</link><pubDate>Wed, 24 Jan 2018 16:18:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:08f03e10-0d43-4bb1-8ec4-0b82f7f0ba79</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Yes, you can ignore the timeout mechanism as it&amp;#39;s handled by the Mesh stack already and is transparent to the application.&lt;/p&gt;
&lt;p&gt;Only on the first call to advertise the random delay will be calculated of something bordered by advertising interval. Think about it as a consequence advertising packet, when the previous advertising packet happened some time in the past (the random delay) instead of happens at the time of calling. This to avoid a long wait for the first packet if the advertising interval is big.&lt;/p&gt;
&lt;p&gt;If you have a look at the timeout_event() you can find the call setup_next_timeout() will calculate the next advertising event with the normal random delay as normal Bluetooth advertising.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How does the Mesh SDK use the Timeslot API through advertising &amp; scanning interval?</title><link>https://devzone.nordicsemi.com/thread/117128?ContentTypeID=1</link><pubDate>Wed, 24 Jan 2018 14:56:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9b65e13c-185c-4798-9016-7ce78c224e4d</guid><dc:creator>Mathias</dc:creator><description>&lt;p&gt;It&amp;#39;s just that in the bearer layer libraries, specifically in the advertiser.h file, I can see the method &amp;quot;schedule_first_time&amp;quot; being used by the light_switch_example. And in there, I see that a kind of offset value (after which sending starts?) is calculated randomly, bordered by the advertisement interval? But I don&amp;#39;t understand how this compares to normal BLE advertising?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How does the Mesh SDK use the Timeslot API through advertising &amp; scanning interval?</title><link>https://devzone.nordicsemi.com/thread/117127?ContentTypeID=1</link><pubDate>Wed, 24 Jan 2018 14:46:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e170a341-7e35-444a-b5f2-fce0ec0fde85</guid><dc:creator>Mathias</dc:creator><description>&lt;ol&gt;
&lt;li&gt;Ok, I understand.&lt;/li&gt;
&lt;li&gt;Aha, so if I understand correctly, I can actually &amp;quot;forget&amp;quot; that the concept of timeslots is being used underlying as long as I only do mesh operation, because then the timeslots will always be granted and for the longest period (10 seconds then as you say)? And then just view the mesh communication like advertising &amp;amp; scanning in normal BLE (thus with advertising interval, scanning interval and scan window) but then with the scheduler prioritizing advertising over scanning if they should collide and advertising should take place in that advertising event?&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Thank you!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How does the Mesh SDK use the Timeslot API through advertising &amp; scanning interval?</title><link>https://devzone.nordicsemi.com/thread/117133?ContentTypeID=1</link><pubDate>Tue, 23 Jan 2018 15:10:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:65e3f66e-e1a3-4dc1-9f16-e8492faafc50</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;1 . Yes, correct. However in our beacon example in the Mesh SDK, we also don&amp;#39;t use the Softdevice advertising function, but advertise directly using the Radio, inside timeslot.&lt;/p&gt;
&lt;p&gt;2 . Yes the mesh stack use those interval. You can think of timeslot is the normal state, and the mesh stack running inside that state 99% (maximum timeslot can be extended to is 10seconds I believe, then the Mesh will request another timeslot right after). I don&amp;#39;t know how exactly the scheduler works with Mesh SDK but my understanding is that the scheduler will prioritize advertising over scanning and scheduler will not schedule scanner period if it collides with advertising period.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How does the Mesh SDK use the Timeslot API through advertising &amp; scanning interval?</title><link>https://devzone.nordicsemi.com/thread/117132?ContentTypeID=1</link><pubDate>Mon, 22 Jan 2018 13:42:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:54c4a317-782f-4408-80ac-46b9d414de05</guid><dc:creator>Mathias</dc:creator><description>&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Sorry, I meant non-BLE mesh applications or thus normal BLE applications. For example being able to be both a BLE beacon and a node in a mesh at the same time.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For normal BLE this is indeed needed, as I understand. But does the mesh stack also use these intervals? Or is it just via timeslots? And thus scanning being done at 100 % as long as timeslot is not done? And advertising being done as soon as a timeslot is allocated to advertise the message?&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Thank you for your time!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How does the Mesh SDK use the Timeslot API through advertising &amp; scanning interval?</title><link>https://devzone.nordicsemi.com/thread/117126?ContentTypeID=1</link><pubDate>Mon, 22 Jan 2018 13:07:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8617fc3f-8d5a-4346-90a9-cc295a407665</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Mathias,&lt;/p&gt;
&lt;p&gt;1 . Currently Mesh stack requires the Timeslot mechanism from softdevice to work. However, there is no BLE function from the softdevice is needed or used. So actually requesting and staying in timeslot is the main state (99% if not 100% of the time) of the Mesh device.&lt;/p&gt;
&lt;p&gt;The main purpose of using timeslot is to support GATT bearer in the future as well as other applications that requires BLE. I don&amp;#39;t think supporting &amp;quot;non-BLE devices while also being able to support Mesh SDK&amp;quot; is the main purpose, even though it&amp;#39;s possible. Could you point me to the documentation you got that information ?&lt;/p&gt;
&lt;p&gt;Mesh SDK doesn&amp;#39;t use any BLE feature from the softdevice for advertising and scanning.&lt;/p&gt;
&lt;p&gt;2 .Why do you think advertising interval is not needed ? This interval decide how often a node broadcast a message. By spec there shouldn&amp;#39;t be more than 100 messages per 10 seconds.&lt;/p&gt;
&lt;p&gt;Same with scan interval and scan windows. By default scan window = scan interval (continuous scanning, except when advertising), however it&amp;#39;s possible to change that using the configuration so that we can do something else with the radio or to save power consumption.&lt;/p&gt;
&lt;p&gt;If the timeslot can&amp;#39;t be guaranted at 100% (because we have normal BLE application for example) I believe the scheduler will simply won&amp;#39;t schedule the scan window for that period.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>