<?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>Understanding the roles of central / peripheral in terms of unique application</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/34300/understanding-the-roles-of-central-peripheral-in-terms-of-unique-application</link><description>So I have my custom board up and running (nrf51822) pluged into the nrf51DK with RTT debug comm and uart comm working, also starting some initial experimentation. 
 
 
 
 I&amp;#39;m trying to understand the roles of central and peripeheral devices and my use</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 15 May 2018 08:40:06 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/34300/understanding-the-roles-of-central-peripheral-in-terms-of-unique-application" /><item><title>RE: Understanding the roles of central / peripheral in terms of unique application</title><link>https://devzone.nordicsemi.com/thread/131983?ContentTypeID=1</link><pubDate>Tue, 15 May 2018 08:40:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:df4962f1-ee82-4650-9cb8-ea28ed7b8236</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Unfortunately, scanning is a power consuming task, as it needs to turn on the radio for a significant amount of time, unlike advertising or being in a connection. This is why cellphones or other devices with larger batteries usually acts as the central device.&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t know how sensitive your devices need to be. If you can afford that the devices don&amp;#39;t need to connect immediately, you can have a shorter scanning window. I am not sure whether you have seen this &lt;a href="https://devzone.nordicsemi.com/b/blog/posts/bluetooth-smart-and-the-nordics-softdevices-part-1"&gt;advertising blog post&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;As you can see there, the detection of an advertisement requires that you scan while the advertisement is sent. Unfortunately, you can&amp;#39;t say that you only want advertisements from devices closer than 2 feet, but you can check the RSSI to get a rough distance. You need to test a bit to see what RSSI values that is equivalent to 2 feet.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I can&amp;#39;t say what advertising and scanning intervals you should use, but keep in mind that the more the radio on the scanning device is on, the more battery it uses.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Let us say that you advertise every 1s, then you could scan for 1 second every 10s or so. but I don&amp;#39;t know if that is too long of a scan interval, if two devices passes by one another in less than 10s.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Understanding the roles of central / peripheral in terms of unique application</title><link>https://devzone.nordicsemi.com/thread/131896?ContentTypeID=1</link><pubDate>Mon, 14 May 2018 13:50:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:76d93388-731d-463f-97b6-001af15c11e9</guid><dc:creator>GeorgeM</dc:creator><description>&lt;p&gt;Great info, Thanks,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m curious if there is any clever tricks to save power if i have a continuous scan window.&amp;nbsp;&amp;nbsp;&amp;nbsp; Since the device only needs to transmit when in range of less than 1-2ft but not any further away. unfortunately I can&amp;#39;t request user input (e: button presses etc to initiate scanning) it needs to just be scanning constantly.&lt;/p&gt;
&lt;p&gt;I see that the receive power is locked to 31ma? there&amp;#39;s no way to decrease that?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Understanding the roles of central / peripheral in terms of unique application</title><link>https://devzone.nordicsemi.com/thread/131885?ContentTypeID=1</link><pubDate>Mon, 14 May 2018 13:05:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:10c3c76d-f87e-41ca-8212-59c404c82565</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;1)&lt;/p&gt;
&lt;p&gt;You have to tell the device to scan. But you can do this while you are advertising. Just look in any of the ble_central examples on how to set up scanning. Scanning window and scanning interval are two keywords you should look up.&lt;/p&gt;
&lt;p&gt;2)&lt;/p&gt;
&lt;p&gt;Well. a peripheral is the device that is advertising, while the central is scanning. However, as I mentioned, you can act as both in one device. however, if both the devices are identical, you do risk of getting two connections between the same two devices, where both devices has a link where it acts as a peripheral, and another link where it is the central. Maybe it helps to just tell the device that it should not request a connection if it is already in one, but you will have to test this.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you want to check out the simultaneous scanning and advertising, I suggest you look at the example found in:&lt;/p&gt;
&lt;p&gt;SDK\ble_central_and_peripheral\experimental\ble_app_hrs_rscs_relay&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;For the big data transfers, you will have to enter a connection (a couple of hundred bytes will take some if you only use advertising.The rest looks like you can do only with advertising.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>