ATT_MAINTAIN_IN_HOST#

Typedefs#

typedef void(*
rsi_ble_on_mtu_exchange_info_t)(rsi_ble_event_mtu_exchange_information_t *rsi_ble_event_mtu_exchange_info)

Callback function called to indicate MTU exchange details. This callback provides information about the MTU size negotiation and indicates the initiator of the MTU exchange process (local or remote device). It is triggered during the MTU exchange process after establishing a BLE connection. This callback has to be registered using rsi_ble_gatt_extended_register_callbacks API.

Functions#

int32_t
rsi_ble_mtu_exchange_event(uint8_t *dev_addr, uint8_t mtu_size)

Initiates the MTU exchange request with the remote device.
This is a blocking API and will receive a callback event rsi_ble_on_mtu_event_t as the response for this API.

int32_t
rsi_ble_gatt_write_response(uint8_t *dev_addr, uint8_t type)

Send the response to the write request received from the remote device. This is a blocking API.

int32_t
rsi_ble_gatt_prepare_write_response(uint8_t *dev_addr, uint16_t handle, uint16_t offset, uint16_t length, const uint8_t *data)

Send the response for the prepare write requests received from the remote device. This is a blocking API.

Typedef Documentation#

rsi_ble_on_mtu_exchange_info_t#

void(* rsi_ble_on_mtu_exchange_info_t)(rsi_ble_event_mtu_exchange_information_t *rsi_ble_event_mtu_exchange_info) )(rsi_ble_event_mtu_exchange_information_t *rsi_ble_event_mtu_exchange_info)

Callback function called to indicate MTU exchange details. This callback provides information about the MTU size negotiation and indicates the initiator of the MTU exchange process (local or remote device). It is triggered during the MTU exchange process after establishing a BLE connection. This callback has to be registered using rsi_ble_gatt_extended_register_callbacks API.

Parameters
TypeDirectionArgument NameDescription
[out]rsi_ble_event_mtu_exchange_info

contains the MTU exchange information. Refer to rsi_ble_event_mtu_exchange_information_s for more details.

Note

  • When services are maintained on the host, this API need to be triggered by the application.


Function Documentation#

rsi_ble_mtu_exchange_event#

int32_t rsi_ble_mtu_exchange_event (uint8_t * dev_addr, uint8_t mtu_size)

Initiates the MTU exchange request with the remote device.
This is a blocking API and will receive a callback event rsi_ble_on_mtu_event_t as the response for this API.

Parameters
TypeDirectionArgument NameDescription
uint8_t *[in]dev_addr

- remote device address

uint8_t[in]mtu_size

- requested MTU value

Returns

  • The following values are returned:

    • 0 - Success

    • Non-Zero Value - Failure

    • 0x4D04 - BLE not Connected

    • 0x4E62 - Invalid Parameters

Note

  • Refer to the Status Codes section for the above error codes at wiseconnect-status-codes

  • When services are maintained on the host, this API need to be triggered by the application.


rsi_ble_gatt_write_response#

int32_t rsi_ble_gatt_write_response (uint8_t * dev_addr, uint8_t type)

Send the response to the write request received from the remote device. This is a blocking API.

Parameters
TypeDirectionArgument NameDescription
uint8_t *[in]dev_addr

- remote device address

uint8_t[in]type

- response type

  • 0 - write response,

  • 1 - execute write response.

Returns

  • The following values are returned:

    • 0 - Success

    • Non-Zero Value - Failure

    • 0x4046 - Invalid Arguments

    • 0x4D04 - BLE not Connected

Note

  • Refer to the Status Codes section for the above error codes at wiseconnect-status-codes

  • When services are maintained on the host, this API need to be triggered by the application.


rsi_ble_gatt_prepare_write_response#

int32_t rsi_ble_gatt_prepare_write_response (uint8_t * dev_addr, uint16_t handle, uint16_t offset, uint16_t length, const uint8_t * data)

Send the response for the prepare write requests received from the remote device. This is a blocking API.

Parameters
TypeDirectionArgument NameDescription
uint8_t *[in]dev_addr

- remote device address

uint16_t[in]handle

- attribute value handle

uint16_t[in]offset

- attribute value offset

uint16_t[in]length

- attribute value length

const uint8_t *[in]data

- attribute value

Returns

  • The following values are returned:

    • 0 - Success

    • Non-Zero Value - Failure

    • 0x4046 - Invalid Arguments

    • 0x4D04 - BLE not Connected

Note

  • Refer to the Status Codes section for the above error codes at wiseconnect-status-codes

  • When services are maintained on the host, this API need to be triggered by the application.