<?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>The effects of slave latency</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/34174/the-effects-of-slave-latency</link><description>I&amp;#39;m trying to use slave latency to reduce current consumption of my device. 
 Connection parameters defined in `main.c`: 
 #define MIN_CONN_INTERVAL MSEC_TO_UNITS(15, UNIT_1_25_MS) #define MAX_CONN_INTERVAL MSEC_TO_UNITS(30, UNIT_1_25_MS) #define SLAVE_LATENCY</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 18 May 2018 00:22:22 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/34174/the-effects-of-slave-latency" /><item><title>RE: The effects of slave latency</title><link>https://devzone.nordicsemi.com/thread/132452?ContentTypeID=1</link><pubDate>Fri, 18 May 2018 00:22:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6a8be89b-d9f7-4d44-be90-d418bd447317</guid><dc:creator>andrey</dc:creator><description>&lt;p&gt;Thanks updating the connection parameters at BLE_GAP_EVT_CONNECED has worked.&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s the code:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static void on_ble_evt(ble_evt_t * p_ble_evt)
{
    uint32_t err_code;

    switch (p_ble_evt-&amp;gt;header.evt_id) {
        case BLE_GAP_EVT_CONNECTED:
            err_code = bsp_indication_set(BSP_INDICATE_CONNECTED);
            APP_ERROR_CHECK(err_code);
            m_conn_handle = p_ble_evt-&amp;gt;evt.gap_evt.conn_handle;
        
            // ADDED THIS
            ble_gap_conn_params_t p_conn_params;
            p_conn_params.min_conn_interval = p_ble_evt-&amp;gt;evt.gap_evt.params.connected.conn_params.min_conn_interval;
            p_conn_params.max_conn_interval = p_ble_evt-&amp;gt;evt.gap_evt.params.connected.conn_params.max_conn_interval;
            p_conn_params.slave_latency     = SLAVE_LATENCY;
            p_conn_params.conn_sup_timeout  = p_ble_evt-&amp;gt;evt.gap_evt.params.connected.conn_params.conn_sup_timeout;

            err_code = sd_ble_gap_conn_param_update(m_conn_handle, &amp;amp;p_conn_params);
            APP_ERROR_CHECK(err_code);
            //
        
            break;

        case BLE_GAP_EVT_DISCONNECTED:
            m_conn_handle = BLE_CONN_HANDLE_INVALID;
            break;
        
        case BLE_GAP_EVT_CONN_PARAM_UPDATE:
            break;

        default:
            // No implementation needed.
            break;
    }
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The effects of slave latency</title><link>https://devzone.nordicsemi.com/thread/131433?ContentTypeID=1</link><pubDate>Wed, 09 May 2018 03:48:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cb4e40d2-6ca4-4760-b292-7abe234c33ed</guid><dc:creator>jing</dc:creator><description>&lt;p&gt;You should first check the effective connection parameter on BLE_GAP_EVT_CONNECTED.&lt;/p&gt;
&lt;p&gt;Assuming that you are using ble_conn_params.c module, take note that it only checks for the connection interval.&amp;nbsp; As long as the effective connection interval is within your desired min and max, it will not initiate a Connection Parameter Update Request.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;jing&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>