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.

  • I'm pretty sure that sd_ble_gap_data_length_update() returns the error because you have set the event length to 3 (3.75 ms) this is not enough time to transfer a packet pair with 251 LL PDUs. It needs to be minimum 4 (5 ms), and more if you want to send multiple packets in each connection interval.

Reply Children
No Data
Related