<?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 packet division by setting of ATT_MTU and DLE？</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/25177/the-packet-division-by-setting-of-att_mtu-and-dle</link><description>Hello, 
 We try to use &amp;quot;ATT_MTU&amp;quot; and &amp;quot;Data length extension (DLE)&amp;quot; to expand a packet in S132 SDK 14.0.0.
When we set &amp;quot;ATT_MTU&amp;quot; &amp;gt; &amp;quot;DLE&amp;quot;, please tell me what happens? 
 We thought data was sent by 1 packet when I set &amp;quot;ATT_MTU&amp;quot;=158 and &amp;quot;DLE&amp;quot;= 137.
But</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 20 Sep 2017 05:25:09 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/25177/the-packet-division-by-setting-of-att_mtu-and-dle" /><item><title>RE: The packet division by setting of ATT_MTU and DLE？</title><link>https://devzone.nordicsemi.com/thread/99194?ContentTypeID=1</link><pubDate>Wed, 20 Sep 2017 05:25:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:52612976-d170-4e57-90fb-d56251b59dfd</guid><dc:creator>Yoko</dc:creator><description>&lt;p&gt;Thanks to very much. We&amp;#39;re thankful for your answer.
We settled our question by your advice.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The packet division by setting of ATT_MTU and DLE？</title><link>https://devzone.nordicsemi.com/thread/99191?ContentTypeID=1</link><pubDate>Tue, 19 Sep 2017 10:31:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:03512e17-5d9a-4932-8c3c-5d1e31dbfb81</guid><dc:creator>Adrian Eggenberger</dc:creator><description>&lt;p&gt;I wasn&amp;#39;t aware that the GATT Server is mandatory. I tested initiating the ATT MTU exchange from peripheral side by calling sd_ble_gattc_exchange_mtu_request and it worked as expected. Thanks so much for your support.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The packet division by setting of ATT_MTU and DLE？</title><link>https://devzone.nordicsemi.com/thread/99192?ContentTypeID=1</link><pubDate>Tue, 19 Sep 2017 07:18:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:611b37ac-3cc4-4bac-888d-6d804a215728</guid><dc:creator>Ulrich Myhre</dc:creator><description>&lt;p&gt;Both sides will always have a GATT server, as it is mandatory to support and independent of the role. Usually, both the central and peripheral should support initiating the procedure.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The packet division by setting of ATT_MTU and DLE？</title><link>https://devzone.nordicsemi.com/thread/99188?ContentTypeID=1</link><pubDate>Fri, 15 Sep 2017 12:16:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0fa5e065-8c4d-4bf7-8be5-284041fb0c8f</guid><dc:creator>Adrian Eggenberger</dc:creator><description>&lt;p&gt;Thanks for the links to the MSC&amp;#39;s. That helped me a lot. I was able to reach much higher throughput by adding the sd_ble_gattc_exchange_mtu_request on the GATTC side.
Is it possible for the GATTS side to initiate the ATT_MTU exchange? The reason for my question is that the smart devices normally implement the GATTC part. Do they initiate a GATTC request?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The packet division by setting of ATT_MTU and DLE？</title><link>https://devzone.nordicsemi.com/thread/99190?ContentTypeID=1</link><pubDate>Fri, 15 Sep 2017 09:04:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0e95326a-c5f1-4bbd-8889-b65ce965b835</guid><dc:creator>Ulrich Myhre</dc:creator><description>&lt;p&gt;&lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s132.api.v4.0.2%2Fgroup___b_l_e___g_a_t_t_c___m_t_u___e_x_c_h_a_n_g_e.html"&gt;Client side&lt;/a&gt; and &lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s132.api.v4.0.2%2Fgroup___b_l_e___g_a_t_t_s___m_t_u___e_x_c_h_a_n_g_e.html"&gt;Server side&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The packet division by setting of ATT_MTU and DLE？</title><link>https://devzone.nordicsemi.com/thread/99189?ContentTypeID=1</link><pubDate>Fri, 15 Sep 2017 08:55:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0ac450e6-6509-4a30-ae7a-70035dc238bc</guid><dc:creator>Adrian Eggenberger</dc:creator><description>&lt;p&gt;That may be the cause. I&amp;#39;m just doing a DLE exchange. How can I initiate an ATT MTU exchange?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The packet division by setting of ATT_MTU and DLE？</title><link>https://devzone.nordicsemi.com/thread/99193?ContentTypeID=1</link><pubDate>Fri, 15 Sep 2017 07:18:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cc884665-1279-4b72-a5ed-dc87e0594b15</guid><dc:creator>Ulrich Myhre</dc:creator><description>&lt;p&gt;Stupid question maybe, but are you also initiating an ATT MTU exchange before this? Are you giving a proper length to the hvx call? (Should be agreed MTU size minus 3). It sounds like your hvx call is still just requesting to notify about 20 bytes, and the other side is doing it correctly, but the ATT MTU exchange prodecure has not yet completed.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The packet division by setting of ATT_MTU and DLE？</title><link>https://devzone.nordicsemi.com/thread/99187?ContentTypeID=1</link><pubDate>Thu, 14 Sep 2017 12:59:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cbad82e8-1da2-42e8-a601-4217d99d4b01</guid><dc:creator>Adrian Eggenberger</dc:creator><description>&lt;p&gt;Ok. So far I understand. I&amp;#39;ve created an example with two nRF52 DK&amp;#39;s to test this features, but I&amp;#39;ve two issues. The establish of the connection works properly and the DLE seams also to be fine. It results in 251Bytes and 2120us in both directions.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;In the direction from peripheral (GATTS) to central I&amp;#39;m sending notifications with a length of 244 Bytes. The Softdevice confirms the call of sd_ble_gatts_hvx but if I check on the central side only 20 bytes are in every notification. I&amp;#39;ve also checked this with sniffer and the ATT packets contain only 20 bytes.&lt;/li&gt;
&lt;li&gt;In the other direction the situation is even worse. Calling the function sd_ble_gattc_write to initiate a command write with a length of 244 bytes failes with error code NRF_ERROR_DATA_SIZE.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I&amp;#39;ve no clue what&amp;#39;s going wrong. I&amp;#39;ve tested this with S132 4.0.4 and S132 5.0.0 with the same result on both.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The packet division by setting of ATT_MTU and DLE？</title><link>https://devzone.nordicsemi.com/thread/99186?ContentTypeID=1</link><pubDate>Thu, 14 Sep 2017 11:30:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:948ebd32-2a9b-4a8a-9f26-45bc4a4a453e</guid><dc:creator>Ulrich Myhre</dc:creator><description>&lt;p&gt;The DLE Length must be at least ATT_MTU + 4. Then any ATT payload will be sent as a single PDU. The length of the data you send cannot exceed (ATT_MTU - ATT_Header), as the API call will fail. ATT_Header size depends on the PDU type, and can be seen in the Bluetooth Spec. It&amp;#39;s 3 bytes for HVN/HVI, Write Command and Write Request, but 5 for Prepare Write Request.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The packet division by setting of ATT_MTU and DLE？</title><link>https://devzone.nordicsemi.com/thread/99195?ContentTypeID=1</link><pubDate>Thu, 14 Sep 2017 10:58:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ccb0596b-fdd6-4368-a0da-a06a878b8c21</guid><dc:creator>Adrian Eggenberger</dc:creator><description>&lt;p&gt;Hi Ulrich&lt;/p&gt;
&lt;p&gt;If I understand this correctly an optimal throughput in both directions can be reached by using GATT Characteristics with a variable length and send data by using GATT Notifications or GATT Write Commands with a length of the DLE length - 7. Is this correct?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The packet division by setting of ATT_MTU and DLE？</title><link>https://devzone.nordicsemi.com/thread/99185?ContentTypeID=1</link><pubDate>Thu, 14 Sep 2017 09:17:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e5150010-e8fb-4fbc-bc78-8725c12f5074</guid><dc:creator>Ulrich Myhre</dc:creator><description>&lt;p&gt;The maximum length of a logical ATT PDU is ATT_MTU long (so for HVN, the actual data payload is ATT_MTU-3 long due to handle + opcode).&lt;/p&gt;
&lt;p&gt;The maximum length of an on-air PDU is DLE_LEN long. Since 4 bytes are used for the L2CAP header (length + channel identificator), you should set DLE to be ATT_MTU+4.&lt;/p&gt;
&lt;p&gt;In your setup, MTU is 158 and DLE is 137. For an HVN or write command, that will be divided into two PDUs as follows:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;PDU #1: L2CAP Header (4) | ATT Header (3) | ATT payload (130)
PDU #2: ATT payload (28)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;So you get some saving with high ATT_MTU by not sending multiple headers, but by increasing the DLE length it should be sent as one PDU.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>