Event Types#

This section provides a reference to Bluetooth Low Energy (BLE) API events.

Modules#

rsi_ble_event_adv_report_s

rsi_ble_event_conn_status_s

rsi_ble_event_enhnace_conn_status_s

rsi_ble_event_disconnect_s

rsi_ble_event_le_ping_time_expired_s

rsi_bt_event_le_ltk_request_s

rsi_bt_event_le_security_keys_s

rsi_bt_event_encryption_enabled_s

rsi_bt_event_smp_req_s

rsi_bt_event_smp_resp_s

rsi_bt_event_smp_passkey_s

rsi_bt_event_smp_passkey_display_s

rsi_bt_event_sc_passkey_s

rsi_bt_event_smp_failed_s

rsi_bt_event_sc_method_s

rsi_bt_event_ctkd_s

rsi_ble_event_phy_update_s

rsi_ble_event_conn_update_s

rsi_ble_event_remote_conn_param_req_s

rsi_ble_event_remote_features_s

rsi_ble_event_le_dev_buf_ind_s

rsi_ble_event_data_length_update_s

uuid128_s

uuid_s

rsi_ble_event_error_resp_s

rsi_ble_event_gatt_desc_s

rsi_ble_event_profiles_list_s

rsi_ble_event_profile_by_uuid_s

rsi_ble_event_read_by_type1_s

rsi_ble_event_read_by_type2_s

rsi_ble_event_read_by_type3_s

rsi_ble_event_att_value_s

rsi_ble_set_att_resp_s

rsi_ble_prepare_write_resp_s

rsi_ble_resp_profiles_list_s

rsi_ble_resp_query_profile_descriptor_s

rsi_ble_resp_char_serv_s

rsi_ble_resp_inc_serv

rsi_ble_resp_att_value_s

rsi_ble_resp_att_descs_s

rsi_ble_resp_add_serv_s

rsi_ble_resp_local_att_value_s

rsi_ble_event_remote_device_info_s

rsi_ble_event_rcp_rcvd_info_s

rsi_ble_event_write_s

rsi_ble_event_prepare_write_s

rsi_ble_execute_write_s

rsi_ble_read_req_s

rsi_ble_event_mtu_s

rsi_ble_event_mtu_exchange_information_s

rsi_ble_event_directedadv_report_s

rsi_ble_event_cbfc_conn_req_s

rsi_ble_event_cbfc_conn_complete_s

rsi_ble_event_cbfc_rx_data_s

rsi_ble_event_cbfc_disconn_s

rsi_ble_ae_adv_report_s

rsi_ble_per_adv_sync_estbl_s

rsi_ble_per_adv_report_s

rsi_ble_per_adv_sync_lost_s

rsi_ble_scan_timeout_s

rsi_ble_adv_set_terminated_s

rsi_ble_scan_req_recvd_s

chip_ble_buffers_stats_s

Constants

GAP

Test Mode

Common

Synchronous Client

Server

Asynchronous Client

Callbacks Declarations

Register Callbacks

Typedefs#

Structure representing an advertising report event.

Structure representing the connection status event in the module.

Structure representing the enhanced connection status event in the module.

Disconnection event structure.

The structure represents the LE ping timeout expired event.

The structure represents the Long Term Key (LTK) request event.

The structure represents security keys event.

Structure to hold the event data for encryption enabled event.

typedef struct rsi_bt_event_smp_req_s

Structure to hold the Security Manager Protocol (SMP) request event.

Structure to hold the SMP response event data.

Structure to hold the SMP passkey event data.

Structure to hold the SMP passkey display event.

Structure to hold the Secure Connections (SC) passkey event.

Structure to hold the information related to Security Manager Protocol (SMP) failed event.

Structure to define the Bluetooth event security method.

typedef struct rsi_bt_event_ctkd_s

Structure representing the event for Cross Transport Key Derivation (CTKD).

The structure holds PHY update event information.

Structure holds the data related to connection update event.

The structure represents the parameters of a remote connection parameter request event.

Structure holds the data of the remote features event.

Structure holds the LE device buffer indication event.

Structure representing the data for the length update event.

