I am writing an APP for comunicating with my nRF peripheral. I've set the MTU size to 251 and this works fine under bluez or android.
But if I try it in iOS (>10.0) I get only 185 bytes. Is there any way to increase it with DLE (data length extension).
So far the internet says no, but as I studied the BLE 4.2 standard it should be possible?
For the IOS, you need to do the Data length request first and then wait for the MTU request from IOS side.
From my experience,
if you are using the SDK 15.3 and would like to get the MTU > 185 with IOS, nRF52 can't send the MTU request initiative.
You can just comment out.
I used the example (ble_app_uart…
Constantin said: I studied the BLE 4.2 standard it should be possible?
iOS may well place its own restrictions on what it will allow.
You will have to check iOS documentation for that ...
But I've already checked the macOSX docu and it is only possible to get the information about the current MTU size. But it is so far not possible to extend it. As I said, the MTU size is advertized by the peripheral and then negotiated. It might be possible to force iOS to enable the DLE in the BLE 4.2 standard because the 185 bytes are without DLE.
We found this information a while back:
iPhone iOS 8 has a maximum MTU size of 135 bytes, iOS 9 158 bytes and iOS 10 185 bytes, I found a workaround which increases iOS 10 MTU size to 247 bytes which I will test with and update Git.
trouble is I don't remember what the workaround was .. or even if it actually worked.
Maybe look at this link
Mh I've tested the solution below the link but it did not solve the issue. Still I am only getting 185 bytes.
<debug> ble_gatt: Requesting to update ATT MTU to 247 bytes on connection 0x0.<debug> ble_gatt: Requesting to update data length to 251 on connection 0x0.<info> app: Connected to 54:A1:E4:F9:F9:52<debug> ble_gatt: ATT MTU updated to 185 bytes on connection 0x0 (response).<info> app: Data len is set to 182 bytes.<info> app: p_evt->conn_handle: 0x0<debug> app: ATT MTU exchange completed. central 0xF7 peripheral 0xF7<debug> app: BLE_GATTC_EVT_EXCHANGE_MTU_RSP<debug> ble_gatt: Data length updated to 27 on connection 0x0.<debug> ble_gatt: max_rx_octets: 27<debug> ble_gatt: max_tx_octets: 27<debug> ble_gatt: max_rx_time: 328<debug> ble_gatt: max_tx_time: 328<debug> app: ATT MTU exchange completed. central 0xF7 peripheral 0xF7