<?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>How to confirm that all packets are received over BLE - nRF52840 SDK16</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/61161/how-to-confirm-that-all-packets-are-received-over-ble---nrf52840-sdk16</link><description>Hi everyone, 
 I have created a custom BLE service with a characteristic and I update the custom value after enabling notifications by calling the ble_cus_custom_value_update function when the app_timer expires. So far it works great and I update the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 08 May 2020 12:41:46 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/61161/how-to-confirm-that-all-packets-are-received-over-ble---nrf52840-sdk16" /><item><title>RE: How to confirm that all packets are received over BLE - nRF52840 SDK16</title><link>https://devzone.nordicsemi.com/thread/248950?ContentTypeID=1</link><pubDate>Fri, 08 May 2020 12:41:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2eeb594a-0575-4a97-af13-5238d6a04aa6</guid><dc:creator>Nikosant03</dc:creator><description>&lt;p&gt;It works great!! Thank you for your support :)&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to confirm that all packets are received over BLE - nRF52840 SDK16</title><link>https://devzone.nordicsemi.com/thread/248945?ContentTypeID=1</link><pubDate>Fri, 08 May 2020 12:28:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9caf02d4-131b-4587-8d03-402d72d4aa17</guid><dc:creator>Karl Ylvisaker</dc:creator><description>[quote user="Nikosant03"]Thank you Karl for your advice!![/quote]
&lt;p&gt;No problem at all Nick, I am happy to help!&lt;/p&gt;
[quote user="Nikosant03"]I do not have experience with nRF sniffer but I know that it is a very useful tool so I will give a try.[/quote]
&lt;p&gt;Great! It is indeed a very useful tool when working with BLE.&lt;/p&gt;
[quote user="Nikosant03"]1. I have built my app based on the ble_peripheral -&amp;gt; ble_app_template example (SDK16). To set the connection interval to 10ms I have to configure the MIN_CONN_INTERVAL? Something like this?[/quote]
&lt;p&gt;Both yes and no - you minimum connection interval is correct, but your maximum connection interval is still 200 ms.&lt;br /&gt;Keep in mind that the peripheral specifies a connection interval(a range of possible connection intervals really), but it is actually the central that determines which interval to use - within the specified range.With your current configuration you may end up with &amp;quot;any&amp;quot; connection interval between 10 - 200 ms.&lt;br /&gt;As such, you should set both MIN_ and MAX_ to 10 ms, to ensure that the central will choose 10 ms intervals.&lt;/p&gt;
[quote user="Nikosant03"]It is better to set the connection interval less than 10ms e.g. 9ms[/quote]
&lt;p&gt;Is this a question? You may have the connection interval be 8.75 ms instead, but it would not mean much of a difference for your application, since new data will only be available every 10 ms.&lt;br /&gt;In general, shorter connection intervals means higher throughput through more radio time, but in turns also increase current consumption.&lt;/p&gt;
[quote user="Nikosant03"]2. At the moment I am using&amp;nbsp;nRF dongle with nRF Connect as central. Is it possible to add an NRF_LOG_INFO at nRF connect, or in general, is it possible to keep track of the received packets and their associated timestamps?[/quote]
&lt;p&gt;Ah, sorry, it seems my last reply was inaccurate on this matter.&lt;br /&gt;If you are using nRF Connect then you should see a log with timestamps at the bottom of the application window. This log will log any notifications about changed characteristic values - so you may use this to monitor value update intervals.&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: How to confirm that all packets are received over BLE - nRF52840 SDK16</title><link>https://devzone.nordicsemi.com/thread/248915?ContentTypeID=1</link><pubDate>Fri, 08 May 2020 11:56:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ab15a0dd-821f-4341-bd70-9d9f51566934</guid><dc:creator>Nikosant03</dc:creator><description>&lt;p&gt;Thank you Karl for your advice!!&lt;/p&gt;
&lt;p&gt;I do not have experience with nRF sniffer but I know that it is a very useful tool so I will give a try. As you said, at least I will be able to verify that the data are being sent correctly. Also, I will verify that central support a connection interval of &amp;lt;10ms&lt;/p&gt;
&lt;p&gt;However,&amp;nbsp; I have two questions:&lt;/p&gt;
&lt;p&gt;1. I have built my app based on the ble_peripheral -&amp;gt; ble_app_template example (SDK16). To set the connection interval to 10ms I have to configure the MIN_CONN_INTERVAL? Something like this?&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#define MIN_CONN_INTERVAL               MSEC_TO_UNITS(10, UNIT_1_25_MS)        
#define MAX_CONN_INTERVAL               MSEC_TO_UNITS(200, UNIT_1_25_MS)       &lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;It is better to set the connection interval less than 10ms e.g. 9ms&lt;/p&gt;
&lt;p&gt;2. At the moment I am using&amp;nbsp;nRF dongle with nRF Connect as central. Is it possible to add an NRF_LOG_INFO at nRF connect, or in general, is it possible to keep track of the received packets and their associated timestamps?&lt;/p&gt;
&lt;p&gt;Thanks in advance&lt;/p&gt;
&lt;p&gt;Nick&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: How to confirm that all packets are received over BLE - nRF52840 SDK16</title><link>https://devzone.nordicsemi.com/thread/248886?ContentTypeID=1</link><pubDate>Fri, 08 May 2020 10:03:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:98ff4661-b7ac-4c39-8dbe-223f4b08e627</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello Nick,&lt;/p&gt;
[quote user=""]How could I verify that no data are lost and the custom value is updated every 10ms? I want to ensure that central receives all the packets.[/quote]
&lt;p&gt;First off all, you will need to set your connection interval to 10 ms for the BLE communication to happen often enough. If you are connecting to a smartphone central you should also ensure that the smartphone supports the specified connection interval - some older versions of Androids/iOS does not support &amp;lt; 15 ms, for example.&lt;br /&gt;&lt;br /&gt;For checking that the value is updated often enough: are you familiar with using the &lt;a href="https://www.nordicsemi.com/Software-and-tools/Development-Tools/nRF-Sniffer-for-Bluetooth-LE"&gt;nRF Sniffer&lt;/a&gt;? It will allow you to monitor all ongoing BLE Traffic - which would easily verify that the data is being sent at the correct interval.&lt;br /&gt;Keep in mind that the sniffer might get packets that never arrive at the central, and vice verse.&lt;br /&gt;You could also add an NRF_LOG_INFO statement on the central side, so that you may see a timestamp for ever received packet.&lt;br /&gt;&lt;br /&gt;For completeness, I will also mention that packet loss/corruption is possible in BLE communication, and depends heavily on the environment in which the devices are operating in. In an environment with low wireless interference and direct line-of-sight between devices it should not be a problem.&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>