typedef struct uuid128_s

Structure representing a 128-bit Universal Unique IDentifier (UUID).

typedef uint16_t

16 bit UUID format structure

typedef uint32_t

32 bit UUID format structure

typedef struct uuid_s

Structure representing a Universally Unique Identifier (UUID).

The Structure represents the error response event of GATT.

Structure representing a GATT descriptor event.

Structure representing the BLE event profiles list.

Structure to hold the BLE event profile by UUID.

Structure representing the BLE event for reading characteristic services by type.

Structure contains the service information received during the GATT read included services event.

Structure contains the service information received during the GATT read value by UUID event.

Structure representing the ATT value on GATT read response event.

typedef struct rsi_ble_set_att_resp_s

The structure represents the set attribute response.

The structure represents the prepare write response.

The structure shows the list of received profiles. The maximum supported number of received profiles is 5.

The Structure represents the list of received profile descriptors of a particular profile. The maximum supported number of received profile descriptors is 5.

Structure to hold the response of characteristic services.

typedef struct rsi_ble_resp_inc_serv

The structure represents the list of received included service attributes of a particular included service. The maximum supported number of received included service attributes is 5.

Structure represents the response for a Attribute Protocol (ATT) value.

Structure represents the list of received attribute descriptors. The maximum supported number of received attribute descriptors is 5.

Structure represents the add new service response.

Structure represents the response for local attribute value.

Structure represents the remote device information event.

Structure represents the received Remote Control Protocol (RCP) information event.

typedef struct rsi_ble_event_write_s

Structure indicates the received write information from the remote device.

Structure represents the GATT prepare write event.

Structure representing the BLE execute write request.

typedef struct rsi_ble_read_req_s

Structure representing the BLE read request.

typedef struct rsi_ble_event_mtu_s

Structure to hold the BLE MTU event information.

Structure to hold the MTU exchange information event.

Structure to hold the information of a directed advertising report event.

Structure representing the CBFC connection request event.

Structure representing the CBFC connection complete event.

Structure representing the CBFC received data event.

Structure representing the CBFC disconnection event.

ae adv report event

ae periodic sync establishment report event

ae periodic adv report event

ae periodic sync lost report event

typedef struct rsi_ble_scan_timeout_s

ae scan timeout report event

ae adv set terminated report event

ae scan request recvd report event

Structure representing the BLE buffer statistics.

Functions#

uint8_t
rsi_convert_db_to_powindex(int8_t tx_power_in_dBm)

Converts the given transmit power in dBm to power index.

uint32_t
rsi_ble_cbfc_connreq(uint8_t *dev_addr, uint16_t psm)

Sends a connection request to a remote device using the Credit Based Flow Control (CBFC) mechanism.

uint32_t
rsi_ble_cbfc_connresp(uint8_t *dev_addr, uint16_t lcid, uint8_t result)

Sends a connection response for a credit-based flow control (CBFC) connection.

uint32_t
rsi_ble_cbfc_data_tx(uint8_t *dev_addr, uint16_t lcid, uint16_t len, uint8_t *p_data)

Transmits data over a CBFC channel in the BLE module.

uint32_t
rsi_ble_cbfc_disconnect(uint8_t *dev_addr, uint16_t lcid)

Disconnects a Connection-Based Flow Control (CBFC) connection with the specified device address and logical channel ID.

Typedef Documentation#

rsi_ble_event_adv_report_t#

typedef struct rsi_ble_event_adv_report_s rsi_ble_event_adv_report_t

Structure representing an advertising report event.


rsi_ble_event_conn_status_t#

typedef struct rsi_ble_event_conn_status_s rsi_ble_event_conn_status_t

Structure representing the connection status event in the module.


rsi_ble_event_enhance_conn_status_t#

typedef struct rsi_ble_event_enhnace_conn_status_s rsi_ble_event_enhance_conn_status_t

Structure representing the enhanced connection status event in the module.


rsi_ble_event_disconnect_t#

typedef struct rsi_ble_event_disconnect_s rsi_ble_event_disconnect_t

Disconnection event structure.

This structure contains information about the disconnection event.


