<?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>iPhone 7, nrf52, and BLE_GATTS_EVT_EXCHANGE_MTU_REQUEST never sent</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/34601/iphone-7-nrf52-and-ble_gatts_evt_exchange_mtu_request-never-sent</link><description>We&amp;#39;ve recently migrated to SDK 14.2.0. Our app, running on iPhone 6, sends the BLE_GATTS_EVT_EXCHANGE_MTU_REQUEST and the connection is made and works correctly. 
 On an iPhone 7 (and X), the BLE_GATTS_EVT_EXCHANGE_MTU_REQUEST is never received, so no</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 21 May 2018 23:23:29 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/34601/iphone-7-nrf52-and-ble_gatts_evt_exchange_mtu_request-never-sent" /><item><title>RE: iPhone 7, nrf52, and BLE_GATTS_EVT_EXCHANGE_MTU_REQUEST never sent</title><link>https://devzone.nordicsemi.com/thread/132620?ContentTypeID=1</link><pubDate>Mon, 21 May 2018 23:23:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c58ff473-e466-4a14-8894-4ac9f80e985e</guid><dc:creator>mfdevzone</dc:creator><description>&lt;p&gt;I will respond to and close my own question. What we were seeing is that on iPhone 7 the codepath would NOT HIT the BLE_GATTS_EVT_EXCHANGE_MTU_REQUEST. What was found to be missing was any handling (and therefore, any response) to the preceding BLE_GAP_EVT_DATA_LENGTH_UPDATE_REQUEST message. I added this snipped to my handler:&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; case BLE_GAP_EVT_DATA_LENGTH_UPDATE_REQUEST:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ble_gap_data_length_params_t dl_params;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; memset(&amp;amp;dl_params, 0, sizeof(ble_gap_data_length_params_t));&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; uint32_t err_code = sd_ble_gap_data_length_update(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ble_evt-&amp;gt;evt.gap_evt.conn_handle,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;amp;dl_params, NULL);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; APP_ERROR_CHECK(err_code);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;/p&gt;
&lt;p&gt;And this allows the handshake sequence to complete on iPhone 7.&lt;/p&gt;
&lt;p&gt;NOTE: I have no idea why this works, other than the request is at least handled.&lt;/p&gt;
&lt;p&gt;Useful additional tickets:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/32460/nrf5-sdk-14-2-0-cannot-be-connected-by-ios/126444#126444"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/32460/nrf5-sdk-14-2-0-cannot-be-connected-by-ios/126444#126444&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/21488/nrf_ble_gatt_max_mtu_size-23-and-backwards-compatibility"&gt;devzone.nordicsemi.com/.../nrf_ble_gatt_max_mtu_size-23-and-backwards-compatibility&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>