<?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>Increasing MTU ATT to 1020 bytes generates a CMake error</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/85771/increasing-mtu-att-to-1020-bytes-generates-a-cmake-error</link><description>Hi, 
 Using the central and peripheral uart samples I have found the following CMake error when trying to increase the MTU ATT to 1020 bytes. 
 The added lines to the prj.conf are: 
 
 The CMake error as follows: 
 
 Any help? 
 Thanks</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 25 Mar 2022 07:05:01 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/85771/increasing-mtu-att-to-1020-bytes-generates-a-cmake-error" /><item><title>RE: Increasing MTU ATT to 1020 bytes generates a CMake error</title><link>https://devzone.nordicsemi.com/thread/359913?ContentTypeID=1</link><pubDate>Fri, 25 Mar 2022 07:05:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bb06ccfd-ebef-4c07-9adb-6bf2e1e4e150</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Armand&lt;/p&gt;
&lt;p&gt;L2CAP packets are only limited by the 16-bit length field, which means they can be up to 65536 bytes long pr spec.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Attributes are limited to 512 bytes pr spec, so when running normal communication through ATT there is little need for an MTU larger than 515 bytes (512 bytes for data and 3 bytes for the attribute header).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you bypass ATT and open an L2CAP Connected Oriented Channel you are not limited to 512 bytes, but the practical implication on data throughput will not be very large since the link layer still needs to fragment the packets into 251 byte payloads over the air.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Increasing MTU ATT to 1020 bytes generates a CMake error</title><link>https://devzone.nordicsemi.com/thread/359860?ContentTypeID=1</link><pubDate>Thu, 24 Mar 2022 15:40:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:42e44e39-b61d-44a8-b5ec-d804004d235b</guid><dc:creator>Ignacio</dc:creator><description>&lt;p&gt;Nordic devices on each side. I think I will manually split the messages for now. I just wanted to understand why&amp;nbsp;&lt;span&gt;CONFIG_BT_L2CAP_TX_MTU&amp;nbsp; can be set up to 2000 on the zephyr specs. Any hint?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Increasing MTU ATT to 1020 bytes generates a CMake error</title><link>https://devzone.nordicsemi.com/thread/359853?ContentTypeID=1</link><pubDate>Thu, 24 Mar 2022 14:59:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b8a42744-e5fa-4dc4-8ef1-f60e30b7ed00</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Armand&lt;/p&gt;
[quote user="Armand La Flent"]One final query. Is it possible to set to&amp;nbsp;CONFIG_BT_L2CAP_TX_MTU=1020 and get the ble stack to split the messages? If yes, how?[/quote]
&lt;p&gt;This should be possible, yes, but using L2CAP connection oriented channels is not a very common way of sending data over BLE. Then you bypass the entire ATT and GATT layer, which means you can&amp;#39;t use normal BLE services.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Are you sure this is what you want to do?&lt;/p&gt;
&lt;p&gt;Could you give me some information about the application you are working on, and what kind of devices you want to connect?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Do you have Nordic devices on both sides of the link, or do you want to connect to other devices like phones or PC&amp;#39;s?&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Increasing MTU ATT to 1020 bytes generates a CMake error</title><link>https://devzone.nordicsemi.com/thread/359851?ContentTypeID=1</link><pubDate>Thu, 24 Mar 2022 14:53:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:81108b89-b8b6-4fe6-b655-d026d3fcece1</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Jörg&lt;/p&gt;
&lt;p&gt;This is both a Bluetooth specification limitation and a hardware limitation (the hardware being designed with the Bluetooth specification in mind).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;For details please refer to Vol 6, part B, chapter 2.4 of the Bluetooth 5.2 specification, in particular this section regarding Data Physical Channel PDU packets (normal packet format in a connection):&amp;nbsp;&lt;br /&gt;&lt;em&gt;The Length field of the Header indicates the length of the Payload and MIC if&lt;/em&gt;&lt;br /&gt;&lt;em&gt;included. The length field has the range 0 to 255 octets. The Payload shall be&lt;/em&gt;&lt;br /&gt;&lt;em&gt;less than or equal to 251 octets in length. The MIC is 4 octets in length.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;In other words the payload is limited to 251 bytes, and when sending data through ATT you lose 4 bytes for the link layer header and 3 bytes for the ATT header, leaving you with 244 bytes maximum for attribute data.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The radio hardware allows up to 255 bytes total (not including preamble, header, address or CRC) in order to handle a 251 byte BLuetooth payload plus the 4 byte MIC.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Higher level protocols such as ATT or L2CAP allow you to send longer packets, but they will be fragmented by the link layer to fit in 251 bytes or less.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Increasing MTU ATT to 1020 bytes generates a CMake error</title><link>https://devzone.nordicsemi.com/thread/359724?ContentTypeID=1</link><pubDate>Thu, 24 Mar 2022 08:28:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5f87320c-28a5-45f5-b405-6bb748feff3b</guid><dc:creator>Ignacio</dc:creator><description>&lt;p&gt;Thanks, Turbo and&amp;nbsp;&lt;span&gt;Torbj&amp;oslash;rn,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;One final query. Is it possible to set to&amp;nbsp;CONFIG_BT_L2CAP_TX_MTU=1020 and get the ble stack to split the messages? If yes, how?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Zephyr specified that&amp;nbsp;CONFIG_BT_L2CAP_TX_MTU can be configured up to 2000.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="https://docs.zephyrproject.org/1.14.0/reference/kconfig/CONFIG_BT_L2CAP_TX_MTU.html"&gt;docs.zephyrproject.org/.../CONFIG_BT_L2CAP_TX_MTU.html&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Increasing MTU ATT to 1020 bytes generates a CMake error</title><link>https://devzone.nordicsemi.com/thread/359566?ContentTypeID=1</link><pubDate>Wed, 23 Mar 2022 10:48:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d294d8f4-1e30-4694-acec-82e054db3451</guid><dc:creator>Turbo J</dc:creator><description>&lt;p&gt;It is a &lt;em&gt;hardware&lt;/em&gt; specific limitation - at least that is what I read from the RADIO peripherial specification. A TX packet can only be up to 255 bytes in length - that register has only 8 bits.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m pretty sure you could configure the zephyr BT stack for supporting a RADIO with a larger possible TX packet size, but I don&amp;#39;t see this possible with currently available NordiSemi chips that I&amp;#39;m aware of.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Increasing MTU ATT to 1020 bytes generates a CMake error</title><link>https://devzone.nordicsemi.com/thread/359560?ContentTypeID=1</link><pubDate>Wed, 23 Mar 2022 10:24:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ba6961c3-7e13-454e-9bfb-f8127e8b78ce</guid><dc:creator>Ignacio</dc:creator><description>&lt;p&gt;Thanks&amp;nbsp;&lt;span&gt;Torbj&amp;oslash;rn,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Just for me to fully understand and close the case. The article on the link below states the following:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="https://www.novelbits.io/bluetooth-5-speed-maximum-throughput/"&gt;www.novelbits.io/.../&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;There is no limit per the spec on how high the MTU value can be, but the specific stack in use may have its own limitations&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Could you confirm that the 244 bytes payload per packet is a specific stack limitation?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Increasing MTU ATT to 1020 bytes generates a CMake error</title><link>https://devzone.nordicsemi.com/thread/359171?ContentTypeID=1</link><pubDate>Mon, 21 Mar 2022 14:14:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1fc2f3e5-020d-4225-be22-6b6d675935b3</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Armand&lt;/p&gt;
&lt;p&gt;The most efficient way to send a large payload over BLE is to split it manually into 244 byte blocks, since this is the maximum amount of user data you can have in one BLE packet.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;1020 bytes would have to be split into 5 packets in order to fit in 244 bytes or less (244 x 4 + 44).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Depending on your configuration you should be able to send 5 packets or more in a single connection event, unless the connection interval is very small.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you look at the Bluetooth configuration in the throughput sample you can see how to configure the stack for optimal throughput:&lt;br /&gt;&lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/main/samples/bluetooth/throughput/prj.conf#L31-L42"&gt;https://github.com/nrfconnect/sdk-nrf/blob/main/samples/bluetooth/throughput/prj.conf#L31-L42&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Increasing MTU ATT to 1020 bytes generates a CMake error</title><link>https://devzone.nordicsemi.com/thread/358974?ContentTypeID=1</link><pubDate>Sun, 20 Mar 2022 20:41:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2a66c777-6b85-4f63-af2c-936ce8ed3491</guid><dc:creator>Ignacio</dc:creator><description>&lt;p&gt;Thanks.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Is it possible to send 1020 bytes payload data in a single connection interval? If yes, how?&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Increasing MTU ATT to 1020 bytes generates a CMake error</title><link>https://devzone.nordicsemi.com/thread/357929?ContentTypeID=1</link><pubDate>Mon, 14 Mar 2022 12:13:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8269714c-daff-4510-8841-7e1ca8e907ac</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Armand.&lt;/p&gt;
&lt;p&gt;If you scroll up in the build log you should see a text&amp;nbsp;like this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;warning: user value 1024 on the int symbol BT_BUF_ACL_TX_SIZE (defined at C:\ncs\v1.8.0\zephyr\subsys\bluetooth\common\Kconfig:7, c:\ncs\v1.8.0\_cust\285777_peripheral_hr\build\subsys\bluetooth\common\Kconfig:7) ignored due to being outside the active range ([27, 251]) -- falling back on defaults

error: Aborting due to Kconfig warnings&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Essentially you have exceeded the maximum value for this configuration parameter, and you need to adjust it accordingly.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you adjust CONFIG_BT_BUF_ACL_TX_SIZE parameter to 251 it should build.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Increasing MTU ATT to 1020 bytes generates a CMake error</title><link>https://devzone.nordicsemi.com/thread/357794?ContentTypeID=1</link><pubDate>Sun, 13 Mar 2022 08:28:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:90a123d9-49da-4408-a0fd-108c56aef2c5</guid><dc:creator>Turbo J</dc:creator><description>&lt;p&gt;There is probably a message further up that&amp;nbsp; notes the actual limit around 250 bytes. Pretty sure that is either a hardware or BT LE spec limit.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>