rsi_ble_event_le_ping_time_expired_t#

typedef struct rsi_ble_event_le_ping_time_expired_s rsi_ble_event_le_ping_time_expired_t

The structure represents the LE ping timeout expired event.


rsi_bt_event_le_ltk_request_t#

typedef struct rsi_bt_event_le_ltk_request_s rsi_bt_event_le_ltk_request_t

The structure represents the Long Term Key (LTK) request event.


rsi_bt_event_le_security_keys_t#

typedef struct rsi_bt_event_le_security_keys_s rsi_bt_event_le_security_keys_t

The structure represents security keys event.


rsi_bt_event_encryption_enabled_t#

typedef struct rsi_bt_event_encryption_enabled_s rsi_bt_event_encryption_enabled_t

Structure to hold the event data for encryption enabled event.


rsi_bt_event_smp_req_t#

typedef struct rsi_bt_event_smp_req_s rsi_bt_event_smp_req_t

Structure to hold the Security Manager Protocol (SMP) request event.


rsi_bt_event_smp_resp_t#

typedef struct rsi_bt_event_smp_resp_s rsi_bt_event_smp_resp_t

Structure to hold the SMP response event data.


rsi_bt_event_smp_passkey_t#

typedef struct rsi_bt_event_smp_passkey_s rsi_bt_event_smp_passkey_t

Structure to hold the SMP passkey event data.


rsi_bt_event_smp_passkey_display_t#

typedef struct rsi_bt_event_smp_passkey_display_s rsi_bt_event_smp_passkey_display_t

Structure to hold the SMP passkey display event.


rsi_bt_event_sc_passkey_t#

typedef struct rsi_bt_event_sc_passkey_s rsi_bt_event_sc_passkey_t

Structure to hold the Secure Connections (SC) passkey event.


rsi_bt_event_smp_failed_t#

typedef struct rsi_bt_event_smp_failed_s rsi_bt_event_smp_failed_t

Structure to hold the information related to Security Manager Protocol (SMP) failed event.


rsi_bt_event_sc_method_t#

typedef struct rsi_bt_event_sc_method_s rsi_bt_event_sc_method_t

Structure to define the Bluetooth event security method.


rsi_ble_event_ctkd_t#

typedef struct rsi_bt_event_ctkd_s rsi_ble_event_ctkd_t

Structure representing the event for Cross Transport Key Derivation (CTKD).

This structure is used to define the parameters for the events related to CTKD, that includes the remote device address, and the derived key.


rsi_ble_event_phy_update_t#

typedef struct rsi_ble_event_phy_update_s rsi_ble_event_phy_update_t

The structure holds PHY update event information.


rsi_ble_event_conn_update_t#

typedef struct rsi_ble_event_conn_update_s rsi_ble_event_conn_update_t

Structure holds the data related to connection update event.


rsi_ble_event_remote_conn_param_req_t#

typedef struct rsi_ble_event_remote_conn_param_req_s rsi_ble_event_remote_conn_param_req_t

The structure represents the parameters of a remote connection parameter request event.


rsi_ble_event_remote_features_t#

typedef struct rsi_ble_event_remote_features_s rsi_ble_event_remote_features_t

Structure holds the data of the remote features event.


rsi_ble_event_le_dev_buf_ind_t#

typedef struct rsi_ble_event_le_dev_buf_ind_s rsi_ble_event_le_dev_buf_ind_t

Structure holds the LE device buffer indication event.


rsi_ble_event_data_length_update_t#

typedef struct rsi_ble_event_data_length_update_s rsi_ble_event_data_length_update_t

Structure representing the data for the length update event.


uuid128_t#

typedef struct uuid128_s uuid128_t

Structure representing a 128-bit Universal Unique IDentifier (UUID).


uuid16_t#

typedef uint16_t uuid16_t

16 bit UUID format structure


uuid32_t#

typedef uint32_t uuid32_t

32 bit UUID format structure


uuid_t#

typedef struct uuid_s uuid_t

Structure representing a Universally Unique Identifier (UUID).

