<?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 interval problem</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/75229/advertising-interval-problem</link><description>Hello, 
 We are developing a BLE beacon with nRF52810 and SDK17.0.0. I modified the code on the basis of ble_app_beacon. I rewrited m_advertising.adv_modes_config.ble_adv_fast_interval to change advertsing interval and through nRF connect for Android</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 19 May 2021 14:26:03 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/75229/advertising-interval-problem" /><item><title>RE: Advertising interval problem</title><link>https://devzone.nordicsemi.com/thread/310521?ContentTypeID=1</link><pubDate>Wed, 19 May 2021 14:26:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0ddaac9c-7fd8-4a67-99fe-9c781da80517</guid><dc:creator>Hive777</dc:creator><description>&lt;p&gt;Got it! Thanks a lot, Karl!&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Alan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Advertising interval problem</title><link>https://devzone.nordicsemi.com/thread/310498?ContentTypeID=1</link><pubDate>Wed, 19 May 2021 13:57:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:41943a1c-34fc-4ab7-9ad4-80214fc59e3c</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello Alan,&lt;/p&gt;
[quote user="Hive777"]Thanks for your reply and suggestions. &lt;span&gt;I will consider using the new version of the SDK and sniffer tool.&amp;nbsp;&lt;/span&gt;[/quote]
&lt;p&gt;No problem at all, I am happy to help!&lt;br /&gt;The process of familiarizing with the sniffer tool might seem daunting, but I highly recommend it because it is such a powerful tool to wield. It makes debugging of BLE traffic a lot easier.&lt;/p&gt;
[quote user="Hive777"]For my application, can I&amp;nbsp;understand it this way - the RTC stops when&amp;nbsp; the SoftDevice controls the CPU for its event handling, so I got the wrong result?[/quote]
&lt;p&gt;No, this is not quite correct. The RTC it its own peripheral, so it will keep counting.&lt;br /&gt;However, the SoftDevice will control the CPU, so your&amp;nbsp;&lt;em&gt;program&lt;/em&gt; /&amp;nbsp;&lt;em&gt;application&amp;nbsp;&lt;/em&gt;will stop for this duration.&lt;br /&gt;I.e, if you check the RTC tick difference between two consecutive lines in your code, you will sometimes find that the SoftDevice has used the CPU between the first and the second line, and so the program counter will have stopped on the first line for a longer time, for example.&lt;br /&gt;Since your program is dependent on the CPU to proceed, it will have to wait every time the CPU is used by the SoftDevice.&lt;br /&gt;Please do not hesitate to ask if any part of this still should be unclear! :)&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Advertising interval problem</title><link>https://devzone.nordicsemi.com/thread/310480?ContentTypeID=1</link><pubDate>Wed, 19 May 2021 13:31:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:432db205-b71a-4722-8e21-e316136cbb03</guid><dc:creator>Hive777</dc:creator><description>&lt;p&gt;Hello Karl,&lt;/p&gt;
&lt;p&gt;Thanks for your reply and suggestions. &lt;span&gt;I will consider using the new version of the SDK and sniffer tool.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
[quote userid="87869" url="~/f/nordic-q-a/75229/advertising-interval-problem/310454#310454"]since the SoftDevice controls the CPU for its timing-critical event handling your program will be delayed until the SoftDevice has finished its processing, every BLE event. [/quote]
&lt;p&gt;&lt;span&gt;For my application, can I&amp;nbsp;understand it this way - the RTC stops when&amp;nbsp; the SoftDevice controls the CPU for its event handling, so I got the wrong result?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Alan&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Advertising interval problem</title><link>https://devzone.nordicsemi.com/thread/310454?ContentTypeID=1</link><pubDate>Wed, 19 May 2021 12:51:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f105a83f-f41f-4231-8b26-937d78adb79b</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
[quote user=""] SDK17.0.0.&amp;nbsp;[/quote]
&lt;p&gt;We recommend upgrading to SDK v17.0.2 - this is fully compatible with v17.0.0, and contains some bug fixes.&lt;/p&gt;
[quote user=""]I debugged with it and&lt;strong&gt; the result is half of the setup&lt;/strong&gt;, e.g., if I set the adv interval to 300ms, the &lt;span style="font-size:inherit;"&gt;&lt;strong&gt;ms_diff &lt;/strong&gt;is usually about 150.&amp;nbsp;&lt;/span&gt;Can you tell me what the problem is. Thanks in advance.[/quote]
&lt;p&gt;While the thought and implementation here is alright, this will not produce accurate measurements of the time between advertisements and BLE events, since the SoftDevice controls the CPU for its timing-critical event handling your program will be delayed until the SoftDevice has finished its processing, every BLE event. This will therefore only accurately tell you how long has passed since the previous ADV report event was processed in your application.&lt;br /&gt;To measure connection parameters and to see what is happening on-air, I highly recommend making use of &lt;a href="https://www.nordicsemi.com/Software-and-tools/Development-Tools/nRF-Sniffer-for-Bluetooth-LE"&gt;the nRF Sniffer tool&lt;/a&gt;. It is a powerful tool to wield when developing for BLE, and lets you monitor the on-air BLE traffic, so you may see exactly what is being exchanged, and when.&lt;br /&gt;&lt;br /&gt;Could you install the sniffer, create a sniffer device, and provide a sniffer trace of the communication that is happening when you see this issue?&lt;br /&gt;This will make debugging a lot easier.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>