<?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>Changing and verifying mtu and data_lenght after connection event</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/39690/changing-and-verifying-mtu-and-data_lenght-after-connection-event</link><description>Hi, 
 So I am working on NRF52832 with S132 6.1.0 and SDK 15.2.0 mtu and data lenght testings. During that time I was unable to change mtu multiple times while connected (BLE 5 specs should allow that). 
 1. First thing first, in documentation GATTC ATT_MTU</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 21 May 2019 05:09:39 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/39690/changing-and-verifying-mtu-and-data_lenght-after-connection-event" /><item><title>RE: Changing and verifying mtu and data_lenght after connection event</title><link>https://devzone.nordicsemi.com/thread/188069?ContentTypeID=1</link><pubDate>Tue, 21 May 2019 05:09:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:46d2ae29-9a50-4412-ba1b-0747ccb4de9c</guid><dc:creator>Giang</dc:creator><description>&lt;p&gt;Thank you, I understand&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing and verifying mtu and data_lenght after connection event</title><link>https://devzone.nordicsemi.com/thread/187797?ContentTypeID=1</link><pubDate>Mon, 20 May 2019 08:03:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:16725659-e909-486a-9e30-d6317478a024</guid><dc:creator>Justin Gasprom</dc:creator><description>&lt;p&gt;As Hung wrote you need to set MTU while connecting and cannot change it online. If you want to change it you have to disconnect from ble device and connect again with new preferred MTU. And actually there is no reason to change it online, just set it to maximum and if you want to control payload and save some energy or ect. just change data length parameter&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing and verifying mtu and data_lenght after connection event</title><link>https://devzone.nordicsemi.com/thread/187758?ContentTypeID=1</link><pubDate>Mon, 20 May 2019 03:42:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f18adadd-c1be-4e4c-9c7a-3b3e61ad7daa</guid><dc:creator>Giang</dc:creator><description>&lt;p&gt;Hi Justin and Hung Bui,&lt;/p&gt;
&lt;p&gt;Now I encountered the same problem. I want update MTU size any time. But when I use above code, I only can update in the first time. After time, I get&amp;nbsp;&lt;span&gt;NRF_ERROR_INVALID_STATE by&amp;nbsp;sd_ble_gattc_exchange_mtu_request(). Please show me a solution for this problem. Thank !!!&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing and verifying mtu and data_lenght after connection event</title><link>https://devzone.nordicsemi.com/thread/154276?ContentTypeID=1</link><pubDate>Wed, 24 Oct 2018 12:01:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1f4f5c5c-5a6d-434a-b257-a34640a46ea7</guid><dc:creator>Justin Gasprom</dc:creator><description>&lt;p&gt;Just made few tests, data lenght updates without any problems as many times as needed, thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing and verifying mtu and data_lenght after connection event</title><link>https://devzone.nordicsemi.com/thread/154120?ContentTypeID=1</link><pubDate>Tue, 23 Oct 2018 13:18:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d31fab36-a25f-4290-9408-833cae7a2f15</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;No, I believe Data Length Update can be updated multiple times in a connection, as long as you response to the previous before request a new one. Do you see otherwise ?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing and verifying mtu and data_lenght after connection event</title><link>https://devzone.nordicsemi.com/thread/153988?ContentTypeID=1</link><pubDate>Tue, 23 Oct 2018 08:18:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a122d7fa-e65a-4424-bc13-92963ca56f7b</guid><dc:creator>Justin Gasprom</dc:creator><description>&lt;p&gt;Hung Bui, thank you for your answer. That was my problem I trusted bad sources saying that mtu and data length can be changed any time in BLE5, that official spec was what I needed. But talking about data length I cannot see any clues in the spec specifying that data length can not be changed at any time. Can you confirm that at least data length can be changed at any time during connection?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing and verifying mtu and data_lenght after connection event</title><link>https://devzone.nordicsemi.com/thread/153878?ContentTypeID=1</link><pubDate>Mon, 22 Oct 2018 15:19:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:23c11753-7259-4fcd-b196-f0e324a22812</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Justianas,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you have a look at section 3.4.2.1 Vol 3 Part F in Bluetooth Core Spec v5.0 you can find that (Exchange MTU Request)&lt;em&gt;&amp;quot;shall only be sent once during a connection by the client. The Client Rx MTU parameter shall be set to the maximum size of the attribute protocol PDU that the client can receive&amp;quot; &lt;/em&gt;And this is stated in our documentation as well:&amp;nbsp;NRF_ERROR_INVALID_STATE Invalid connection state or an ATT_MTU exchange was already requested once.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;att_mtu_desired_periph&amp;nbsp;is what you set when you init gatt for all connections, .att_mtu_desired is used internally inside nrf_ble_gatt.c to pass the value of&amp;nbsp;att_mtu_desired_periph, I don&amp;#39;t think you need to touch it.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Regarding the effective result of MTU exchange and DLE, I think the implementation of&amp;nbsp;gatt_evt_handler() could be wrong, I will double check it.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You should only print out the efective value when you receive the NRF_BLE_GATT_EVT_ATT_MTU_UPDATED event and&amp;nbsp;NRF_BLE_GATT_EVT_DATA_LENGTH_UPDATED, instead of the desired values.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It&amp;#39;s pretty long thread, could you summarize the question you still have ?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>