<?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>Advertising/Scanning Problems</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/7003/advertising-scanning-problems</link><description>Issue is similar to
 devzone.nordicsemi.com/.../ 
 I&amp;#39;m developing an application based on latest SoftDevice 130_1.0.0 and using two or more DevKits.
My application starts advertising and scanning simultaneously with parameters: 
 adv_params.type </description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 02 May 2016 07:20:08 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/7003/advertising-scanning-problems" /><item><title>RE: Advertising/Scanning Problems</title><link>https://devzone.nordicsemi.com/thread/24698?ContentTypeID=1</link><pubDate>Mon, 02 May 2016 07:20:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2e1c1486-0f86-408f-870d-9b95928b8478</guid><dc:creator>Milan</dc:creator><description>&lt;p&gt;Hi petter,&lt;/p&gt;
&lt;p&gt;what will happen if
&lt;strong&gt;scan interval = 3.125ms
scan window = 2.5ms
advt interval = 20ms&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I am trying to understand it more deeply.
Your help will be appreciated.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Advertising/Scanning Problems</title><link>https://devzone.nordicsemi.com/thread/24697?ContentTypeID=1</link><pubDate>Sun, 14 Jun 2015 14:47:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e7e5150c-79a2-4e58-9cd0-c217fc3510ef</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;ol start="2"&gt;
&lt;li&gt;Edit 17.06.2015, my  previous clarification of the behavior was incorrect. Sorry. Please see below.&lt;/li&gt;
&lt;/ol&gt;
&lt;blockquote&gt;
&lt;p&gt;Could you clarify behavior at the next
timings: - adv interval: 100mS - scan
window: 200mS - scan interval: 600mS&lt;/p&gt;
&lt;p&gt;Let assume that scan starts first,
then: 0-200ms scanning&lt;/p&gt;
&lt;p&gt;~200 adv&lt;/p&gt;
&lt;p&gt;~300 adv&lt;/p&gt;
&lt;p&gt;~400 adv&lt;/p&gt;
&lt;p&gt;~500 adv&lt;/p&gt;
&lt;p&gt;~600 adv&lt;/p&gt;
&lt;p&gt;800-100 scanning&lt;/p&gt;
&lt;p&gt;and so on...&lt;/p&gt;
&lt;p&gt;So, is in correct?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;advertising interval = advInt = 100ms
random delay = ranDel = 0-10ms&lt;/p&gt;
&lt;p&gt;You start with a scan of 200ms, after the scan window ends the scanner will try to schedule a timeslot for the next scan window, 400ms later.&lt;/p&gt;
&lt;p&gt;The ~0ms advertising event is blocked, since a scan is ongoing. The advertiser will try to schedule a timeslot one advInt+ranDel later. It will be blocked again, then the advertiser will try to schedule a timeslot advInt+ranDel later, and it will succeed. When the advertising event ends the advertiser will try to schedule a timeslot for the next advertising event, advInt+ranDel after the start of the previous one. It will succeed. And so on.&lt;/p&gt;
&lt;p&gt;There is a scan window scheduled to start at 600ms. So when the advertiser tries to schedule a timeslot inside it, it will be blocked. The advertiser will try to schedule a timeslot one advInt+ranDel later. If it is blocked it will try to schedule a timeslot one advInt+ranDel later. And so on.&lt;/p&gt;
&lt;ol start="3"&gt;
&lt;li&gt;I have just tried an advertising interval of 20 ms, scan window=scan interval=100ms, and scan before advertise with both &lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/Adv20ms_2C00_-Scanint_3D00_scanwin_3D00_100ms.pcapng"&gt;s130_nrf51_1.0.0-3.alpha_softdevice.hex&lt;/a&gt; and &lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/6761.Adv20ms_2C00_-Scanint_3D00_scanwin_3D00_100ms.pcapng"&gt;s130_nrf51_1.0.0_softdevice.hex&lt;/a&gt;. They are both advertising and their behavior seem identical in the sniffer log.&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Advertising/Scanning Problems</title><link>https://devzone.nordicsemi.com/thread/24696?ContentTypeID=1</link><pubDate>Thu, 04 Jun 2015 13:04:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6a3f94c7-1443-4afb-86a7-6d4e05594b45</guid><dc:creator>Yaroslav</dc:creator><description>&lt;p&gt;yes, I can but it looks unstable when changing order changes behavior.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Advertising/Scanning Problems</title><link>https://devzone.nordicsemi.com/thread/24695?ContentTypeID=1</link><pubDate>Thu, 04 Jun 2015 12:59:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c2a5f4a3-9f8e-493e-8018-bb318d092077</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Hi Yaroslav,
Unfortunately this issue will take time to analyze as this is claimed to be related to scheduler. you said you can make it working by advertising first.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Advertising/Scanning Problems</title><link>https://devzone.nordicsemi.com/thread/24694?ContentTypeID=1</link><pubDate>Thu, 04 Jun 2015 10:08:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4e32e3fa-4303-4030-ab6d-e6a792a3e3c8</guid><dc:creator>Yaroslav</dc:creator><description>&lt;p&gt;Thank Aryan, do you have any news regarding the issue? This problem seriously affects our product so we must solve it very fast, as a result I would appreciate your feedback. If that is helpful - please tell me what exactly I should do to provide you an extra information which might help your team.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Advertising/Scanning Problems</title><link>https://devzone.nordicsemi.com/thread/24693?ContentTypeID=1</link><pubDate>Mon, 01 Jun 2015 06:43:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:93140dab-3f06-4e71-ad91-03a001583a81</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Yaroslav,
I will bring your comments to engineer&amp;#39;s notice.
Thanks for your time.&lt;/p&gt;
&lt;p&gt;/Susheel&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Advertising/Scanning Problems</title><link>https://devzone.nordicsemi.com/thread/24692?ContentTypeID=1</link><pubDate>Sun, 31 May 2015 09:05:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fe976ba0-bfd2-40af-abf0-81dc80bc8456</guid><dc:creator>Yaroslav</dc:creator><description>&lt;p&gt;Regarding to &amp;quot;3) I am told that nothing in scheduling in this scenario has changed between two releases you mentioned...&amp;quot;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;I still believe that something was changed. My app that successfully works on previous SD versions but doesn&amp;#39;t on latest S130_1.0. I mean that app doesn&amp;#39;t advertise at:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Non-connected state&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;adv interwal is 20mS&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;scan window = scan interval = 100ms&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;app starts scan before advertise.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I repeat again that this scheme works fine on older SD and it was not some short tries but I used my app for months.&lt;/p&gt;
&lt;p&gt;Now I can make it working when switch starting scan with adv - meaning starting adv before scan. anyway I can say that something still was changed in scheduler. Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Advertising/Scanning Problems</title><link>https://devzone.nordicsemi.com/thread/24688?ContentTypeID=1</link><pubDate>Wed, 20 May 2015 13:54:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:09ca3a7a-f800-446b-9ed3-a7da349f1e4e</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;I also want to mention that the advertising interval is not exactly 100ms, please see &lt;a href="https://devzone.nordicsemi.com/question/38250/ble-advertisement-rate-actual-rate-do-not-match/"&gt;this&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Advertising/Scanning Problems</title><link>https://devzone.nordicsemi.com/thread/24689?ContentTypeID=1</link><pubDate>Wed, 20 May 2015 13:53:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:baf65d94-d781-4bac-aed6-dba52f0df76f</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;If you have a scan interval of 600 ms the second scan window will start at 600 ms timestamp, except if there is an advertising event is on going at that time. Then it will start after that event. Then the next scan window will start 600 ms after the start of the previous scan window(if there is no advertising event happening at that time).&lt;/p&gt;
&lt;p&gt;It&amp;#39;s a little bit different if you are in a connection, the connection event needs to be handled at specific times (connection interval). It can&amp;#39;t be shifted. The connection events have lower priority than scaning and advertising so it will be dropped instead. However, the connection event closest to the connection supervision timeout will get the highest priority and won&amp;#39;t be dropped.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Advertising/Scanning Problems</title><link>https://devzone.nordicsemi.com/thread/24691?ContentTypeID=1</link><pubDate>Tue, 19 May 2015 17:55:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:46d6806e-bebc-4869-a670-9d25564aeb8f</guid><dc:creator>Yaroslav</dc:creator><description>&lt;p&gt;These all things happen during connection. Does connection have some affect on adv or scan?
I didn&amp;#39;t notice such behavior during disconnected state.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Advertising/Scanning Problems</title><link>https://devzone.nordicsemi.com/thread/24690?ContentTypeID=1</link><pubDate>Tue, 19 May 2015 17:50:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:52e49d3c-78fd-4199-a423-745f13b53f1b</guid><dc:creator>Yaroslav</dc:creator><description>&lt;ol start="2"&gt;
&lt;li&gt;Could you clarify behavior at the next timings:&lt;/li&gt;
&lt;/ol&gt;
&lt;ul&gt;
&lt;li&gt;adv interval: 100mS&lt;/li&gt;
&lt;li&gt;scan window: 200mS&lt;/li&gt;
&lt;li&gt;scan interval: 600mS&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Let assume that scan starts first, then:
0-200ms  scanning&lt;/p&gt;
&lt;p&gt;~200 adv&lt;/p&gt;
&lt;p&gt;~300 adv&lt;/p&gt;
&lt;p&gt;~400 adv&lt;/p&gt;
&lt;p&gt;~500 adv&lt;/p&gt;
&lt;p&gt;~600 adv&lt;/p&gt;
&lt;p&gt;800-100 scanning&lt;/p&gt;
&lt;p&gt;and so on...&lt;/p&gt;
&lt;p&gt;So, is in correct?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Advertising/Scanning Problems</title><link>https://devzone.nordicsemi.com/thread/24687?ContentTypeID=1</link><pubDate>Fri, 15 May 2015 08:14:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b2dbc166-957c-4ceb-b3c0-18bdc9ee2124</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;The adv intervals have random delay added internally, but scan intervals do not have this random delay. if two scanner/adv device are start at same time, both will scan or adv at the sametime, hence you will not see any adv reports. eventually, adv will overlap over its device scan window and if lucky &amp;#39;other&amp;#39; device adv shouldn&amp;#39;t overlap its scanner, then the &amp;#39;other&amp;#39; device will get adv report. We are talking about a very small random delay added to adv on each side and over time we see that these two gets placed far enough to see each other adv data.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;that is also expected.... when adv role overlaps scan role, it round robins, its all random here, there will be periods of low adv rate, and periods of normal adv rate. The low rate is dependent on scan window and adv interval. if adv interval is smaller than scan window, many adv will be missing. It is always adviced to use lowest scan interval and scan window when you require continous scanning so that other roles can get chance early (not be displace by large scan window size)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;I am told that nothing in scheduling in this scenario has changed between two releases you mentioned. It could be a coincidence. Can you observe this in MCP with continuous scanning and see if you are really missing adv packets completely.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Advertising/Scanning Problems</title><link>https://devzone.nordicsemi.com/thread/24686?ContentTypeID=1</link><pubDate>Mon, 11 May 2015 18:59:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:74da758f-40fc-479e-a3a7-71d44a33837e</guid><dc:creator>Yaroslav</dc:creator><description>&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Of course, device using one antenna and radio module can&amp;#39;t transmit and receive at the same time. But I was sure that nRF can switch to advertising during scan window. My investigations shows me that nRF doesn&amp;#39;t transmit data during scan window at all.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;I understand this behavior but again question #1.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Yes, but it is not reproducible on &lt;em&gt;S130_1.0.0.3 Alfa&lt;/em&gt;, but it is on &lt;em&gt;S130_1.0.0&lt;/em&gt; recently released&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Advertising/Scanning Problems</title><link>https://devzone.nordicsemi.com/thread/24685?ContentTypeID=1</link><pubDate>Mon, 11 May 2015 14:47:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f5c3212c-ddf2-4420-8bc2-edd60fd15b54</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;ol&gt;
&lt;li&gt;The device cannot scan and advertise at the same time, but they are multiplexed over the timeline.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;2)when you reset boards at different time, then scanner and advertiser on each boards start at different time. So the scanner on one board can see the advertiser on the other. This has also happened due to many factor, like how far did you reset these boards, scan interval and advertising interval.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>