In previous questions I inquired about setting the MTU size beyond 27 and thank to the answers I, indeed, manage to compile and run my program with larger MTU size definitions (by changing the value of NRF_SDH_BLE_GATT_MAX_MTU_SIZE and RAM allocation).
However, when coming to negotiation with the client (an Android phone) I failed to understand how to get the maximal supported size (and only found out empirically that I cannot send packets beyond 20 bytes).
In a previous answer I understood that calling "sd_ble_gap_data_length_update(uint16_t conn_handle, ble_gap_data_length_params_t const *p_dl_params, ble_gap_data_length_limitation_t *p_dl_limitation)" with a null p_dl_params and a non-null p_dl_params will result in the maximal available values in the p_dl_limitation. However, I get all zeros in the returned structure.
Please advise how can I get the phone mtu size limit.
Thanks,
Daniel