We'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 response is sent, and the connection eventually times out and fails.
We added the block to handle the new EXCHANGE_MTU_REQUEST calls from ios but as I said, this is never reached when communicating with iPhone 7.
case BLE_GATTS_EVT_EXCHANGE_MTU_REQUEST:
{
uint32_t err_code = sd_ble_gatts_exchange_mtu_reply(ble_evt->evt.gatts_evt.conn_handle, 23);
APP_ERROR_CHECK(err_code);
break;
}
Has anyone seen this and fixed it?
This seems related: https://devzone.nordicsemi.com/f/nordic-q-a/32460/nrf5-sdk-14-2-0-cannot-be-connected-by-ios/126444#126444
In addition, I tried adding this flag to my ble event handler:
case BLE_GAP_EVT_DATA_LENGTH_UPDATE_REQUEST
:
This code block is NOT HIT on iPhone 6/when the communication is successful. However, it IS HIT on iPhone 7, where it fails. There doesnt seem to be any codepath that handles this in my codebase on nrf52. Is it expected on nrf52 to handle this explicitly?
devzone.nordicsemi.com/.../nrf_ble_gatt_max_mtu_size-23-and-backwards-compatibility