This structure encapsulates a UUID, which can be of varying sizes— 16, 32, or 128-bits. It includes the size of the UUID, a reserved field, and a union to hold the value of one of the three types of UUIDs.


rsi_ble_event_error_resp_t#

typedef struct rsi_ble_event_error_resp_s rsi_ble_event_error_resp_t

The Structure represents the error response event of GATT.


rsi_ble_event_gatt_desc_t#

typedef struct rsi_ble_event_gatt_desc_s rsi_ble_event_gatt_desc_t

Structure representing a GATT descriptor event.


rsi_ble_event_profiles_list_t#

typedef struct rsi_ble_event_profiles_list_s rsi_ble_event_profiles_list_t

Structure representing the BLE event profiles list.

This structure is used to define the parameters for the BLE event profiles list, including the remote device address, number of profiles found, and the list of found profiles.


rsi_ble_event_profile_by_uuid_t#

typedef struct rsi_ble_event_profile_by_uuid_s rsi_ble_event_profile_by_uuid_t

Structure to hold the BLE event profile by UUID.


rsi_ble_event_read_by_type1_t#

typedef struct rsi_ble_event_read_by_type1_s rsi_ble_event_read_by_type1_t

Structure representing the BLE event for reading characteristic services by type.

This structure is used to represent the BLE event RSI_BLE_EVENT_GATT_READ_CHAR_SERVS with event ID 0x1503. It provides information related to the read operation of characteristic services.


rsi_ble_event_read_by_type2_t#

typedef struct rsi_ble_event_read_by_type2_s rsi_ble_event_read_by_type2_t

Structure contains the service information received during the GATT read included services event.


rsi_ble_event_read_by_type3_t#

typedef struct rsi_ble_event_read_by_type3_s rsi_ble_event_read_by_type3_t

Structure contains the service information received during the GATT read value by UUID event.


rsi_ble_event_att_value_t#

typedef struct rsi_ble_event_att_value_s rsi_ble_event_att_value_t

Structure representing the ATT value on GATT read response event.


rsi_ble_set_att_resp_t#

typedef struct rsi_ble_set_att_resp_s rsi_ble_set_att_resp_t

The structure represents the set attribute response.


rsi_ble_prepare_write_resp_t#

typedef struct rsi_ble_prepare_write_resp_s rsi_ble_prepare_write_resp_t

The structure represents the prepare write response.


rsi_ble_resp_profiles_list_t#

typedef struct rsi_ble_resp_profiles_list_s rsi_ble_resp_profiles_list_t

The structure shows the list of received profiles. The maximum supported number of received profiles is 5.


rsi_ble_resp_query_profile_descriptor_t#

typedef struct rsi_ble_resp_query_profile_descriptor_s rsi_ble_resp_query_profile_descriptor_t

The Structure represents the list of received profile descriptors of a particular profile. The maximum supported number of received profile descriptors is 5.


rsi_ble_resp_char_services_t#

typedef struct rsi_ble_resp_char_serv_s rsi_ble_resp_char_services_t

Structure to hold the response of characteristic services.


rsi_ble_resp_inc_services_t#

typedef struct rsi_ble_resp_inc_serv rsi_ble_resp_inc_services_t

The structure represents the list of received included service attributes of a particular included service. The maximum supported number of received included service attributes is 5.


rsi_ble_resp_att_value_t#

typedef struct rsi_ble_resp_att_value_s rsi_ble_resp_att_value_t

Structure represents the response for a Attribute Protocol (ATT) value.


rsi_ble_resp_att_descs_t#

typedef struct rsi_ble_resp_att_descs_s rsi_ble_resp_att_descs_t

Structure represents the list of received attribute descriptors. The maximum supported number of received attribute descriptors is 5.


rsi_ble_resp_add_serv_t#

typedef struct rsi_ble_resp_add_serv_s rsi_ble_resp_add_serv_t

Structure represents the add new service response.


rsi_ble_resp_local_att_value_t#

typedef struct rsi_ble_resp_local_att_value_s rsi_ble_resp_local_att_value_t

Structure represents the response for local attribute value.


rsi_ble_event_remote_device_info_t#

