GATTC_ExchangeMTURequest
C
uint16_t GATTC_ExchangeMTURequest(uint16_t connHandle, uint16_t mtuLen);Description
GATT Client sends Exchange MTU Request to GATT Server.
If the requested MTU length is less than BLE_ATT_DEFAULT_MTU_LEN then BLE_ATT_DEFAULT_MTU_LEN is requested.
If the requested MTU length is greater than BLE_ATT_MAX_MTU_LEN then BLE_ATT_MAX_MTU_LEN is requested.
Events generated
GATTC_EVT_ERROR_RESP Generated when fail to exchange MTU.
ATT_EVT_UPDATE_MTU Generated when MTU exchanges successfully.
ATT_EVT_TIMEOUT Generated when server does not respond the request.
Parameters
| Parameter | Description | 
|---|---|
| [in] connHandle | Handle of the connection to send Exchange MTU Request. | 
| [in] mtuLen | Requested MTU length (Range is BLE_ATT_DEFAULT_MTU_LEN to BLE_ATT_MAX_MTU_LEN, inclusive of both limits) | 
Return values
| Return value | Description | 
|---|---|
| MBA_RES_SUCCESS | Successfully starts the Exchange MTU Request. | 
| MBA_RES_FAIL | Operation rejected. This request cannot be performed over BR/EDR link. | 
| MBA_RES_OOM | Internal memory allocation failure. | 
| MBA_RES_INVALID_PARA | Invalid connection handle. | 
| MBA_RES_BUSY | GATT Client is busy. Another request is ongoing. | 
