<?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>Scanning, Multiple advertisement, varying payloads.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/61588/scanning-multiple-advertisement-varying-payloads</link><description>We need to build a device that acts as a peripheral (with some custom characteristic to transfer data toward a smartphone and having OTA/DFU functionalities), as a beacon with changing payload (not connectable and not scannable), and passive scanner,</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 22 May 2020 13:09:12 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/61588/scanning-multiple-advertisement-varying-payloads" /><item><title>RE: Scanning, Multiple advertisement, varying payloads.</title><link>https://devzone.nordicsemi.com/thread/251270?ContentTypeID=1</link><pubDate>Fri, 22 May 2020 13:09:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:21268531-7b14-454c-8284-d85df9a227ef</guid><dc:creator>Edvin</dc:creator><description>[quote user="DavideDN"]Can these priorities be tuned? Does it make sense to do it, or it would be better to relay on the default one you mentioned?[/quote]
&lt;p&gt;&amp;nbsp;Unfortunately, no. They can not be tuned. The softdevice takes full control of these priorities. You can read about the priorities &lt;a href="https://infocenter.nordicsemi.com/topic/sds_s132/SDS/s1xx/multilink_scheduling/priorities_and_events_intro.html" rel="noopener noreferrer" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;There is also another page with some &lt;a href="https://infocenter.nordicsemi.com/topic/sds_s132/SDS/s1xx/multilink_scheduling/suggested_intervals_windows_s132.html" rel="noopener noreferrer" target="_blank"&gt;suggested intervals and windows&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Scanning, Multiple advertisement, varying payloads.</title><link>https://devzone.nordicsemi.com/thread/251019?ContentTypeID=1</link><pubDate>Wed, 20 May 2020 13:59:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2dfc27bc-b2c7-469a-aa1c-f1a608d144ae</guid><dc:creator>DavideDN</dc:creator><description>&lt;p&gt;Thak you Edvin.&lt;/p&gt;
&lt;p&gt;Yes, our need is to merge a &amp;quot;normal&amp;quot; peripheral and a pure beacon (with the beacon having a dynamic payload) and a pure scanner.&lt;/p&gt;
&lt;p&gt;Regarding the fact that we have a single radio: this was already crystal clear, of course we cannot do two things at a time. Anyway thank you for the explanation of the scan window slot policy and constrains. Indeed I was naively thinking that scan was kind of a background activity that maybe was always active whenever no other TX(adv or connection) or RX(connection) activity was underway. Now I have more hints to select the scan interval and window.&lt;/p&gt;
&lt;p&gt;We need to scan 100% of the (available/remaining) time, even during connection, so after your explanation I am thinking about the scheduling of:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;connection events,&lt;/li&gt;
&lt;li&gt;advertising events&lt;/li&gt;
&lt;li&gt;and scanning events&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You explained that there are dynamic policies to assign the right priorities. But since the &amp;quot;standard operation&amp;quot; for a BLE device would be to act as only one of these at a time, maybe in our use case the priorities needs to be tuned to better suit our use scenario?&lt;/p&gt;
&lt;p&gt;Can these priorities be tuned? Does it make sense to do it, or it would be better to relay on the default one you mentioned?&lt;/p&gt;
&lt;p&gt;Thank you in advance.&lt;/p&gt;
&lt;p&gt;Davide&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Scanning, Multiple advertisement, varying payloads.</title><link>https://devzone.nordicsemi.com/thread/250986?ContentTypeID=1</link><pubDate>Wed, 20 May 2020 12:51:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5ab08a87-0ab9-4653-acfc-72cd2c4dfb55</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello Davide,&lt;/p&gt;
&lt;p&gt;So you want to advertise as a beacon even when you are not connected to the phone, right?&lt;/p&gt;
&lt;p&gt;The softdevice can only deal with one advertising set at the time. That being said, you are free to change between two advertising sets at any time (e.g. every 100-300ms). So when you are advertising with the beacon and the connectable advertisements, you need to &amp;quot;manually&amp;quot; switch between the two. When you are connected, you can use only the beacon advertisements.&lt;/p&gt;
&lt;p&gt;You should be aware of one thing. Since the nRF only has one radio, it can only do one thing at once, receive or transmit. This means that you can only scan or advertise at once. You can do it seemingly simultaneously, but the softdevice will have to prioritize either the advertisement or the scan window if they are colliding. I am only saying this so you can consider your scan window and scan interval at an early stage, before you are seeing a lot of packet drops. The softdevice will only schedule entire scan windows, so if you set the scan window to 1 second, you can not use the radio for anything else this second, which means you will not be able to advertise. Equally, if the softdevice decides to skip this scan window, you will not see any advertising intervals until the next scan interval.&lt;/p&gt;
&lt;p&gt;The softdevice has a dynamic scheduler, so it will increase the priority for advertising or scanning if that was skipped the last time.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;So for your question:&lt;/p&gt;
&lt;p&gt;I believe that some advertising update API came a couple of Softdevice releases ago. But you need to use this in your application. Check out&amp;nbsp;ble_advertising_advdata_update() and try to use this in combination with a timer to change between connectable and beacon advertisements.&lt;/p&gt;
&lt;p&gt;&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>