<?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>Sending lots of data using notifications in a loop, data rate slows down after few seconds? (FreeRTOS based app)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/55019/sending-lots-of-data-using-notifications-in-a-loop-data-rate-slows-down-after-few-seconds-freertos-based-app</link><description>Hello, 
 this question has been probably asked many times, but I could not find any good matches using the search. 
 My setup: I am using nRF52832, latest SDK 16.0.0 and a test application based on the FreeRTOS HRS example from the SDK. 
 I want to test</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 29 Nov 2019 12:58:43 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/55019/sending-lots-of-data-using-notifications-in-a-loop-data-rate-slows-down-after-few-seconds-freertos-based-app" /><item><title>RE: Sending lots of data using notifications in a loop, data rate slows down after few seconds? (FreeRTOS based app)</title><link>https://devzone.nordicsemi.com/thread/222818?ContentTypeID=1</link><pubDate>Fri, 29 Nov 2019 12:58:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9662bedf-ba2c-419a-9ce4-386663d6f049</guid><dc:creator>TylerD</dc:creator><description>&lt;p&gt;I agree that there could be some use for this like you said, to speed up the service discovery for example and then switch to slower&amp;nbsp;interval to save power.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;However, in my experience it is typically the central that should be responsible for this. For example, when testing with an Android phone (OnePlus 5) I&amp;#39;ve noticed that when I connect to a peripheral, the phone (i.e. the central) is toggling the connection parameters in the beginning. Having toggling on the peripheral side seems a bit odd for me, and in worst case both the central and the peripheral can be requesting connection parameter updates which would result in a mess.&lt;/p&gt;
&lt;p&gt;Now that I found the hidden feature in the example it is easy to fix, but it cost me 1-2 hours of extra debugging time.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sending lots of data using notifications in a loop, data rate slows down after few seconds? (FreeRTOS based app)</title><link>https://devzone.nordicsemi.com/thread/222814?ContentTypeID=1</link><pubDate>Fri, 29 Nov 2019 12:51:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:516b0144-3c6b-48d3-b475-de122b921590</guid><dc:creator>mrono</dc:creator><description>[quote userid="78353" url="~/f/nordic-q-a/55019/sending-lots-of-data-using-notifications-in-a-loop-data-rate-slows-down-after-few-seconds-freertos-based-app/222774"] what is the point[/quote]
&lt;p&gt;I think the point is that often you&amp;#39;d like to connect using a fairly short interval, so that the initial data exchange, potentially including a lengthy service discovery, happens fast. Then switch to the interval you actually want to use.&lt;/p&gt;
&lt;p&gt;But I do agree that the way it is done in many examples is pretty &amp;#39;hidden&amp;#39;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sending lots of data using notifications in a loop, data rate slows down after few seconds? (FreeRTOS based app)</title><link>https://devzone.nordicsemi.com/thread/222774?ContentTypeID=1</link><pubDate>Fri, 29 Nov 2019 11:38:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:936fe695-94dd-4f83-adf8-f8269e9c4d3b</guid><dc:creator>TylerD</dc:creator><description>&lt;p&gt;Argh... after&amp;nbsp;some hair pulling I found out that the FreeRTOS example is changing connection parameters on the fly. And the first change occurs at 5 seconds mark. I don&amp;#39;t get it, what is the point of adding this kind of hidden features in the examples. For me, it just complicates things and causes unnecessary confusion.&lt;/p&gt;
&lt;p&gt;This is the relevant piece of code of the FreeRTOS HRS main.c -&amp;gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;/**@brief Function for initializing the Connection Parameters module. */
static void conn_params_init(void)
{
    ret_code_t             err_code;
    ble_conn_params_init_t cp_init;

    memset(&amp;amp;cp_init, 0, sizeof(cp_init));

    cp_init.p_conn_params                  = NULL;
    cp_init.first_conn_params_update_delay = FIRST_CONN_PARAMS_UPDATE_DELAY;
    cp_init.next_conn_params_update_delay  = NEXT_CONN_PARAMS_UPDATE_DELAY;
    cp_init.max_conn_params_update_count   = MAX_CONN_PARAMS_UPDATE_COUNT;
    cp_init.start_on_notify_cccd_handle    = m_hrs.hrm_handles.cccd_handle;
    cp_init.disconnect_on_fail             = false;
    cp_init.evt_handler                    = on_conn_params_evt;
    cp_init.error_handler                  = conn_params_error_handler;

    err_code = ble_conn_params_init(&amp;amp;cp_init);
    APP_ERROR_CHECK(err_code);
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Value of&amp;nbsp;FIRST_CONN_PARAMS_UPDATE_DELAY is set to 5000ms.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I think I&amp;#39;ll try to strip the entire &amp;quot;connection parameters&amp;quot; module from the code, I don&amp;#39;t see any use for this kind of clutter.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>