<?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>Scalability of the scan function</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/14926/scalability-of-the-scan-function</link><description>We are implementing scan functionality in nRF51. I would like to understand if anyone has tested or tried to scale this functionality when there are thousands of beacons around. So lets say in a set up where we have thousands of beacons scattered near</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 05 Jul 2016 14:31:26 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/14926/scalability-of-the-scan-function" /><item><title>RE: Scalability of the scan function</title><link>https://devzone.nordicsemi.com/thread/56960?ContentTypeID=1</link><pubDate>Tue, 05 Jul 2016 14:31:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e7c81062-8363-4975-b448-93a4be905b21</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;Hi Prasanna&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t think we have made experiments with hundreds or event thousands of beacons within range of each other, so my answer is purely based on theory.&lt;/p&gt;
&lt;p&gt;I suspect the bottleneck for how many beacons can be advertising in the same area is the on-air packet collision probability.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;BLE beacons are BLE advertising packets.&lt;/li&gt;
&lt;li&gt;Each BLE beacon transmits a single advertising packet on three different advertising channels, i.e. three packets in total.&lt;/li&gt;
&lt;li&gt;The scanner will listen to one advertising channel when the beacon advertises on the three channels.&lt;/li&gt;
&lt;li&gt;Each beacon packet transmission takes around 1 millisecond.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So the on-air collision probability is mostly dependent on the advertising interval you set for your beacons. If you e.g. set beacon to advertise every 1 second, it will occupy 1/1000 of the time domain of each advertising channel. If you have 500 beacons with 1 second advertising inteval, I would guess that you are already at 50% packet collision rate. With 1000 beacons advertising in the range of each other, you are most likely losing most of the packets. This is the most basic probability theory, but perhaps gives an idea to what degree this can be scaled.&lt;/p&gt;
&lt;p&gt;I suspect the scanner will be fast enough, as I would say it gets at least 2 milliseconds to process each beacon message, which is relatively long time, unless you plan to do a lot of processing in the application once you receive the advertising report.&lt;/p&gt;
&lt;p&gt;The nRF51 &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s130.sds/dita/softdevices/s130/ble_processor_avail_interrupt_latency/ble_scanner_performance.html?cp=3_6_2_0_15_2_2_2"&gt;CPU is mostly available during scanning events&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>