<?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>Extend the MTU with SDK 15.2</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/39285/extend-the-mtu-with-sdk-15-2</link><description>Hi! 
 Is there an example to extend the Bluetooth MTU size to more than 20 bytes together with SDK 15.2? 
 I found only examples with older versions. 
 Thank you in advance. 
 Best regards 
 Oliver</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 26 Oct 2018 11:46:37 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/39285/extend-the-mtu-with-sdk-15-2" /><item><title>RE: Extend the MTU with SDK 15.2</title><link>https://devzone.nordicsemi.com/thread/154669?ContentTypeID=1</link><pubDate>Fri, 26 Oct 2018 11:46:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:460ceeab-28db-406a-9b21-9150d02504d6</guid><dc:creator>oalt</dc:creator><description>&lt;p&gt;You are right. I tried to connect using the nRF connect app on an Android phone and now the MTU is extended. So it seems to be a problem with my test environment. Thank you for the support.&lt;/p&gt;
&lt;p&gt;I will close the ticket.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Extend the MTU with SDK 15.2</title><link>https://devzone.nordicsemi.com/thread/154503?ContentTypeID=1</link><pubDate>Thu, 25 Oct 2018 12:36:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:866e3799-d1ab-4490-97e9-e0a8c0ada62d</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;So did you try the unmodified ble_app_uart example? The reason that I keep asking for this is that if you test this, then you can figure out whether it is your nRF application or PC application that hasn&amp;#39;t set the correct MTU.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If your nRF is the peripheral, then the m_rx_mtu is the PC.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;How does your project use NRF_SDH_BLE_GATT_MAX_MTU_SIZE? It is a define, but it doesn&amp;#39;t matter if your application doesn&amp;#39;t use this define anywhere in the application.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;What does your gatt_init() look like? Do you use the&amp;nbsp;&lt;span&gt;NRF_SDH_BLE_GATT_MAX_MTU_SIZE there?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;BR,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Edvin&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Extend the MTU with SDK 15.2</title><link>https://devzone.nordicsemi.com/thread/154482?ContentTypeID=1</link><pubDate>Thu, 25 Oct 2018 11:39:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bf4659b7-cb49-4c0e-bc4a-10eeef8c0a72</guid><dc:creator>oalt</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;my central is a PC with a CSR8510 A10 USB BLE dongle. I have written a test program using node.js and the noble BLE library.&lt;/p&gt;
&lt;p&gt;I set the desired MTU in the SDK config file ( NRF_SDH_BLE_GATT_MAX_MTU_SIZE).&lt;/p&gt;
&lt;p&gt;What is not clear for me: From which side the server_rx_mtu value comes from? Is it the peripherial device or the central device?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Extend the MTU with SDK 15.2</title><link>https://devzone.nordicsemi.com/thread/154479?ContentTypeID=1</link><pubDate>Thu, 25 Oct 2018 11:32:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:55952b27-3767-41a6-86d4-5824b9356b16</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
[quote user="oalt"]The peer seems to send a request of MTU=256.[/quote]
&lt;p&gt;By &amp;quot;peer&amp;quot; you mean central, right?&lt;/p&gt;
&lt;p&gt;And still, what is your central device? A mobile phone or another nRF? Or something else?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;What example do you test with? Did you test the ble_app_uart example? Did you get a higher MTU than 23 there?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Can you describe where you set the setting to 43?&lt;/p&gt;
&lt;p&gt;In the ble_app_uart example it is set in main.c -&amp;gt; gatt_init() -&amp;gt;&amp;nbsp;nrf_ble_gatt_att_mtu_periph_set(&amp;amp;m_gatt, NRF_SDH_BLE_GATT_MAX_MTU_SIZE); where NRF_SDH_BLE_GATT_MAX_MTU_SIZE =&amp;nbsp;247&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;When I do the same logging as you, I get:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-91bac119d25f4bb7b0f96d1223db712c/pastedimage1540466951772v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;So the p_link-&amp;gt;att_mtu_desired is the peripherals desired MTU, and the server_rx_mtu is the central (iPhone in my case).&lt;/p&gt;
&lt;p&gt;Also know that data_len, which is the payload length = MTU -&amp;nbsp;OPCODE_LENGTH - HANDLE_LENGTH, OPCODE_LENGTH = 1 and HANDLE_LENGTH = 2.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;So it looks like it is your central that doesn&amp;#39;t accept MTU over 23.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Extend the MTU with SDK 15.2</title><link>https://devzone.nordicsemi.com/thread/154382?ContentTypeID=1</link><pubDate>Thu, 25 Oct 2018 07:25:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:99909a5e-20a3-470d-8ef8-cb4df568155d</guid><dc:creator>oalt</dc:creator><description>&lt;p&gt;My application is a peripherial. The log comes from the module mrf_ble_gatt.c.&lt;/p&gt;
&lt;p&gt;I have extended the logging in the function on_exchange_mtu_rsp_evt() with one line of code:&lt;/p&gt;
&lt;p&gt;NRF_LOG_DEBUG(&amp;quot;server rx mtu %i, desired %i&amp;quot;, server_rx_mtu, p_link-&amp;gt;att_mtu_desired);&lt;/p&gt;
&lt;p&gt;in line 211.&lt;/p&gt;
&lt;p&gt;The peer seems to send a request of MTU=256. My test setting is 43 but the result is 23 because of server rx mtu in nrf_ble_gatt.c, function on_exchange_mtu_rsp_evt()&lt;/p&gt;
&lt;p&gt;p_link-&amp;gt;att_mtu_effective = MIN(&lt;strong&gt;server_rx_mtu&lt;/strong&gt;, p_link-&amp;gt;att_mtu_desired);&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Extend the MTU with SDK 15.2</title><link>https://devzone.nordicsemi.com/thread/154125?ContentTypeID=1</link><pubDate>Tue, 23 Oct 2018 13:29:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:58ea6b36-c32a-4c0d-a974-14b74b5f93ea</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Is this the log from the peripheral or the central? And either way, what is the other device (central/peripheral)? Is it the other example, ble_app_uart or ble_app_uart_c, or is it a phone? If it is a phone, and the phone is old, or another device that doesn&amp;#39;t support MTU larger than 23, you can&amp;#39;t increase the MTU further.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Extend the MTU with SDK 15.2</title><link>https://devzone.nordicsemi.com/thread/154032?ContentTypeID=1</link><pubDate>Tue, 23 Oct 2018 09:47:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5a2ccc70-f6fa-4a0d-9b11-76399a907bd6</guid><dc:creator>oalt</dc:creator><description>&lt;p&gt;Hi!&lt;/p&gt;
&lt;p&gt;When the MTU GAT request/response is sent, the MTU is set to 23 because the server rx mtu is 23. Where can I change this?&lt;/p&gt;
&lt;p&gt;Here is the log:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;0&amp;gt; &amp;lt;debug&amp;gt; nrf_ble_gatt: Peer on connection 0x0 requested an ATT MTU of 256 bytes.&lt;br /&gt;&amp;nbsp;0&amp;gt; &amp;lt;debug&amp;gt; nrf_ble_gatt: Updating ATT MTU to 43 bytes (desired: 43) on connection 0x0.&lt;br /&gt;&amp;nbsp;0&amp;gt; &amp;lt;debug&amp;gt; nrf_ble_gatt: server rx mtu 23, desired 43&lt;br /&gt;&amp;nbsp;0&amp;gt; &amp;lt;debug&amp;gt; nrf_ble_gatt: ATT MTU updated to 23 bytes on connection 0x0 (response).&lt;br /&gt;&amp;nbsp;0&amp;gt; BLE data len is set to 0x14 (20)&lt;br /&gt;&amp;nbsp;0&amp;gt; ATT MTU exchange completed. central 43 peripheral 43&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Extend the MTU with SDK 15.2</title><link>https://devzone.nordicsemi.com/thread/152185?ContentTypeID=1</link><pubDate>Tue, 09 Oct 2018 10:40:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1c77bd47-da72-4e75-9b0d-72f3c5ccbcdc</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello Oliver,&lt;/p&gt;
&lt;p&gt;There are examples in SDK15.2.0 that uses MTU larger than 20 Bytes, such as the ble_app_uart or ble_app_uart_c examples. Check out these examples to see how it is done.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>