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

Why can not set MAX_MTU_SIZE to 247?

On 52832, SDK V14.0.0, SD132-5.0

I tried to set NRF_SDH_BLE_GATT_MAX_MTU_SIZE to 247, as from dev-doc i saw that SD132 supports BLE V4.2 DLE.

However it returns:

ble_gatt: sd_ble_gap_data_length_update() (request) on connection 0x0 returned unexpected value 0x13.

When set MAX_MTU_SIZE to 23 this issue disappear.

Parents
  • @Petter Myhre

    Thank you for replying.

    I managed to resolve it, at least it looks to. I probably misunderstood the error message, it does not have to be local resource limitation, but from limitations in peer device.

    Not using a specific example mixed with my own codes. 52 is acting as peripheral of a iPad Air 2, which according to Apple it supports v4.2. I had thought it is due to 52 local setting limits so i reverted to 23, how ever when I turned on debug log immediately i saw iPad is requesting for a packet length of 185 - i think that's why i can not set PDU size to 247 - as iPad may refuse it, probably because its support of V4.2 is partial.

    So in the end as a solution i added PDU size exchange response of 247 to peer's request - as i still have 247 set in SDK_config.h. I still got the same error message but this action seems completed the negotiation procedure and PDU size ends up be set to 185.

    LOG:

    ble_gatt: Requesting to update ATT MTU to 247 bytes on connection 0x0.

    ble_gatt: Requesting to update data length to 251 on connection 0x0.

    ble_gatt: sd_ble_gap_data_length_update() (request) on connection 0x0 returned unexpected value 0x13.

    ble_gatt: ATT MTU updated to 185 bytes on connection 0x0 (response).

    Hope i am understanding the process correctly.

  • Hi Petter,

    I digged into nrf_ble_gatts.c deeper and checked the procedure, and i now get bit more clear picture of the problem. I think this problem is exactly the same as in this post: devzone.nordicsemi.com/.../

    I think the root cause is still iPad Air 2 not supporting V4.2 DLE, even though after one year in latest ios 11. So the LL packet length is anyway to be only 27 bytes.

    However, the ATT layer MTU size can be negotiated and 185 is the up limit on iPad side (as shown in the sniffer captured in above link).

    sd_ble_gap_data_length_update() returning error is indeed because of the gap event length. I tried to check limits parameters and even with 4(5ms) it still 23bytes shorter so sd_ble_gap_data_length_update() returned 0x13. When set to 5(6ms) sd_ble_gap_data_length_update() succeeded locally and no error message printed, but then iPad refused the LL_LENGTH_REQ so BLE_GAP_EVT_DATA_LENGTH_UPDATE is returned with max_rx_octets: 27 that iPad can only support.

    Seems we can only find larger LL PDU support on iPhone 8 and X .

Reply
  • Hi Petter,

    I digged into nrf_ble_gatts.c deeper and checked the procedure, and i now get bit more clear picture of the problem. I think this problem is exactly the same as in this post: devzone.nordicsemi.com/.../

    I think the root cause is still iPad Air 2 not supporting V4.2 DLE, even though after one year in latest ios 11. So the LL packet length is anyway to be only 27 bytes.

    However, the ATT layer MTU size can be negotiated and 185 is the up limit on iPad side (as shown in the sniffer captured in above link).

    sd_ble_gap_data_length_update() returning error is indeed because of the gap event length. I tried to check limits parameters and even with 4(5ms) it still 23bytes shorter so sd_ble_gap_data_length_update() returned 0x13. When set to 5(6ms) sd_ble_gap_data_length_update() succeeded locally and no error message printed, but then iPad refused the LL_LENGTH_REQ so BLE_GAP_EVT_DATA_LENGTH_UPDATE is returned with max_rx_octets: 27 that iPad can only support.

    Seems we can only find larger LL PDU support on iPhone 8 and X .

Children
No Data
Related