gatt_client_get_mtu() function
MTU is available after the first query has completed. If status is equal to ERROR_CODE_SUCCESS, it returns the real value, otherwise the default value ATT_DEFAULT_MTU (see bluetooth.h).
Return value
status ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER if no HCI connection for con_handle is found BTSTACK_MEMORY_ALLOC_FAILED if no GATT client for con_handle could be allocated GATT_CLIENT_IN_WRONG_STATE if MTU is not exchanged and MTU auto-exchange is disabled ERROR_CODE_SUCCESS if query is successfully registered