nrf-softdevice-s122

Crates

git

Versions

default

Flavors

pub unsafe fn sd_ble_gattc_exchange_mtu_request(
conn_handle: u16,
client_rx_mtu: u16
) -> u32
Expand description

@brief Start an ATT_MTU exchange by sending an Exchange MTU Request to the server.

@details The SoftDevice sets ATT_MTU to the minimum of: - The Client RX MTU value, and - The Server RX MTU value from @ref BLE_GATTC_EVT_EXCHANGE_MTU_RSP.

      However, the SoftDevice never sets ATT_MTU lower than @ref BLE_GATT_ATT_MTU_DEFAULT.

@events @event{@ref BLE_GATTC_EVT_EXCHANGE_MTU_RSP} @endevents

@mscs @mmsc{@ref BLE_GATTC_MTU_EXCHANGE} @endmscs

@param[in] conn_handle The connection handle identifying the connection to perform this procedure on. @param[in] client_rx_mtu Client RX MTU size. - The minimum value is @ref BLE_GATT_ATT_MTU_DEFAULT. - The maximum value is @ref ble_gatt_conn_cfg_t::att_mtu in the connection configuration used for this connection. - The value must be equal to Server RX MTU size given in @ref sd_ble_gatts_exchange_mtu_reply if an ATT_MTU exchange has already been performed in the other direction.

@retval ::NRF_SUCCESS Successfully sent request to the server. @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle. @retval ::NRF_ERROR_INVALID_STATE Invalid connection state or an ATT_MTU exchange was already requested once. @retval ::NRF_ERROR_INVALID_PARAM Invalid Client RX MTU size supplied. @retval ::NRF_ERROR_BUSY Client procedure already in progress. @retval ::NRF_ERROR_TIMEOUT There has been a GATT procedure timeout. No new GATT procedure can be performed without reestablishing the connection.