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
Parameter | Description |
---|---|
[in] preferredMtuCentral | Preferred ATT MTU size. |
Return values
Return value | Description |
---|---|
MBA_RES_SUCCESS | Successfully configured the preferred MTU. |
MBA_RES_INVALID_PARA | Invalid MTU size specified. |