typedef struct rsi_ble_event_remote_device_info_s rsi_ble_event_remote_device_info_t

Structure represents the remote device information event.

This structure is used to define the parameters for a BLE event that provides information about a remote device.


rsi_ble_event_rcp_rcvd_info_t#

typedef struct rsi_ble_event_rcp_rcvd_info_s rsi_ble_event_rcp_rcvd_info_t

Structure represents the received Remote Control Protocol (RCP) information event.

This structure is used to define the parameters for a BLE event that involves receiving RCP information.


rsi_ble_event_write_t#

typedef struct rsi_ble_event_write_s rsi_ble_event_write_t

Structure indicates the received write information from the remote device.


rsi_ble_event_prepare_write_t#

typedef struct rsi_ble_event_prepare_write_s rsi_ble_event_prepare_write_t

Structure represents the GATT prepare write event.


rsi_ble_execute_write_t#

typedef struct rsi_ble_execute_write_s rsi_ble_execute_write_t

Structure representing the BLE execute write request.

This structure is used to define the parameters for an execute write request to a remote BLE device.


rsi_ble_read_req_t#

typedef struct rsi_ble_read_req_s rsi_ble_read_req_t

Structure representing the BLE read request.

This structure is used to define the parameters for a BLE read request, including the remote device address, attribute handle, request type, and offset.


rsi_ble_event_mtu_t#

typedef struct rsi_ble_event_mtu_s rsi_ble_event_mtu_t

Structure to hold the BLE MTU event information.


rsi_ble_event_mtu_exchange_information_t#

typedef struct rsi_ble_event_mtu_exchange_information_s rsi_ble_event_mtu_exchange_information_t

Structure to hold the MTU exchange information event.


rsi_ble_event_directedadv_report_t#

typedef struct rsi_ble_event_directedadv_report_s rsi_ble_event_directedadv_report_t

Structure to hold the information of a directed advertising report event.


rsi_ble_event_cbfc_conn_req_t#

typedef struct rsi_ble_event_cbfc_conn_req_s rsi_ble_event_cbfc_conn_req_t

Structure representing the CBFC connection request event.

This structure is used to define the parameters for a BLE event that involves a Circular Buffer Flow Control (CBFC) connection request from a remote device.


rsi_ble_event_cbfc_conn_complete_t#

typedef struct rsi_ble_event_cbfc_conn_complete_s rsi_ble_event_cbfc_conn_complete_t

Structure representing the CBFC connection complete event.

This structure is used to define the parameters for a BLE event that indicates the completion of a Circular Buffer Flow Control (CBFC) connection with a remote device.


rsi_ble_event_cbfc_rx_data_t#

typedef struct rsi_ble_event_cbfc_rx_data_s rsi_ble_event_cbfc_rx_data_t

Structure representing the CBFC received data event.

This structure is used to define the parameters for a BLE event that involves receiving data over a Circular Buffer Flow Control (CBFC) connection from a remote device.


rsi_ble_event_cbfc_disconn_t#

typedef struct rsi_ble_event_cbfc_disconn_s rsi_ble_event_cbfc_disconn_t

Structure representing the CBFC disconnection event.

This structure is used to define the parameters for a BLE event that involves the disconnection of a Circular Buffer Flow Control (CBFC) connection with a remote device.


rsi_ble_ae_adv_report_t#

typedef struct rsi_ble_ae_adv_report_s rsi_ble_ae_adv_report_t

ae adv report event


rsi_ble_per_adv_sync_estbl_t#

typedef struct rsi_ble_per_adv_sync_estbl_s rsi_ble_per_adv_sync_estbl_t

ae periodic sync establishment report event


rsi_ble_per_adv_report_t#

typedef struct rsi_ble_per_adv_report_s rsi_ble_per_adv_report_t

ae periodic adv report event


rsi_ble_per_adv_sync_lost_t#

typedef struct rsi_ble_per_adv_sync_lost_s rsi_ble_per_adv_sync_lost_t

ae periodic sync lost report event


rsi_ble_scan_timeout_t#

typedef struct rsi_ble_scan_timeout_s rsi_ble_scan_timeout_t

