This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

iOS MTU size why only 185 bytes

Hi,

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?

Best regards,

C.W.

Parents
  • 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.

  • 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) in SDK 15.3.

  • This solution works for iOS.

    BUT if I want to connect to an Android phone now, the mtu size on smartphone side remains on 20 bytes, so no update of MTU happens @Android.

    Does anyone have a solution for this problem?

    Regards,
    Daniel

  • Hi Daniel, 

    Does your app send a MTU request if it's not received from the central first? The sniffer trace posted by Jimmy shows that the slave is issuing the DLE request while the MTU request is sent from the iPhone. 

    Message sequence charts for reference:

    GATTC ATT_MTU Exchange

    GATTS ATT_MTU Exchange

  •  there is no MTU request.
    And that is the problem.

    If I do not comment out the Jimmy Wong shown lines to fix the iOS problem, everything is fine.
    But I want to allow full speed, full datalength (payload of 244) on both, iOS and Android.

    Is there any other way to get the full 244 bytes of payload length and not commenting out these lines of code?

  • I think a solution to this can be to use an app timer instance to issue a MTU request if you are not receiving it from the central within a few seconds after connection. Either way, it seems like you have to do some modifications to the GATT module to get the maximum data length from the iPhone. 

Reply
  • I think a solution to this can be to use an app timer instance to issue a MTU request if you are not receiving it from the central within a few seconds after connection. Either way, it seems like you have to do some modifications to the GATT module to get the maximum data length from the iPhone. 

Children
No Data