<?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>S132 Central Scanner Performance</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/30274/s132-central-scanner-performance</link><description>I am using the S132 Central + Peripheral Relay example as a basis for my tests. I have a peripheral advertising at an interval of 20ms. I verified this timing using a BLE sniffer, so I know that part is working. The NRF52832 is setup using a scan interval</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 08 Feb 2018 10:11:57 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/30274/s132-central-scanner-performance" /><item><title>RE: S132 Central Scanner Performance</title><link>https://devzone.nordicsemi.com/thread/120238?ContentTypeID=1</link><pubDate>Thu, 08 Feb 2018 10:11:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eca533a9-70c5-4447-9e04-050bb384b56f</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello &lt;a href="https://devzone.nordicsemi.com/members/jmag999"&gt;jmag999&lt;/a&gt;,&lt;/p&gt;
&lt;p&gt;I find it strange that when you advertise on 20ms intervals, and scan on 6.25, it would sometimes take up to 150+ms between the detected advertisements.&lt;/p&gt;
&lt;p&gt;As you may know, a device advertises on three different channels each advertising interval.&amp;nbsp;An advertising event will typically look like this:&lt;/p&gt;
&lt;p&gt;&lt;img height="283" src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-38be929288a44856a8bea19e84b3637b/pastedimage1518084280380v2.png" width="406" alt=" " /&gt;&amp;nbsp;(from the online power &lt;a href="https://devzone.nordicsemi.com/power/" rel="noopener noreferrer" target="_blank"&gt;profiling calculator&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;Each of the three spikes is the actual advertisements on each of the three channels. The length of these may vary depending on the length of the advertising packet. This length is for 31 bytes of advertising payload.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Now, a scanner will scan on one channel each scan interval/window, then it will change to the next advertising channel, and scan there for the next scan window. This means that even if you scan 100% of the time (scan interval = scan window), there will still be a short amount of time where it stops scanning and&amp;nbsp; changes channel before starting scanning. As you see, an advertisement on one channel takes roughly 1ms. This means that if the end of scan window occurs in the middle of the advertisement, you will not receive that advertisement (the event&amp;nbsp;BLE_GAP_EVT_ADV_REPORT).&lt;/p&gt;
&lt;p&gt;Since you change channel every 6.25ms, this could occur quite often, about 1 in 6 times. Also note that there is a random time delay between each advertisement from 0-10ms (required by spec), so that if you are unlucky, you may get several of these in a row.&lt;/p&gt;
&lt;p&gt;One way of improving the number of&amp;nbsp;BLE_GAP_EVT_ADV_REPORTs, is to increase your scan interval and scan window. If you set it to 100ms instead of 6.25, you will have a lot less switching channel-events, and you can still receive several&amp;nbsp;BLE_GAP_EVT_ADV_REPORTs in one scan interval.&lt;/p&gt;
&lt;p&gt;Try this, and see if that helps.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: S132 Central Scanner Performance</title><link>https://devzone.nordicsemi.com/thread/120175?ContentTypeID=1</link><pubDate>Wed, 07 Feb 2018 21:28:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:34d552ca-9d11-4b93-97fa-89346af93849</guid><dc:creator>jmag999</dc:creator><description>&lt;p&gt;As a follow-up to this, I setup this equipment in a RF chamber.&amp;nbsp; I set my phone up to advertise at 100ms interval.&amp;nbsp; With the Nordic set for scan interval and window value of 6.25ms, I was still missing advertisements.&amp;nbsp; Most came in at 100ms, but many came in at 200ms gaps as well.&amp;nbsp; Is there something in the example that can cause this?&amp;nbsp; I would have expected to see them at 100ms every time in this environment.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>