<?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>MTU negotiation problem</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/71735/mtu-negotiation-problem</link><description>I&amp;#39;m facing a rather strange problem with an nRF52832 board I&amp;#39;m developing for. I&amp;#39;m using SDK 15.2 and S132 v6.0.0. 
 Sometimes, during the connection/negotiation phase, my device seems to get stuck in a weird state and can&amp;#39;t send notifications. I&amp;#39;ve examined</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 04 Mar 2021 10:28:45 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/71735/mtu-negotiation-problem" /><item><title>RE: MTU negotiation problem</title><link>https://devzone.nordicsemi.com/thread/297735?ContentTypeID=1</link><pubDate>Thu, 04 Mar 2021 10:28:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:03066d91-6466-434d-bd32-b25541b9eea8</guid><dc:creator>Marco Pennacchietti</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;for now I have resolved my problem, is not the best solution but all work now.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;I have removed the MTU request from nordic after connection in &amp;quot;on_connected_evt&amp;quot;.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In IOS:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I have tested all IOS version from IOS &amp;gt;=10 with bluetooth 4.0, 4.2 and 5.1. &lt;span class="VIiyi" lang="en"&gt;&lt;span class="JLqJ4b ChMk0b"&gt;&lt;span&gt;IOS always sends the MTU request&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; (185 byte) and my application work good.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;in Android:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The android phone don&amp;#39;t send the MTU request, so I have insert this request in android application. This is possible only with android &amp;gt;= 5.0.&lt;/p&gt;
