<?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>Can&amp;#39;t enable DLE</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/51082/can-t-enable-dle</link><description>Hi 
 For a project I want to send acceleration data via BLE 4.2 (with DLE). An acceleration packet consists of 81 values (24 bits each, total 243 bytes). My goal is to send 18 packets (1458 acceleration packets or 4374 bytes). After all packets have been</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 22 Aug 2019 08:48:57 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/51082/can-t-enable-dle" /><item><title>RE: Can't enable DLE</title><link>https://devzone.nordicsemi.com/thread/205483?ContentTypeID=1</link><pubDate>Thu, 22 Aug 2019 08:48:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2e918323-3fda-4fd8-88d6-af2654180968</guid><dc:creator>LuckyLukas</dc:creator><description>&lt;p&gt;Hello Sigurd&lt;/p&gt;
&lt;p&gt;thank you for your help! it works great. the only addition i had to do was, to change my RAM1_Start Area in uKeil. According to&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/index.jsp"&gt;this&lt;/a&gt;&amp;nbsp;(nRF52 Series &amp;gt; SoftDevices &amp;gt; S132 SoftDevice &amp;gt; S132 SoftDevice v6.0.0 API &amp;gt; API Reference &amp;gt; Functions &amp;gt; sd_ble_enable), i had to set (in my case) IRAM1_Start to 0x20006040.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1566463574184v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;best regards&lt;/p&gt;
&lt;p&gt;Lukas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can't enable DLE</title><link>https://devzone.nordicsemi.com/thread/205391?ContentTypeID=1</link><pubDate>Wed, 21 Aug 2019 17:30:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:296e2d7c-81ee-45e9-ab8c-378c27d771f1</guid><dc:creator>Sigurd</dc:creator><description>[quote userid="16351" url="~/f/nordic-q-a/51082/can-t-enable-dle/205327"]Why do i only receive 20 and not 27 package?[/quote]
&lt;p&gt;Because there is a&amp;nbsp;&lt;span&gt;3 byte ATT header, and a 4 byte L2CAP header. 27-3-4=20 byte payload. See the figures at &lt;a href="https://www.novelbits.io/bluetooth-5-speed-maximum-throughput/"&gt;this page&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;If you want larger ATT MTU packets, you should increase&amp;nbsp;NRF_SDH_BLE_GATT_MAX_MTU_SIZE in sdk_config.h&lt;/p&gt;
&lt;p&gt;For max&amp;nbsp;throughput and length, try to set this in sdk_config.h:&lt;/p&gt;
&lt;p&gt;NRF_SDH_BLE_GAP_DATA_LENGTH 251&lt;/p&gt;
&lt;p&gt;NRF_SDH_BLE_GAP_EVENT_LENGTH 300&lt;/p&gt;
&lt;p&gt;NRF_SDH_BLE_GATT_MAX_MTU_SIZE 247&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can't enable DLE</title><link>https://devzone.nordicsemi.com/thread/205327?ContentTypeID=1</link><pubDate>Wed, 21 Aug 2019 12:55:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6317d536-2a49-4989-bc0f-4d2571edd6fe</guid><dc:creator>LuckyLukas</dc:creator><description>&lt;p&gt;Hello Sigurd&lt;/p&gt;
&lt;p&gt;Thank you for your answer. Like you suggested i deletet data_len_set() from my code.&lt;/p&gt;
&lt;p&gt;Hence i changed the connection intervalls:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#define MIN_CONN_INTERVAL               (uint16_t)(MSEC_TO_UNITS(7.5, UNIT_1_25_MS))
#define MAX_CONN_INTERVAL               (uint16_t)(MSEC_TO_UNITS(500, UNIT_1_25_MS))
#define CONN_SUP_TIMEOUT                (uint16_t)(MSEC_TO_UNITS(4000,  UNIT_10_MS))
#define SLAVE_LATENCY                   0                                       &lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong style="font-family:inherit;"&gt;1. Try&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;For a first try i&amp;nbsp;set&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;NRF_SDH_BLE_GAP_DATA_LENGTH = 27&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Hence i initialized &amp;quot;test_array&amp;quot; to:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static uint8_t test_array[NRF_SDH_BLE_GAP_DATA_LENGTH];
...
void short_arary(void){
  int i = 0; 
  for ( i = 0 ; i &amp;lt; NRF_SDH_BLE_GAP_DATA_LENGTH ; i++){ 
    test_array[i] = i; 
  } 
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;therefore test_array should be:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;test_array = {0, 1, 2, 3, ... , 26}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;i sniffed the BLE packages with cysmart 1.3 (Dongle: CY5677), nRF Connect (Android App running on my Samsung Galaxy A3 2017 Edition) and nRFSniffer v2 (nRF52840dk).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;What i get from cysmart 1.3, nRF Connect and nRFSniffer v2 is (for one BLE package):&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;test_arras = [00:01:02:03:04:05:06:07:08:09:0A:0B:0C:0D:0E:0F:10:11:12:13]&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;nRFSniffer v2 output:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1566398121986v5.png" alt=" " /&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/ble_5F00_packages_5F00_27_2E00_.pcapng"&gt;devzone.nordicsemi.com/.../ble_5F00_packages_5F00_27_2E00_.pcapng&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;cysmart 1.3 output:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1566398102504v4.png" alt=" " /&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Question 1:&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Why do i only receive 20 and not 27 package?&lt;/p&gt;
&lt;p&gt;&lt;strong style="font-family:inherit;"&gt;2. Try&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;For a second try i changed&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;NRF_SDH_BLE_GAP_DATA_LENGTH = 27&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;to&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;NRF_SDH_BLE_GAP_DATA_LENGTH = 45&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;my smartphone couldn&amp;#39;t connect.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;nRFSniffer v2 output:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1566397819851v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/1754.ble_5F00_packages_5F00_45.pcapng"&gt;devzone.nordicsemi.com/.../1754.ble_5F00_packages_5F00_45.pcapng&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;cysmart 1.3 output:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1566397936650v3.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;/em&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can't enable DLE</title><link>https://devzone.nordicsemi.com/thread/204843?ContentTypeID=1</link><pubDate>Mon, 19 Aug 2019 15:27:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:98ac7343-ecf1-4737-a2e7-21d996db2351</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote userid="16351" url="~/f/nordic-q-a/51082/can-t-enable-dle"]Why can&amp;#39;t I send more than 20 bytes? Even if I set maximum length to 27, only 20 bytes will be sent:[/quote]
&lt;p&gt;Both sides of the link need to support long ATT MTU. It could be that the&amp;nbsp;&lt;span&gt;Galaxy A3 does not support long ATT MTU, and you will then be restricted&amp;nbsp;to 20 bytes. A sniffer log with &lt;a href="https://www.nordicsemi.com/Software-and-Tools/Development-Tools/nRF-Sniffer"&gt;nRFSniffer v2&lt;/a&gt; could show us exactly what is happening on-air.&lt;/span&gt;&lt;/p&gt;
[quote userid="16351" url="~/f/nordic-q-a/51082/can-t-enable-dle"]The main.c contains the function data_len_set(). In it the DLE is enabled.[/quote]
&lt;p&gt;&lt;span&gt;You don&amp;#39;t need to call data_len_set(). Just set&amp;nbsp;NRF_SDH_BLE_GAP_DATA_LENGTH in sdk_config.h to the value you want. The GATT module will handle the DLE&amp;nbsp;negotiation with the other device.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
[quote userid="16351" url="~/f/nordic-q-a/51082/can-t-enable-dle"]Why is there no advertising anymore? [/quote]
&lt;p&gt;You are&amp;nbsp;probably running in the error-handler(APP_ERROR_CHECK). Run a debug session in your IDE(e.g. segger embedded studio) to see where you get an error.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>