<?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>is DLE enabled by default in SoftDevice s140 ?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/39312/is-dle-enabled-by-default-in-softdevice-s140</link><description>Hello! 
 I went through the example project &amp;quot;Experimental: ATT_MTU Throughput Example&amp;quot; provided in SDK v15.2.0 and found that there is a configuration bit in BLE_COMMON_OPTS that allows to enable / disable the Data Length Extension (DLE) for BLE 4.2 and</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sat, 13 Oct 2018 16:45:29 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/39312/is-dle-enabled-by-default-in-softdevice-s140" /><item><title>RE: is DLE enabled by default in SoftDevice s140 ?</title><link>https://devzone.nordicsemi.com/thread/152764?ContentTypeID=1</link><pubDate>Sat, 13 Oct 2018 16:45:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3b28ff4f-fee3-4bf3-b1b2-144df2c398ba</guid><dc:creator>Magoo</dc:creator><description>&lt;p&gt;Hi Marjeris,&lt;/p&gt;
&lt;p&gt;thank you for your clarification. I tried it and can confirm all the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;In order to increase the on-air packet data length it is not necessary to enable the &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.sds/dita/softdevices/s130/multilink_scheduling/extend_connection_event.html?cp=2_3_1_0_14_6" rel="noopener noreferrer" target="_blank"&gt;Connection Event Length Extension&lt;/a&gt;&amp;nbsp;or to change any other parameter&lt;/li&gt;
&lt;li&gt;it suffices to do one of the two following things:
&lt;ul&gt;
&lt;li&gt;modify NRF_SDH_GAP_DATA_LENGTH in sdk_config.h,&amp;nbsp;&amp;nbsp; or&lt;/li&gt;
&lt;li&gt;call the function &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.0.0/group__nrf__ble__gatt.html?cp=4_0_1_6_2_13_11#ga857b95d31c1b2454eb3ac70b96e096fd" rel="noopener noreferrer" target="_blank"&gt;nrf_ble_gatt_data_length_set&lt;/a&gt;, as suggested &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.0.0/lib_ble_gatt.html?cp=4_0_1_3_2_11" rel="noopener noreferrer" target="_blank"&gt;here&lt;/a&gt;. (I preferred using this function instead of &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v6.1.0/group___b_l_e___g_a_p___f_u_n_c_t_i_o_n_s.html?cp=2_3_1_1_0_2_1_2_14#gac4a6ef5c106107eb2a1707bb26f3245c" rel="noopener noreferrer" target="_blank"&gt;sd_ble_gap_data_length_update&lt;/a&gt;).&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;the change of packet data length takes effect immediately, provided that the peer supports the DLE feature (i.e. iPhone7 or newer, newer computers with BLE 4.2 or higher). Otherwise the packet data length will remain at 27.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;However, I noticed a problem with your actual version of &lt;a href="https://www.nordicsemi.com/eng/Products/Bluetooth-low-energy/nRF-Sniffer/(language)/eng-GB" rel="noopener noreferrer" target="_blank"&gt;nRF Sniffer&lt;/a&gt;&amp;nbsp;(v2.0.0.2.beta):&lt;/p&gt;
&lt;p&gt;After changing the packet data length on an existing connection (sniffed correctly so far), the nRF Sniffer looses track of the encryption as soon as a packet is sent with a data length larger than the default 27 bytes. Starting from this moment, all subsequent packets are flagged with the following error message:&lt;/p&gt;
&lt;p&gt;&amp;quot;Encrypted packet decrypted incorrectly (bad MIC)&amp;quot;&lt;/p&gt;
&lt;p&gt;even if their packet data length is smaller than 27 bytes.&lt;/p&gt;
&lt;p&gt;I will post a separate ticket on this issue: see &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/39439/nrf-sniffer-unable-to-track-packet-data-length-changes" rel="noopener noreferrer" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Thank you!&lt;/p&gt;
&lt;p&gt;Best regards.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: is DLE enabled by default in SoftDevice s140 ?</title><link>https://devzone.nordicsemi.com/thread/152710?ContentTypeID=1</link><pubDate>Fri, 12 Oct 2018 13:41:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:879d2259-1205-45f9-9e53-41ea4a717430</guid><dc:creator>Marjeris Romero</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]there is a configuration bit in &lt;a title="BLE_COMMON_OPTS" href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s140.api.v6.0.0/group___b_l_e___c_o_m_m_o_n___e_n_u_m_e_r_a_t_i_o_n_s.html?cp=2_3_2_1_1_2_0_2_1_2#gab104c3b3aebea136806077a7a8d20d00" rel="noopener noreferrer" target="_blank"&gt;BLE_COMMON_OPTS&lt;/a&gt;&amp;nbsp;that allows to enable / disable the Data Length Extension (DLE)[/quote]
&lt;p&gt;Yes, I think maybe this was the misunderstanding. The ble_commont_opt_conn_evt_ext_t is a struct to configure extended BLE connection events. If you want to increase your packet data length it is not necessary to enable &lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s132.sds%2Fdita%2Fsoftdevices%2Fs130%2Fmultilink_scheduling%2Fextend_connection_event.html"&gt;Connection Event Length Extension&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;To increase the packet data length I think you can either modify the parameter NRF_SDH_GAP_DATA_LENGTH in sdk_config.h or call the softdevice function &lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s132.api.v6.1.0%2Fgroup___b_l_e___g_a_p___f_u_n_c_t_i_o_n_s.html&amp;amp;anchor=gac4a6ef5c106107eb2a1707bb26f3245c"&gt;sd_ble_gap_data_length_update()&lt;/a&gt;. &lt;/p&gt;
&lt;p&gt;You can read more about how different parameters influence the throughput in this &lt;a href="https://devzone.nordicsemi.com/b/blog/posts/throughput-and-long-range-demo"&gt;blog post&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;
&lt;p&gt;Marjeris&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: is DLE enabled by default in SoftDevice s140 ?</title><link>https://devzone.nordicsemi.com/thread/152536?ContentTypeID=1</link><pubDate>Thu, 11 Oct 2018 14:49:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f8b7fa3f-1fd4-41c1-b323-cf170fc8f0f4</guid><dc:creator>Magoo</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;span&gt;Marjeris,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;thank you for your reply, but I&amp;#39;m not shure if I understood it correctly.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I would like to increase the on-air packet data length from the standard 27 bytes to 75 bytes.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Does this mean that I can just modify NRF_SDH_BLE_GAP_DATA_LENGTH in sdk_config.h and the SoftDevice will automatically try to negotiate and use this increased packet length without needing further changes?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Or does the user application code also have to set the enable bit (in the structure of type ble_common_opt_conn_evt_ext_t indicated in your post), since by default it is disabled? What library function should be used to set this bit? Is it the function sd_ble_opt_set() ?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I understand that if this bit is set, I can no longer use the function sd_ble_opt_get().&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thank you. Best regards.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Ricardo&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: is DLE enabled by default in SoftDevice s140 ?</title><link>https://devzone.nordicsemi.com/thread/152534?ContentTypeID=1</link><pubDate>Thu, 11 Oct 2018 14:13:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e4e65f09-1673-4ea0-ac53-3788a5b5994a</guid><dc:creator>Marjeris Romero</dc:creator><description>&lt;p&gt;Hi Ricardo,&lt;/p&gt;
&lt;p&gt;I will copy the declaration of ble_common_opt_conn_evt_ext_t from ble.h in lines 270 - 284:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/**
 * @brief Configuration of extended BLE connection events.
 *
 * When enabled the SoftDevice will dynamically extend the connection event when possible.
 *
 * The connection event length is controlled by the connection configuration as set by @ref ble_gap_conn_cfg_t::event_length.
 * The connection event can be extended if there is time to send another packet pair before the start of the next connection interval,
 * and if there are no conflicts with other BLE roles requesting radio time.
 *
 * @note @ref sd_ble_opt_get is not supported for this option.
 */
typedef struct
{
   uint8_t enable : 1; /**&amp;lt; Enable extended BLE connection events, disabled by default. */
} ble_common_opt_conn_evt_ext_t; &lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;As you can see here sd_ble_opt_get() is not supported for this option, and the extended BLE connection events are disabled by default.&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;
&lt;p&gt;Marjeris&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: is DLE enabled by default in SoftDevice s140 ?</title><link>https://devzone.nordicsemi.com/thread/152311?ContentTypeID=1</link><pubDate>Wed, 10 Oct 2018 08:40:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fe2564b0-b5f8-4015-b081-b1f9e6335edf</guid><dc:creator>Magoo</dc:creator><description>&lt;p&gt;Just to clarify: the runtime error occurs with the instruction on line 8 of the code snippet shown in my original post.&lt;/p&gt;
&lt;p&gt;And it happens only in my project (a BLE HID peripheral).&lt;/p&gt;
&lt;p&gt;In the example project&amp;nbsp;&lt;span&gt;&amp;quot;Experimental: ATT_MTU Throughput Example&amp;quot;, the function calls &amp;quot;sd_ble_opt_set()&amp;quot; and &amp;quot;sd_ble_opt_get()&amp;quot; work correctly. I could test them both on the same hardware.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>