&lt;p&gt;&lt;span class="VIiyi" lang="en"&gt;&lt;span class="JLqJ4b ChMk0b"&gt;&lt;span&gt;In this case I excluded the old android 4.4 from compatibility with my system&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Marco&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MTU negotiation problem</title><link>https://devzone.nordicsemi.com/thread/297715?ContentTypeID=1</link><pubDate>Thu, 04 Mar 2021 09:51:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d3f4f335-fbac-413a-bd3b-057389bdb133</guid><dc:creator>dingari</dc:creator><description>&lt;p&gt;Hi Simon,&lt;/p&gt;
&lt;p&gt;Just wanted to let you know that&amp;nbsp; there are two people answering this thread.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve gone around this problem for now by simply not requesting an MTU update from the peripheral. If I have time, I&amp;#39;ll check out your suggestions. Maybe it would be better for &lt;a href="https://devzone.nordicsemi.com/members/marco-pennacchietti"&gt;Marco Pennacchietti&lt;/a&gt; to start their own thread for this problem?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MTU negotiation problem</title><link>https://devzone.nordicsemi.com/thread/297703?ContentTypeID=1</link><pubDate>Thu, 04 Mar 2021 09:12:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:143f3db7-7842-4d1d-97a8-2a48bed4a406</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Okay, then the SoftDevice should handle this on its own. You should check how you&amp;#39;re enabling notifications from your central. Where in your application do you do this?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MTU negotiation problem</title><link>https://devzone.nordicsemi.com/thread/297370?ContentTypeID=1</link><pubDate>Wed, 03 Mar 2021 08:00:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f7fb294b-54c9-4c89-a0f3-017a1c8c855e</guid><dc:creator>Marco Pennacchietti</dc:creator><description>&lt;p&gt;&lt;span class="VIiyi" lang="en"&gt;&lt;span class="JLqJ4b ChMk0b"&gt;&lt;span&gt;Hi Simon,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="VIiyi" lang="en"&gt;&lt;span class="JLqJ4b ChMk0b"&gt;&lt;span&gt;my application derives from the &lt;strong&gt;ble_app_uart&lt;/strong&gt;, the &lt;strong&gt;on_write&lt;/strong&gt; function is in the place where nordic inserted it (&lt;strong&gt;ble_bas.c&lt;/strong&gt;, &lt;strong&gt;ble_dfu.c&lt;/strong&gt;, &lt;strong&gt;ble_nus.c&lt;/strong&gt; and &lt;strong&gt;ble_conn_params.c&lt;/strong&gt;) and I never touched the ble part.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="VIiyi" lang="en"&gt;&lt;span class="JLqJ4b ChMk0b"&gt;&lt;span&gt;Marco&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MTU negotiation problem</title><link>https://devzone.nordicsemi.com/thread/296575?ContentTypeID=1</link><pubDate>Fri, 26 Feb 2021 13:57:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:096f2a08-5721-40d8-be3a-3ae7b7eb55e8</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Please try one more thing. There is an event&amp;nbsp;you can call and wait for in order to check whether notifications are enabled as well. It might not be implemented in your application as it is characteristic specifig, but you can check the &lt;strong&gt;on_write&lt;/strong&gt;() function in the &lt;strong&gt;ble_app_uart&lt;/strong&gt; example for reference. The generated BLE_NUS_EVT_COMM_STARTED; will confirm that notifications are enabled here.&lt;/p&gt;
&lt;p&gt;Please let us know how and where you enable notifications from your central device.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MTU negotiation problem</title><link>https://devzone.nordicsemi.com/thread/296445?ContentTypeID=1</link><pubDate>Fri, 26 Feb 2021 08:49:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3cab2456-86f1-4fbc-8565-ed9b0aab1a4d</guid><dc:creator>Marco Pennacchietti</dc:creator><description>&lt;p&gt;The only 2 call are in the original file nrf_ble_gatt.c&amp;nbsp; (in &lt;strong&gt;nrf_ble_gatt_on_ble_evt&lt;/strong&gt; and &lt;strong&gt;on_connected_evt&lt;/strong&gt; routine&lt;/p&gt;
&lt;p&gt;Marco&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MTU negotiation problem</title><link>https://devzone.nordicsemi.com/thread/296195?ContentTypeID=1</link><pubDate>Thu, 25 Feb 2021 10:22:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c6949f98-50da-49c9-9a37-1701edc36a4b</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi again&lt;/p&gt;
&lt;p&gt;Can you check if you have an sd_ble_gattc_exchange_mtu_request() function somewhere else in your application, as an INVALID state from this function either means you&amp;#39;ve been disconnected (which does not seem to be the case) or that it an MTU request has already been sent, so it might be that this is called twice in your application for some reason.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MTU negotiation problem</title><link>https://devzone.nordicsemi.com/thread/296001?ContentTypeID=1</link><pubDate>Wed, 24 Feb 2021 11:36:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e0fc5e9a-5eb2-4fe1-b411-1af0bf70d1c1</guid><dc:creator>dingari</dc:creator><description>&lt;p&gt;Hi Simon,&lt;/p&gt;
&lt;p&gt;I understand. I just meant that the GATT module receives BLE_GAP_CONNECTED before my application.&lt;/p&gt;
&lt;p&gt;Don&amp;#39;t you think there&amp;#39;s an imposed problem if both peripheral and central simultaneously initiate an MTU update request? If I don&amp;#39;t request the MTU update from the peripheral, I never get in the strange state where my notifications fail with NRF_ERROR_INVALID_STATE.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MTU negotiation problem</title><link>https://devzone.nordicsemi.com/thread/295971?ContentTypeID=1</link><pubDate>Wed, 24 Feb 2021 09:41:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6f24eb1e-feb5-4acb-a84b-95775eb4c112</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I think we&amp;#39;re still misunderstanding one another. The MTU request is not&amp;nbsp;&lt;strong&gt;required by the Bluetooth specification,&amp;nbsp;&lt;/strong&gt;but we have opted to add this MTU request in our on_connected_evt.&amp;nbsp;&lt;strong&gt;on_connected_evt&amp;nbsp;&lt;/strong&gt;is not called before the BLE_GAP_CONNECTED event, but rather called when this event is triggered (l497 in&amp;nbsp;&lt;strong&gt;nrf_ble_gatt.c&lt;/strong&gt;)&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;void nrf_ble_gatt_on_ble_evt(ble_evt_t const * p_ble_evt, void * p_context)
{
    nrf_ble_gatt_t * p_gatt      = (nrf_ble_gatt_t *)p_context;
    uint16_t         conn_handle = p_ble_evt-&amp;gt;evt.common_evt.conn_handle;

    if (conn_handle &amp;gt;= NRF_BLE_GATT_LINK_COUNT)
    {
        return;
    }

    switch (p_ble_evt-&amp;gt;header.evt_id)
    {
        case BLE_GAP_EVT_CONNECTED:
            on_connected_evt(p_gatt, p_ble_evt);
            break;

        case BLE_GAP_EVT_DISCONNECTED:
            on_disconnected_evt(p_gatt, p_ble_evt);
            break;

        case BLE_GATTC_EVT_EXCHANGE_MTU_RSP:
            on_exchange_mtu_rsp_evt(p_gatt, p_ble_evt);
            break;

        case BLE_GATTS_EVT_EXCHANGE_MTU_REQUEST:
            on_exchange_mtu_request_evt(p_gatt, p_ble_evt);
            break;

#if !defined (S112)
        case BLE_GAP_EVT_DATA_LENGTH_UPDATE:
            on_data_length_update_evt(p_gatt, p_ble_evt);
            break;

        case BLE_GAP_EVT_DATA_LENGTH_UPDATE_REQUEST:
            on_data_length_update_request_evt(p_gatt, p_ble_evt);
            break;
#endif // !defined (S112)

        default:
            break;
    }
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MTU negotiation problem</title><link>https://devzone.nordicsemi.com/thread/295803?ContentTypeID=1</link><pubDate>Tue, 23 Feb 2021 11:23:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3d2aa032-fab5-426b-a5f6-7dc3f41ac55c</guid><dc:creator>dingari</dc:creator><description>&lt;p&gt;This is a bug in the SDK, then?&lt;/p&gt;
&lt;p&gt;Because if you look at the on_connected_evt function in nrf_ble_gatt.c, you&amp;#39;ll see that it will immediately &lt;strong&gt;request&lt;/strong&gt; an MTU update upon connection (before the application even receives the BLE_GAP_CONNECTED event. Regardless of central/peripheral role.&lt;/p&gt;
&lt;p&gt;The GATT module will handle an MTU update request from the central in any case (on_exchange_mtu_request_evt) and send a response. Is there a standard way to avoid/delay the request from the peripheral side without having to modify the SDK code?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MTU negotiation problem</title><link>https://devzone.nordicsemi.com/thread/295802?ContentTypeID=1</link><pubDate>Tue, 23 Feb 2021 11:17:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f67a3752-bae2-42ac-aa3e-266c73ae8c8c</guid><dc:creator>Simonr</dc:creator><description>[quote user="dingari"]It seems really logical that the event (0x3A) isn&amp;#39;t received if the peripheral does not send a request.[/quote]
&lt;p&gt;&amp;nbsp;Correct.&lt;/p&gt;
&lt;p&gt;a) It doesn&amp;#39;t have to, but when the Mac requests a value it doesn&amp;#39;t support (&amp;gt;251) the nRF52 will request a lower MTU.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Indeed, what Håkon says in that case still holds true in the Bluetooth spec. I&amp;#39;m sorry if I indicated that the MTU was required. I meant that the&amp;nbsp;&lt;strong&gt;response&lt;/strong&gt; will have to be handled&amp;nbsp;&lt;strong&gt;if&amp;nbsp;&lt;/strong&gt;there is an MTU request.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MTU negotiation problem</title><link>https://devzone.nordicsemi.com/thread/295681?ContentTypeID=1</link><pubDate>Mon, 22 Feb 2021 16:42:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2066081e-2ecc-4f4b-abca-2131c02cfc76</guid><dc:creator>dingari</dc:creator><description>&lt;p&gt;There seems to be a similar discussion going on &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/38758/why-is-ble_gatts_evt_exchange_mtu_request-coming-from-a-gatt-server"&gt;here&lt;/a&gt; (the thread is 2+ years old).&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/simonr"&gt;Simonr&lt;/a&gt; what are your thoughts on this?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MTU negotiation problem</title><link>https://devzone.nordicsemi.com/thread/295540?ContentTypeID=1</link><pubDate>Mon, 22 Feb 2021 10:54:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1fa6e173-8898-4480-96b8-b168947a1333</guid><dc:creator>dingari</dc:creator><description>&lt;p&gt;Even if I&amp;#39;m waiting for the MTU response (0x3A) in my nRF52 code before doing anything, sometimes I do not get the event.&lt;/p&gt;
&lt;p&gt;Also, like you can see in the macOS logs I provided in the original question, when it succeeds, the Mac sends a MTU request (515), then my nRF52 sends an MTU request (64), and then the Mac receives an MTU response (64).&lt;/p&gt;
&lt;p&gt;My question is:&lt;/p&gt;
&lt;p&gt;a) Does the nRF52 have to send an MTU request as a peripheral?&lt;br /&gt;b) If so, why could it be that sometimes the nRF52 does not send an MTU request, then?&lt;/p&gt;
&lt;p&gt;It seems really logical that the event (0x3A) isn&amp;#39;t received if the peripheral does not send a request.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Edit: One more datapoint: If I simply just don&amp;#39;t request the update from the nRF52 peripheral (return early from the on_connected_evt function), it seems to work fine every time. Could there be a timing issue between the nRF52 peripheral and the central sending simultaneous MTU update requests and the nRF52 get&amp;#39;s in a confused state?&lt;/p&gt;
&lt;p&gt;From nrf_ble_gatt.c:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;/**@brief Handle a connected event.
 *
 * Begins an ATT MTU exchange procedure, followed by a data length update request as necessary.
 *
 * @param[in]   p_gatt      GATT structure.
 * @param[in]   p_ble_evt   Event received from the BLE stack.
 */
