Hi,
What is the maximum ATT MTU size for the BLE NUS?
While programming my BLE NUS server application I constantly ran into the problem that my MTU and length updates cause NRF_ERROR_INVALID_PARAM errors. I solved it by setting the MTU size for my connection configuration (ble_cfg_t.conn_cfg.params.gatt_conn_cfg.att_mtu
) and the next established connection (nrf_ble_gatt_att_mtu_periph_set()
) to 248 (found by trial-and-error and only working in that particular case...).
Where does this magical number come from? Does this mean my max. transmittable data length is 245 (ATT_MTU - OPCODE_LENGTH - HANDLE_LENGTH)?
I also found some information in the specification of another SoftDevice stack (S132, I think...) saying something about a GATT server ATT MTU with the value 247... Is it connected somehow? If yes - why 247?
Environment
- nRF52 (nRF52840)
- SDK 13 (13.1.0)
- SoftDevice S140 (5.0.0-2.alpha)