<?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>Maximum ATT MTU for BLE NUS</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/28640/maximum-att-mtu-for-ble-nus</link><description>Hi, 
 What is the maximum ATT MTU size for the BLE NUS? 
 While programming my BLE NUS server application I constantly ran into the problem that my MTU and length updates cause NRF_ERROR_INVALID_PARAM errors. I solved it by setting the MTU size for</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sat, 14 Apr 2018 18:23:15 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/28640/maximum-att-mtu-for-ble-nus" /><item><title>RE: Maximum ATT MTU for BLE NUS</title><link>https://devzone.nordicsemi.com/thread/128334?ContentTypeID=1</link><pubDate>Sat, 14 Apr 2018 18:23:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d8a78f75-52fd-444a-8a0d-6b5196587eb6</guid><dc:creator>krnd</dc:creator><description>&lt;p&gt;I figured it out a while ago and want to share...&lt;br /&gt;(I stick to Bluetooth 5 BLE and uncoded PHY - just in case it matters.)&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Maximum PDU size = 257 bytes&lt;br /&gt;&amp;nbsp; &amp;nbsp; &lt;em&gt;[BLUETOOTH SPECIFICATION Version 5.0 | Vol 6, Part B | 2.1 PACKET FORMAT FOR THE LE UNCODED PHYS]&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;Data channel PDU header = 2 bytes&lt;br /&gt;Data channel PDU MIC (Message Integrity Check) = 4 bytes&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;em&gt;[BLUETOOTH SPECIFICATION Version 5.0 | Vol 6, Part B | 2.4 DATA CHANNEL PDU]&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;Basic L2CAP PDU header = 4 bytes&lt;br /&gt;&amp;nbsp; &amp;nbsp; &lt;em&gt;[BLUETOOTH SPECIFICATION Version 5.0 | Vol 3, Part A | 3 DATA PACKET FORMAT]&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Using this we get a &lt;strong&gt;max. MTU&lt;/strong&gt; of 257-2-4-4 =&amp;nbsp;&lt;strong&gt;247 bytes&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;For the &lt;strong&gt;NUS&lt;/strong&gt; this results in an &lt;strong&gt;max. transmittable data size&lt;/strong&gt; of &lt;strong&gt;244&amp;nbsp;bytes&lt;/strong&gt;&amp;nbsp;(3 bytes NUS header: see `BLE_NUS_MAX_DATA_LEN` inside `ble_nus.h` or `ble_nus_c.h`).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Maximum ATT MTU for BLE NUS</title><link>https://devzone.nordicsemi.com/thread/113513?ContentTypeID=1</link><pubDate>Fri, 22 Dec 2017 12:24:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e85f8b92-04a6-411f-b4cc-0f46add69972</guid><dc:creator>run_ar</dc:creator><description>&lt;p&gt;247 was probably used since this is the maximum packet length of 255 - headers - 1byte because of some old issue(254 max length). 248 should be fine with the nRF52840. In fact the ATT MTU size is not really depending on the Packet size. It is possible to have longer att mtu&amp;#39;s than the maximum pdu size.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>