ae scan timeout report event


rsi_ble_adv_set_terminated_t#

typedef struct rsi_ble_adv_set_terminated_s rsi_ble_adv_set_terminated_t

ae adv set terminated report event


rsi_ble_scan_req_recvd_t#

typedef struct rsi_ble_scan_req_recvd_s rsi_ble_scan_req_recvd_t

ae scan request recvd report event


chip_ble_buffers_stats_t#

typedef struct chip_ble_buffers_stats_s chip_ble_buffers_stats_t

Structure representing the BLE buffer statistics.

This structure is used to define the parameters for BLE buffer statistics, including the utilization of Asynchronous Connection-Less (ACL) buffers and command packet buffers.


Function Documentation#

rsi_convert_db_to_powindex#

uint8_t rsi_convert_db_to_powindex (int8_t tx_power_in_dBm)

Converts the given transmit power in dBm to power index.

Parameters
TypeDirectionArgument NameDescription
int8_tN/Atx_power_in_dBm

The transmit power in dBm.

This function takes a transmit power value in dBm and converts it to a power index value. The power index is used to set the transmit power level in the BLE module.

Returns

  • The power index corresponding to the given transmit power.


rsi_ble_cbfc_connreq#

uint32_t rsi_ble_cbfc_connreq (uint8_t * dev_addr, uint16_t psm)

Sends a connection request to a remote device using the Credit Based Flow Control (CBFC) mechanism.

Parameters
TypeDirectionArgument NameDescription
uint8_t *N/Adev_addr

Pointer to the device address of the remote device.

uint16_tN/Apsm

The Protocol Service Multiplexer (PSM) value.

This function sends a connection request to a remote device using the CBFC mechanism. It takes the device address and the Protocol Service Multiplexer (PSM) as input parameters.

Returns

  • Returns a 32-bit unsigned integer indicating the status of the connection request.

    • 0: If the connection request is successful.

    • Non-zero: If there is an error in sending the connection request.


rsi_ble_cbfc_connresp#

uint32_t rsi_ble_cbfc_connresp (uint8_t * dev_addr, uint16_t lcid, uint8_t result)

Sends a connection response for a credit-based flow control (CBFC) connection.

Parameters
TypeDirectionArgument NameDescription
uint8_t *N/Adev_addr

The device address of the remote device.

uint16_tN/Alcid

The logical channel ID of the connection.

uint8_tN/Aresult

The result of the connection response.

This function is used to send a connection response for a CBFC connection in the BLE module.

Returns

  • The status of the operation. Returns a 32-bit unsigned integer.


rsi_ble_cbfc_data_tx#

uint32_t rsi_ble_cbfc_data_tx (uint8_t * dev_addr, uint16_t lcid, uint16_t len, uint8_t * p_data)

Transmits data over a CBFC channel in the BLE module.

Parameters
TypeDirectionArgument NameDescription
uint8_t *N/Adev_addr

Pointer to the device address of the BLE module.

uint16_tN/Alcid

Logical channel ID of the CBFC channel.

uint16_tN/Alen

Length of the data to be transmitted.

uint8_t *N/Ap_data

Pointer to the data to be transmitted.

This function is used to transmit data over a CBFC channel in the BLE module. It takes the device address, logical channel ID (LCID), length of the data, and a pointer to the data as input parameters. The function returns a 32-bit unsigned integer as the status of the transmission.

Returns

  • 32-bit unsigned integer representing the status of the transmission.


rsi_ble_cbfc_disconnect#

uint32_t rsi_ble_cbfc_disconnect (uint8_t * dev_addr, uint16_t lcid)

Disconnects a Connection-Based Flow Control (CBFC) connection with the specified device address and logical channel ID.

Parameters
TypeDirectionArgument NameDescription
uint8_t *N/Adev_addr

The device address of the remote device.

uint16_tN/Alcid

The logical channel ID of the CBFC connection.

This function is used to disconnect a CBFC connection with the specified device address and logical channel ID.

Returns

  • The status code indicating the success or failure of the operation.

    • Returns 0 on success.

    • Returns a non-zero value on failure.