nrf-softdevice-s122

Crates

git

Versions

default

Flavors

pub unsafe fn sd_ble_gatts_exchange_mtu_reply(
conn_handle: u16,
server_rx_mtu: u16
) -> u32
Expand description

@brief Reply to an ATT_MTU exchange request by sending an Exchange MTU Response to the client.

@details This function is only used to reply to a @ref BLE_GATTS_EVT_EXCHANGE_MTU_REQUEST event.

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

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

@mscs @mmsc{@ref BLE_GATTS_MTU_EXCHANGE} @endmscs

@param[in] conn_handle The connection handle identifying the connection to perform this procedure on. @param[in] server_rx_mtu Server 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 Client RX MTU size given in @ref sd_ble_gattc_exchange_mtu_request if an ATT_MTU exchange has already been performed in the other direction.

@retval ::NRF_SUCCESS Successfully sent response to the client. @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle. @retval ::NRF_ERROR_INVALID_STATE Invalid Connection State or no ATT_MTU exchange request pending. @retval ::NRF_ERROR_INVALID_PARAM Invalid Server RX MTU size supplied. @retval ::NRF_ERROR_TIMEOUT There has been a GATT procedure timeout. No new GATT procedure can be performed without reestablishing the connection.