static void on_connected_evt(nrf_ble_gatt_t * p_gatt, ble_evt_t const * p_ble_evt)
{
    ret_code_t            err_code;
    uint16_t              conn_handle = p_ble_evt-&amp;gt;evt.common_evt.conn_handle;
    nrf_ble_gatt_link_t * p_link      = &amp;amp;p_gatt-&amp;gt;links[conn_handle];

    // Update the link desired settings to reflect the current global settings.
#if !defined (S112)
    p_link-&amp;gt;data_length_desired = p_gatt-&amp;gt;data_length;
#endif // !defined (S112)

    switch (p_ble_evt-&amp;gt;evt.gap_evt.params.connected.role)
    {
        case BLE_GAP_ROLE_PERIPH:
            p_link-&amp;gt;att_mtu_desired = p_gatt-&amp;gt;att_mtu_desired_periph;
            break;

#if !defined (S112)
        case BLE_GAP_ROLE_CENTRAL:
            p_link-&amp;gt;att_mtu_desired = p_gatt-&amp;gt;att_mtu_desired_central;
            break;
#endif // !defined (S112)

        default:
            // Ignore.
            break;
    }

    return;

    // Begin an ATT MTU exchange if necessary.
    if (p_link-&amp;gt;att_mtu_desired &amp;gt; p_link-&amp;gt;att_mtu_effective)
    {
        NRF_LOG_DEBUG(&amp;quot;Requesting to update ATT MTU to %u bytes on connection 0x%x.&amp;quot;,
                      p_link-&amp;gt;att_mtu_desired, conn_handle);

        err_code = sd_ble_gattc_exchange_mtu_request(conn_handle, p_link-&amp;gt;att_mtu_desired);

        if (err_code == NRF_SUCCESS)
        {
            p_link-&amp;gt;att_mtu_exchange_requested = true;
        }
        else if (err_code == NRF_ERROR_BUSY)
        {
            p_link-&amp;gt;att_mtu_exchange_pending = true;
            NRF_LOG_DEBUG(&amp;quot;sd_ble_gattc_exchange_mtu_request()&amp;quot;
                          &amp;quot; on connection 0x%x returned busy, will retry.&amp;quot;, conn_handle);
        }
        else
        {
            NRF_LOG_ERROR(&amp;quot;sd_ble_gattc_exchange_mtu_request() returned %s.&amp;quot;,
                          nrf_strerror_get(err_code));
        }
    }

#if !defined (S112)
    // Send a data length update request if necessary.
    if (p_link-&amp;gt;data_length_desired &amp;gt; p_link-&amp;gt;data_length_effective)
    {
        (void) data_length_update(conn_handle, p_link-&amp;gt;data_length_desired);
    }
#endif // !defined (S112)
}
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Or is there a standard way to delay the peripheral MTU request, if none is received from the central?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MTU negotiation problem</title><link>https://devzone.nordicsemi.com/thread/295261?ContentTypeID=1</link><pubDate>Fri, 19 Feb 2021 07:27:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5d14d363-1abe-44cb-a4a5-06fcf0b555db</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Please ensure that the nRF52 waits for&amp;nbsp;the MTU response from the central device before moving on in the application.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MTU negotiation problem</title><link>https://devzone.nordicsemi.com/thread/295142?ContentTypeID=1</link><pubDate>Thu, 18 Feb 2021 14:28:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:49f4aff7-ae37-45d8-9a58-7639d79a7313</guid><dc:creator>Marco Pennacchietti</dc:creator><description>&lt;p&gt;I think that the problem is not IOS but is on the NORDIC chip.&lt;/p&gt;
&lt;p&gt;&lt;span class="VIiyi" lang="en"&gt;&lt;span class="JLqJ4b ChMk0b"&gt;&lt;span&gt;Now I have done an interesting test with the same phone but with another device that does not use the Nordic chip.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="VIiyi" lang="en"&gt;&lt;span class="JLqJ4b ChMk0b"&gt;&lt;span&gt;It is always the phone that first sends the MTU request and the device responds. The connection in this case is always fine.&lt;span class="JLqJ4b"&gt; &lt;/span&gt;I believe that the our problem may depend on the fact that in the connection an MTU request is sent too soon by the nrF52, indeed perhaps it should not be sent from the chip.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="VIiyi" lang="en"&gt;&lt;span class="JLqJ4b ChMk0b"&gt;&lt;span&gt;This is the situation:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="VIiyi" lang="en"&gt;&lt;span class="JLqJ4b ChMk0b"&gt;&lt;span&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/578x148/__key/communityserver-discussions-components-files/4/pastedimage1613658401524v1.png" /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MTU negotiation problem</title><link>https://devzone.nordicsemi.com/thread/295119?ContentTypeID=1</link><pubDate>Thu, 18 Feb 2021 13:45:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:58184c2b-cb53-4125-b626-ccfc4d141d43</guid><dc:creator>Marco Pennacchietti</dc:creator><description>&lt;p&gt;&lt;i&gt;I use IOS (IOS 14.2 iphone XSmax) as a central, connected with a device with nrF52832.&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;The application on IOS do not send back the ATT MTU response, so the device close the connection after 30 second and do not manage the &amp;quot;write request&amp;quot; from the phone.&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;&lt;span class="VIiyi" lang="en"&gt;&lt;span class="JLqJ4b ChMk0b"&gt;&lt;span&gt;i will try to follow your advice even if i work one level above the bt stack&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;&lt;span class="VIiyi" lang="en"&gt;&lt;span class="JLqJ4b ChMk0b"&gt;&lt;span&gt;this is what happens in my situation,&amp;nbsp; in the first a good connection in the second a bad connection:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;&lt;span class="VIiyi" lang="en"&gt;&lt;span class="JLqJ4b ChMk0b"&gt;&lt;span&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/627x333/__key/communityserver-discussions-components-files/4/pastedimage1613655868590v1.png" /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;Marco&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;&lt;/i&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MTU negotiation problem</title><link>https://devzone.nordicsemi.com/thread/295118?ContentTypeID=1</link><pubDate>Thu, 18 Feb 2021 13:41:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:97f36a9a-7710-4eb5-bc71-1f708914144a</guid><dc:creator>dingari</dc:creator><description>&lt;p&gt;This happens on Windows also. I&amp;#39;ve tried both using a custom application to do connection / service discovery, but also going through the Audio Midi Setup application in macOS (this is a Bluetooth MIDI device I&amp;#39;m developing).&lt;/p&gt;
&lt;p&gt;I&amp;#39;m using the nrf_ble_gatt module in the nRF52 SDK to handle the GATT MTU negotiations. I&amp;#39;ve tried making my nRF52 application wait for the MTU response, but then it just hangs indefinitely in the failure case.&lt;/p&gt;
&lt;p&gt;In the success case, I see a request from the central, as well as a request from my peripheral. Is there a specific reason why we would need this second request from the peripheral?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MTU negotiation problem</title><link>https://devzone.nordicsemi.com/thread/295080?ContentTypeID=1</link><pubDate>Thu, 18 Feb 2021 12:20:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2013821e-7919-41a1-8076-9e6ad63f053f</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Do these failures&amp;nbsp;&lt;strong&gt;only&amp;nbsp;&lt;/strong&gt;occur when using a Mac as the central? What kind of application do you have running on your Mac? It seems liek the application doesn&amp;#39;t wait for the ATT MTU update to complete and starts doing a&amp;nbsp;BLE_GATTS_EVT_WRITE before the ATT MTU update response returns. How are you handling the ATT MTU update in both central and peripheral? Please make sure that you are waiting for a response before moving on to the next event/process in your application.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MTU negotiation problem</title><link>https://devzone.nordicsemi.com/thread/294913?ContentTypeID=1</link><pubDate>Wed, 17 Feb 2021 15:17:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fb6d59dc-1e4f-4cf0-803d-2ecf8014a383</guid><dc:creator>Marco Pennacchietti</dc:creator><description>&lt;p&gt;YES is the same, because in the example of success he receive the:&lt;/p&gt;
&lt;p&gt;ATT MTU updated to 64 bytes on connection 0x1 (response)&lt;/p&gt;
&lt;p&gt;in case of failed this packet is not present&lt;/p&gt;
&lt;p&gt;Marco&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>