GATTC_SetPreferredMtu

C

uint16_t GATTC_SetPreferredMtu(uint16_t preferredMtuCentral);

Description

Configures the preferred ATT MTU size for the GATT Client in the central role.

Note

When connection established with remote peer, GATT client will initiate MTU negotiation with remote peer. By default,BLE_ATT_MAX_MTU_LEN will be used to negotiate with remote.If user sets preferred MTU, the set value will be used to negotiate with remote. The preferred MTU does not apply to existing connections. Use GATTC_ExchangeMTURequest for connected state MTU exchange. This API is optional and only affects the central role.

Parameters

ParameterDescription
[in] preferredMtuCentralPreferred ATT MTU size.

Return values

Return valueDescription
MBA_RES_SUCCESSSuccessfully configured the preferred MTU.
MBA_RES_INVALID_PARAInvalid MTU size specified.