Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

IOS 12.2 <-> SDK15.3 SD6.1 MTU Size issue

Hello,

Device NRF52 SDK15.3 SD 6.1 BLE_APP_UART

Host: IPAD mini 5th generation IOS 12.2

we are trying to configure BLE_APP_UART to communicate with IOS 12.2 device with max MTU size 244 bytes, but we are getting only 182.

We did modify GATT_INIT(...) function but still something is missing:

<code>

/**@brief Function for initializing the GATT library. */
void gatt_init(void){
ret_code_t err_code;
ble_opt_t opt;

err_code = nrf_ble_gatt_init(&m_gatt, gatt_evt_handler);
APP_ERROR_CHECK(err_code);

memset(&opt, 0x00, sizeof(opt)); // Extend connection option
opt.common_opt.conn_evt_ext.enable = 1;
err_code = sd_ble_opt_set(BLE_COMMON_OPT_CONN_EVT_EXT, &opt);
APP_ERROR_CHECK(err_code);

err_code = nrf_ble_gatt_att_mtu_periph_set(&m_gatt, 247); //NRF_SDH_BLE_GAP_DATA_LENGTH); 
APP_ERROR_CHECK(err_code);

err_code = nrf_ble_gatt_att_mtu_central_set(&m_gatt, NRF_SDH_BLE_GAP_DATA_LENGTH);
APP_ERROR_CHECK(err_code);

err_code = nrf_ble_gatt_data_length_set(&m_gatt, BLE_CONN_HANDLE_INVALID, NRF_SDH_BLE_GAP_DATA_LENGTH);
APP_ERROR_CHECK(err_code);
}

</code>

when we communicate with NRF Connect we are getting desired 244 data length , but it still something missing with IOS.

Can you please have a look and advise?

Thank you,

Andrew

Parents
  • Hi,

    You have to make sure the slave does not send the att mtu request, nor the DLE request. i.e. if you follow Apple bluetooth design guidelines and wait for the phone to do this you should be able to get the longer mtu size. iOS will negotiate data length first, then set the ATT MTU size depending on the PDU size.

  • Hi run_ar,

    Thank you for your reply.  two questions:

    1. when you referring to "Apple bluetooth design guidelines" , are you referring to "Accessory Design Guidelines", sections 23.7 "Data Packet Length Extension " and section 23.11 "MTU Size" or some other document?

    2. How I can disable ATT_MTU_Request on Nordic side, it looks like it does automatically once connection is established and no matter what device ie IOS/Android/Widows

    Thank you for your help and support,

    Regards,

    Andrew

Reply
  • Hi run_ar,

    Thank you for your reply.  two questions:

    1. when you referring to "Apple bluetooth design guidelines" , are you referring to "Accessory Design Guidelines", sections 23.7 "Data Packet Length Extension " and section 23.11 "MTU Size" or some other document?

    2. How I can disable ATT_MTU_Request on Nordic side, it looks like it does automatically once connection is established and no matter what device ie IOS/Android/Widows

    Thank you for your help and support,

    Regards,

    Andrew

Children
Related