Callbacks Declarations#

Typedefs#

typedef void(*
rsi_ble_on_adv_report_event_t)(rsi_ble_event_adv_report_t *rsi_ble_event_adv)

The callback function will be called if advertise report event is received.

typedef void(*
rsi_ble_on_connect_t)(rsi_ble_event_conn_status_t *rsi_ble_event_conn)

The callback function will be called if BLE connection status is received.

typedef void(*
rsi_ble_on_enhance_connect_t)(rsi_ble_event_enhance_conn_status_t *rsi_ble_event_enhance_conn)

The callback function will be called if BLE connection status is received.

typedef void(*
rsi_ble_on_disconnect_t)(rsi_ble_event_disconnect_t *rsi_ble_event_disconnect, uint16_t reason)

The callback function will be called if disconnect event is received.

typedef void(*
rsi_ble_on_le_ping_payload_timeout_t)(rsi_ble_event_le_ping_time_expired_t *rsi_ble_event_timeout_expired)

The callback function will be called if le ping payload timeout expired event is received.

typedef void(*
rsi_ble_on_le_ltk_req_event_t)(rsi_bt_event_le_ltk_request_t *rsi_ble_event_le_ltk_request)

The callback function will be called if le ltk request event is received.

typedef void(*
rsi_ble_on_le_security_keys_t)(rsi_bt_event_le_security_keys_t *rsi_ble_event_le_security_keys)

The callback function will be called if le security keys event is received.

typedef void(*
rsi_ble_on_smp_request_t)(rsi_bt_event_smp_req_t *remote_dev_address)

The callback function will be called if smp request is received in Master mode.

typedef void(*
rsi_ble_on_smp_response_t)(rsi_bt_event_smp_resp_t *remote_dev_address)

The callback function will be called if smp request is received in slave mode.

typedef void(*
rsi_ble_on_smp_passkey_t)(rsi_bt_event_smp_passkey_t *remote_dev_address)

The callback function will be called if smp passkey event is received from module.

typedef void(*
rsi_ble_on_smp_passkey_display_t)(rsi_bt_event_smp_passkey_display_t *smp_passkey_display)

The callback function will be called if smp passkey event is received from module.

typedef void(*
rsi_ble_on_smp_failed_t)(uint16_t resp_status, rsi_bt_event_smp_failed_t *remote_dev_address)

The callback function will be called if smp failed event is received from module.

typedef void(*
rsi_ble_on_sc_method_t)(rsi_bt_event_sc_method_t *scmethod)

The callback function will be called if security method event is received from module.

typedef void(*
rsi_ble_on_encrypt_started_t)(uint16_t resp_status, rsi_bt_event_encryption_enabled_t *enc_enabled)

The callback function will be called if encrypted event is received from module.

typedef void(*
rsi_ble_on_sc_passkey_t)(rsi_bt_event_sc_passkey_t *sc_passkey)

The callback function will be called if BLE Secure connection passkey event received from module.

typedef void(*
rsi_ble_on_phy_update_complete_t)(rsi_ble_event_phy_update_t *rsi_ble_event_phy_update_complete)

The callback function will be called when phy update complete event is received.

typedef void(*
rsi_ble_on_conn_update_complete_t)(rsi_ble_event_conn_update_t *rsi_ble_event_conn_update_complete, uint16_t resp_status)

The callback function will be called when conn update complete event is received.

typedef void(*
rsi_ble_on_remote_conn_params_request_t)(rsi_ble_event_remote_conn_param_req_t *rsi_ble_event_remote_conn_param, uint16_t resp_status)

The callback function will be called if remote conn params request is received.

typedef void(*
rsi_ble_on_remote_features_t)(rsi_ble_event_remote_features_t *rsi_ble_event_remote_features)

Callback function to peer device supported features.

typedef void(*
rsi_ble_on_le_more_data_req_t)(rsi_ble_event_le_dev_buf_ind_t *rsi_ble_more_data_evt)

Callback function to le more data request.

typedef void(*
rsi_ble_on_data_length_update_t)(rsi_ble_event_data_length_update_t *remote_dev_address)

This event is raised when data length is update in controller.

typedef void(*
rsi_ble_on_directed_adv_report_event_t)(rsi_ble_event_directedadv_report_t *rsi_ble_event_directed)

The callback function will be called if directed advertise report event is received.

typedef void(*
rsi_ble_on_gatt_error_resp_t)(uint16_t event_status, rsi_ble_event_error_resp_t *rsi_ble_gatt_error)

The callback function will be called if gatt error event is received.

typedef void(*
rsi_ble_on_gatt_desc_val_event_t)(uint16_t event_status, rsi_ble_event_gatt_desc_t *rsi_ble_gatt_desc_val)

The callback function will be called if attribute descriptors event is received.

typedef void(*
rsi_ble_on_event_profiles_list_t)(uint16_t event_status, rsi_ble_event_profiles_list_t *rsi_ble_event_profiles)

The callback function will be called if profiles list event is received.

typedef void(*
rsi_ble_on_event_profile_by_uuid_t)(uint16_t event_status, rsi_ble_event_profile_by_uuid_t *rsi_ble_event_profile)

The callback function will be called if profile event is received.

typedef void(*
rsi_ble_on_event_read_by_char_services_t)(uint16_t event_status, rsi_ble_event_read_by_type1_t *rsi_ble_event_read_type1)

The callback function will be called if characteristic services list event is received.

typedef void(*
rsi_ble_on_event_read_by_inc_services_t)(uint16_t event_status, rsi_ble_event_read_by_type2_t *rsi_ble_event_read_type2)

The callback function will be called if include services list event is received.

typedef void(*
rsi_ble_on_event_read_att_value_t)(uint16_t event_status, rsi_ble_event_read_by_type3_t *rsi_ble_event_read_type3)

The callback function will be called if attribute value event is received.

typedef void(*
rsi_ble_on_event_read_resp_t)(uint16_t event_status, rsi_ble_event_att_value_t *rsi_ble_event_att_val)

The callback function will be called if attribute value event is received.

typedef void(*
rsi_ble_on_event_write_resp_t)(uint16_t event_status, rsi_ble_set_att_resp_t *rsi_ble_event_set_att_rsp)

The callback function will be called if gatt write event is received.

typedef void(*
rsi_ble_on_event_indicate_confirmation_t)(uint16_t event_status, rsi_ble_set_att_resp_t *rsi_ble_event_set_att_rsp)

The callback function will be called if indication confirmation event is received.

typedef void(*
rsi_ble_on_event_prepare_write_resp_t)(uint16_t event_status, rsi_ble_prepare_write_resp_t *rsi_ble_event_prepare_write)

The callback function will be called if GATT prepare event is received.

typedef void(*
rsi_ble_on_profiles_list_resp_t)(uint16_t resp_status, rsi_ble_resp_profiles_list_t *rsi_ble_resp_profiles)

The callback function will be called if profiles list response is received.

typedef void(*
rsi_ble_on_profile_resp_t)(uint16_t resp_status, profile_descriptors_t *rsi_ble_resp_profile)

The callback function will be called if profile response is received.

typedef void(*
rsi_ble_on_char_services_resp_t)(uint16_t resp_status, rsi_ble_resp_char_services_t *rsi_ble_resp_char_serv)

The callback function will be called if service characteristics response is received.

typedef void(*
rsi_ble_on_inc_services_resp_t)(uint16_t resp_status, rsi_ble_resp_inc_services_t *rsi_ble_resp_inc_serv)

The callback function will be called if include services response is received.

typedef void(*
rsi_ble_on_att_desc_resp_t)(uint16_t resp_status, rsi_ble_resp_att_descs_t *rsi_ble_resp_att_desc)

The callback function will be called if attribute descriptors response is received.

typedef void(*
rsi_ble_on_read_resp_t)(uint16_t resp_status, uint16_t resp_id, rsi_ble_resp_att_value_t *rsi_ble_resp_att_val)

The callback function will be called upon receiving the attribute value.

typedef void(*
rsi_ble_on_write_resp_t)(uint16_t resp_status, uint16_t resp_id)

The callback function will be called if the attribute set/prepare/execute action is completed.

typedef void(*
rsi_ble_on_gatt_write_event_t)(uint16_t event_id, rsi_ble_event_write_t *rsi_ble_write)

The callback function will be called if the GATT write/notify/indicate events are received.

typedef void(*
rsi_ble_on_gatt_prepare_write_event_t)(uint16_t event_id, rsi_ble_event_prepare_write_t *rsi_ble_write)

The callback function will be called if the GATT prepare events are received.

typedef void(*
rsi_ble_on_execute_write_event_t)(uint16_t event_id, rsi_ble_execute_write_t *rsi_ble_execute_write)

The callback function will be called if the GATT execute events are received.

typedef void(*
rsi_ble_on_read_req_event_t)(uint16_t event_id, rsi_ble_read_req_t *rsi_ble_read_req)

The callback function will be called if the GATT read request events are received.

typedef void(*
rsi_ble_on_mtu_event_t)(rsi_ble_event_mtu_t *rsi_ble_event_mtu)

The callback function will be called if MTU size request is received.

typedef void(*
rsi_ble_on_mtu_exchange_info_t)(rsi_ble_event_mtu_exchange_information_t *rsi_ble_event_mtu_exchange_info)

Callback function to indicate MTU size and who initated MTU Exchange Request.

typedef void(*
rsi_ble_on_remote_device_info_t)(uint16_t status, rsi_ble_event_remote_device_info_t *resp_buffer)

Callback function to get peer device information.

Typedef Documentation#

rsi_ble_on_adv_report_event_t#

void(* rsi_ble_on_adv_report_event_t)(rsi_ble_event_adv_report_t *rsi_ble_event_adv) )(rsi_ble_event_adv_report_t *rsi_ble_event_adv)

The callback function will be called if advertise report event is received.

Parameters
[out]rsi_ble_event_adv

contains the advertise report information. Please refer rsi_ble_event_adv_report_s for more info.

Returns

  • void

description#

This callback function will be called if the advertise event report is received from the module
This callback has to be registered using rsi_ble_gap_register_callbacks API


Definition at line 1809 of file include/rsi_ble_apis.h

rsi_ble_on_connect_t#

void(* rsi_ble_on_connect_t)(rsi_ble_event_conn_status_t *rsi_ble_event_conn) )(rsi_ble_event_conn_status_t *rsi_ble_event_conn)

The callback function will be called if BLE connection status is received.

Parameters
[out]rsi_ble_event_conn

contains the BLE connection status. Please refer rsi_ble_event_conn_status_s for more info.

Returns

  • void

description#

This callback function will be called if the BLE connection status is received from the module. For BLE 4.1 and lower version this callback will be called
This callback has to be registered using rsi_ble_gap_register_callbacks API


Definition at line 1820 of file include/rsi_ble_apis.h

rsi_ble_on_enhance_connect_t#

void(* rsi_ble_on_enhance_connect_t)(rsi_ble_event_enhance_conn_status_t *rsi_ble_event_enhance_conn) )(rsi_ble_event_enhance_conn_status_t *rsi_ble_event_enhance_conn)

The callback function will be called if BLE connection status is received.

Parameters
[out]rsi_ble_event_conn

contains the BLE connection status. Please refer rsi_ble_event_enhance_conn_status_s for more info.

Returns

  • void

description#

This callback function will be called if the BLE connection status is received from the module. For BLE 4.2 and above version this callback will be called
This callback has to be registered using rsi_ble_gap_register_callbacks API


Definition at line 1831 of file include/rsi_ble_apis.h

rsi_ble_on_disconnect_t#

void(* rsi_ble_on_disconnect_t)(rsi_ble_event_disconnect_t *rsi_ble_event_disconnect, uint16_t reason) )(rsi_ble_event_disconnect_t *rsi_ble_event_disconnect, uint16_t reason)

The callback function will be called if disconnect event is received.

Parameters
[out]rsi_ble_event_disconnect

contains the disconnect status. Please refer rsi_ble_event_disconnect_s for more info.

[out]reason

contains reason for failure.

Note

  • Few reason for failure are given below
    0x4E13 Remote user terminated connection
    0x4E14 Remote device terminated connection due to low resources
    0x4E15 Remote device terminated connection due to power off
    0x4E3D Connection terminated due to MIC failure
    0x4E3E Connection Failed to be Established
    0x4E60 Invalid Handle Range

Returns

  • void

description#

This callback function will be called if the disconnect status event is received from the module
This callback has to be registered using rsi_ble_gap_register_callbacks API


Definition at line 1850 of file include/rsi_ble_apis.h

rsi_ble_on_le_ping_payload_timeout_t#

void(* rsi_ble_on_le_ping_payload_timeout_t)(rsi_ble_event_le_ping_time_expired_t *rsi_ble_event_timeout_expired) )(rsi_ble_event_le_ping_time_expired_t *rsi_ble_event_timeout_expired)

The callback function will be called if le ping payload timeout expired event is received.

Parameters
[out]rsi_ble_event_disconnect

contains the disconnect status. Please refer rsi_ble_event_le_ping_time_expired_s for more info.

Returns

  • void

description#

This callback function will be called if the le ping time expired event is received from the module
This callback has to be registered using rsi_ble_gap_register_callbacks API


Definition at line 1861 of file include/rsi_ble_apis.h

rsi_ble_on_le_ltk_req_event_t#

void(* rsi_ble_on_le_ltk_req_event_t)(rsi_bt_event_le_ltk_request_t *rsi_ble_event_le_ltk_request) )(rsi_bt_event_le_ltk_request_t *rsi_ble_event_le_ltk_request)

The callback function will be called if le ltk request event is received.

Parameters
[out]rsi_ble_event_le_ltk_request

contains the ltk request info. Please refer rsi_bt_event_le_ltk_request_s for more info

Returns

  • void

description#

This callback function will be called if le ltk request event is received from the module
This callback has to be registered using rsi_ble_smp_register_callbacks API


Definition at line 1873 of file include/rsi_ble_apis.h

rsi_ble_on_le_security_keys_t#

void(* rsi_ble_on_le_security_keys_t)(rsi_bt_event_le_security_keys_t *rsi_ble_event_le_security_keys) )(rsi_bt_event_le_security_keys_t *rsi_ble_event_le_security_keys)

The callback function will be called if le security keys event is received.

Parameters
[out]rsi_bt_event_le_security_keys_t

contains security keys. Please refer rsi_bt_event_le_security_keys_s for more info

Note

  • When the device is disconnected from the remote device, the pairing information such as LTK, EDIV, and RAND will be erased. Therefore, it is essential for the application developer to store and manage this information in the Host NVM.

Returns

  • void

description#

This callback function will be called if le security keys event is received from the module
This callback has to be registered using rsi_ble_smp_register_callbacks API


Definition at line 1885 of file include/rsi_ble_apis.h

rsi_ble_on_smp_request_t#

void(* rsi_ble_on_smp_request_t)(rsi_bt_event_smp_req_t *remote_dev_address) )(rsi_bt_event_smp_req_t *remote_dev_address)

The callback function will be called if smp request is received in Master mode.

Parameters
[out]resp_status

contains the response status (Success or Error code)

[out]remote_dev_address

contains the smp requested device address. Please refer rsi_bt_event_smp_req_s for more info.

Returns

  • void

description#

This callback function will be called if the smp request is received from the remote device
This callback has to be registered using rsi_ble_smp_register_callbacks API


Definition at line 1903 of file include/rsi_ble_apis.h

rsi_ble_on_smp_response_t#

void(* rsi_ble_on_smp_response_t)(rsi_bt_event_smp_resp_t *remote_dev_address) )(rsi_bt_event_smp_resp_t *remote_dev_address)

The callback function will be called if smp request is received in slave mode.

Parameters
[out]remote_dev_address

contains the smp resp information. please refer rsi_bt_event_smp_resp_s for more info

Returns

  • void

description#

This callback function will be called if the smp request is received from the remote device
This callback has to be registered using rsi_ble_smp_register_callbacks API


Definition at line 1915 of file include/rsi_ble_apis.h

rsi_ble_on_smp_passkey_t#

void(* rsi_ble_on_smp_passkey_t)(rsi_bt_event_smp_passkey_t *remote_dev_address) )(rsi_bt_event_smp_passkey_t *remote_dev_address)

The callback function will be called if smp passkey event is received from module.

Parameters
[out]resp_statuscontains

the response status (Success or Error code)

[out]remote_dev_address

contains the remote device address. please refer rsi_bt_event_smp_passkey_s for more info

Returns

  • void

description#

This callback function will be called if the smp passkey is received from the module
This callback has to be registered using rsi_ble_smp_register_callbacks API


Definition at line 1928 of file include/rsi_ble_apis.h

rsi_ble_on_smp_passkey_display_t#

void(* rsi_ble_on_smp_passkey_display_t)(rsi_bt_event_smp_passkey_display_t *smp_passkey_display) )(rsi_bt_event_smp_passkey_display_t *smp_passkey_display)

The callback function will be called if smp passkey event is received from module.

Parameters
[out]resp_status

contains the response status (Success or Error code)

[out]smp_passkey_display

contains the smp passkey display information. Please refer rsi_bt_event_smp_passkey_display_s for more info.

Returns

  • void

description#

This callback function will be called if the smp passkey display is received from the module
This callback has to be registered using rsi_ble_smp_register_callbacks API


Definition at line 1941 of file include/rsi_ble_apis.h

rsi_ble_on_smp_failed_t#

void(* rsi_ble_on_smp_failed_t)(uint16_t resp_status, rsi_bt_event_smp_failed_t *remote_dev_address) )(uint16_t resp_status, rsi_bt_event_smp_failed_t *remote_dev_address)

The callback function will be called if smp failed event is received from module.

Parameters
[out]resp_status

contains the remote device address. Please refer rsi_bt_event_smp_failed_s for more info.

Note

  • Error codes for SMP FAILED are given below
    0x4B01 SMP Passkey entry failed
    0x4B02 SMP OOB not available
    0x4B03 SMP Authentication Requirements
    0x4B04 SMP confirm value failed
    0x4B05 SMP Pairing not supported
    0x4B06 SMP Encryption key size insufficient
    0x4B07 SMP command not supported
    0x4B08 SMP Unspecified Reason
    0x4B09 SMP repeated attempts
    0x4B0C SMP Numeric Comparison Failed
    0x4B0B DHKEY Check Failed

Returns

  • void

description#

This callback function will be called if the smp process is failed with remote device
This callback has to be registered using rsi_ble_smp_register_callbacks API


Definition at line 1966 of file include/rsi_ble_apis.h

rsi_ble_on_sc_method_t#

void(* rsi_ble_on_sc_method_t)(rsi_bt_event_sc_method_t *scmethod) )(rsi_bt_event_sc_method_t *scmethod)

The callback function will be called if security method event is received from module.

Parameters
[out]scmethod

contains Security Method 1 means Just works or 2 means Passkey. Please refer rsi_bt_event_sc_method_s for more info.

Returns

  • void

description#

This callback function will be called if the SC method is done with remote device
This callback has to be registered using rsi_ble_smp_register_callbacks API


Definition at line 1978 of file include/rsi_ble_apis.h

rsi_ble_on_encrypt_started_t#

void(* rsi_ble_on_encrypt_started_t)(uint16_t resp_status, rsi_bt_event_encryption_enabled_t *enc_enabled) )(uint16_t resp_status, rsi_bt_event_encryption_enabled_t *enc_enabled)

The callback function will be called if encrypted event is received from module.

Parameters
[out]resp_status

contains the response status (Success or Error code)

[out]enc_enabled

contains encryption information. Please refer rsi_bt_event_encryption_enabled_s for more info.

Note

  • When the device is disconnected from the remote device, the pairing information such as LTK, EDIV, and RAND will be erased. Therefore, it is essential for the application developer to store and manage this information in the Host NVM.

Returns

  • void

description#

This callback function will be called if the encryption process is started with remote device
This callback has to be registered using rsi_ble_smp_register_callbacks API


Definition at line 1992 of file include/rsi_ble_apis.h

rsi_ble_on_sc_passkey_t#

void(* rsi_ble_on_sc_passkey_t)(rsi_bt_event_sc_passkey_t *sc_passkey) )(rsi_bt_event_sc_passkey_t *sc_passkey)

The callback function will be called if BLE Secure connection passkey event received from module.

Parameters
[out]sc_passkey

contains LE SC Passkey information. Please refer rsi_bt_event_encryption_enabled_s for more info.

Returns

  • void

description#

This callback function will be called if the BLE Secure connection passkey event received
This callback has to be registered using rsi_ble_smp_register_callbacks API


Definition at line 2004 of file include/rsi_ble_apis.h

rsi_ble_on_phy_update_complete_t#

void(* rsi_ble_on_phy_update_complete_t)(rsi_ble_event_phy_update_t *rsi_ble_event_phy_update_complete) )(rsi_ble_event_phy_update_t *rsi_ble_event_phy_update_complete)

The callback function will be called when phy update complete event is received.

Parameters
[out]rsi_ble_event_phy_update_complete

contains the controller support phy information. Please refer rsi_ble_event_phy_update_s for more info.

Returns

  • void

description#

This callback function will be called when phy update complete event is received
This callback has to be registered using rsi_ble_gap_register_callbacks API


Definition at line 2015 of file include/rsi_ble_apis.h

rsi_ble_on_conn_update_complete_t#

void(* rsi_ble_on_conn_update_complete_t)(rsi_ble_event_conn_update_t *rsi_ble_event_conn_update_complete, uint16_t resp_status) )(rsi_ble_event_conn_update_t *rsi_ble_event_conn_update_complete, uint16_t resp_status)

The callback function will be called when conn update complete event is received.

Parameters
[out]rsi_ble_event_conn_update_complete

contains the controller support conn information. Please refer rsi_ble_event_conn_update_s for more info.

[out]resp_status

contains the response status (Success or Error code)

Returns

  • void

description#

This callback function will be called when conn update complete event is received
This callback has to be registered using rsi_ble_gap_register_callbacks API


Definition at line 2028 of file include/rsi_ble_apis.h

rsi_ble_on_remote_conn_params_request_t#

void(* rsi_ble_on_remote_conn_params_request_t)(rsi_ble_event_remote_conn_param_req_t *rsi_ble_event_remote_conn_param, uint16_t resp_status) )(rsi_ble_event_remote_conn_param_req_t *rsi_ble_event_remote_conn_param, uint16_t resp_status)

The callback function will be called if remote conn params request is received.

Parameters
[out]resp_status

contains the response status (Success or Error code)

[out]rsi_ble_event_remote_features

contains the remote device supported features. Please refer rsi_ble_event_remote_features_s for more info.

Returns

  • void

description#

This callback function will be called when remote conn params request is received
This callback has to be registered using rsi_ble_gap_register_callbacks API


Definition at line 2042 of file include/rsi_ble_apis.h

rsi_ble_on_remote_features_t#

void(* rsi_ble_on_remote_features_t)(rsi_ble_event_remote_features_t *rsi_ble_event_remote_features) )(rsi_ble_event_remote_features_t *rsi_ble_event_remote_features)

Callback function to peer device supported features.

Parameters
[out]rsi_ble_event_remote_features

contains the remote device supported features. Please refer rsi_ble_event_remote_features_s for more info.

Returns

  • void

description#

This callback function will be called when conn update complete event is received
This callback has to be registered using rsi_ble_gap_extended_register_callbacks API


Definition at line 2055 of file include/rsi_ble_apis.h

rsi_ble_on_le_more_data_req_t#

void(* rsi_ble_on_le_more_data_req_t)(rsi_ble_event_le_dev_buf_ind_t *rsi_ble_more_data_evt) )(rsi_ble_event_le_dev_buf_ind_t *rsi_ble_more_data_evt)

Callback function to le more data request.

Parameters
[out]rsi_ble_more_data_evt

contains the LE Device Buffer Indication information. Please refer rsi_ble_event_le_dev_buf_ind_s for more info.

Returns

  • void

description#

This callback function will be called when le more data event is received
This callback has to be registered using rsi_ble_gap_extended_register_callbacks API


Definition at line 2066 of file include/rsi_ble_apis.h

rsi_ble_on_data_length_update_t#

void(* rsi_ble_on_data_length_update_t)(rsi_ble_event_data_length_update_t *remote_dev_address) )(rsi_ble_event_data_length_update_t *remote_dev_address)

This event is raised when data length is update in controller.

Parameters
[out]remote_dev_address

contains the controller support tx and rx length information. Please refer rsi_ble_event_data_length_update_s for more info.

Returns

  • void

description#

This callback function will be called when data length update complete event is received
This callback has to be registered using rsi_ble_gap_register_callbacks API


Definition at line 2078 of file include/rsi_ble_apis.h

rsi_ble_on_directed_adv_report_event_t#

void(* rsi_ble_on_directed_adv_report_event_t)(rsi_ble_event_directedadv_report_t *rsi_ble_event_directed) )(rsi_ble_event_directedadv_report_t *rsi_ble_event_directed)

The callback function will be called if directed advertise report event is received.

Parameters
[in]rsi_ble_event_directedcontains

the advertise report information

Returns

  • void

description#

This callback function will be called if the advertise event report is received from the module
This callback has to be registered using rsi_ble_gap_register_callbacks API


Definition at line 2089 of file include/rsi_ble_apis.h

rsi_ble_on_gatt_error_resp_t#

void(* rsi_ble_on_gatt_error_resp_t)(uint16_t event_status, rsi_ble_event_error_resp_t *rsi_ble_gatt_error) )(uint16_t event_status, rsi_ble_event_error_resp_t *rsi_ble_gatt_error)

The callback function will be called if gatt error event is received.

Parameters
[out]event_status

contains the gatt error information. Please refer rsi_ble_event_error_resp_s for more info

Note

  • Attribute protocol error codes
    0x4A01 - Invalid Handle
    0x4A06 - Request not supported
    0x4A0A - Attribute not found
    0x4A05 - Insufficient authentication
    0x4A08 - Insufficient authorization
    0x4A0C - Insufficient encryption key size
    0x4A0F - Insufficient encryption
    0x4A02 - Read not permitted
    0x4A03 - Write not permitted
    0x4A07 - Invalid offset
    0x4A0B - Attribute not Long

Returns

  • void

description#

This callback function will be called if the gatt error event is received from the module
This callback has to be registered using rsi_ble_gatt_register_callbacks API


Definition at line 2158 of file include/rsi_ble_apis.h

rsi_ble_on_gatt_desc_val_event_t#

void(* rsi_ble_on_gatt_desc_val_event_t)(uint16_t event_status, rsi_ble_event_gatt_desc_t *rsi_ble_gatt_desc_val) )(uint16_t event_status, rsi_ble_event_gatt_desc_t *rsi_ble_gatt_desc_val)

The callback function will be called if attribute descriptors event is received.

Parameters
[out]event_status

contains the response status
0 - Success
Non-Zero Value - Failure

[out]rsi_ble_gatt_desc_val

contains the profiles list event information. Please refer rsi_ble_event_gatt_desc_s for more info

Returns

  • void

description#

This callback function will be called if the attribute descriptors event is received from the module
This callback has to be registered using rsi_ble_gatt_register_callbacks API


Definition at line 2172 of file include/rsi_ble_apis.h

rsi_ble_on_event_profiles_list_t#

void(* rsi_ble_on_event_profiles_list_t)(uint16_t event_status, rsi_ble_event_profiles_list_t *rsi_ble_event_profiles) )(uint16_t event_status, rsi_ble_event_profiles_list_t *rsi_ble_event_profiles)

The callback function will be called if profiles list event is received.

Parameters
[out]event_status

contains the response status
0 - Success
Non-Zero Value - Failure

[out]rsi_ble_event_profiles

contains the profiles list event information. Please refer rsi_ble_event_profiles_list_s for more info

Returns

  • void

description#

This callback function will be called if the profiles list response is received from the module
This callback has to be registered using rsi_ble_gatt_register_callbacks API


Definition at line 2188 of file include/rsi_ble_apis.h

rsi_ble_on_event_profile_by_uuid_t#

void(* rsi_ble_on_event_profile_by_uuid_t)(uint16_t event_status, rsi_ble_event_profile_by_uuid_t *rsi_ble_event_profile) )(uint16_t event_status, rsi_ble_event_profile_by_uuid_t *rsi_ble_event_profile)

The callback function will be called if profile event is received.

Parameters
[out]event_status

contains the response status
0 - Success
Non-Zero Value - Failure

[out]rsi_ble_event_profile

contains the profile response information. Please refer rsi_ble_event_profile_by_uuid_s for more info.

Returns

  • void

description#

This callback function will be called if the profile response is received from the module
This callback has to be registered using rsi_ble_gatt_register_callbacks API


Definition at line 2204 of file include/rsi_ble_apis.h

rsi_ble_on_event_read_by_char_services_t#

void(* rsi_ble_on_event_read_by_char_services_t)(uint16_t event_status, rsi_ble_event_read_by_type1_t *rsi_ble_event_read_type1) )(uint16_t event_status, rsi_ble_event_read_by_type1_t *rsi_ble_event_read_type1)

The callback function will be called if characteristic services list event is received.

Parameters
[out]event_status

contains the response status
0 - Success
Non-Zero Value - Failure

[out]rsi_ble_event_read_type1

contains the char services event information. Please refer rsi_ble_event_read_by_type1_s for more info.

Returns

  • void

description#

This callback function will be called if the characteristic services list response is received from the module
This callback has to be registered using rsi_ble_gatt_register_callbacks API


Definition at line 2219 of file include/rsi_ble_apis.h

rsi_ble_on_event_read_by_inc_services_t#

void(* rsi_ble_on_event_read_by_inc_services_t)(uint16_t event_status, rsi_ble_event_read_by_type2_t *rsi_ble_event_read_type2) )(uint16_t event_status, rsi_ble_event_read_by_type2_t *rsi_ble_event_read_type2)

The callback function will be called if include services list event is received.

Parameters
[out]event_status

contains the response status
0 - Success
Non-Zero Value - Failure

[out]rsi_ble_event_read_type2

contains the inc services information. Please refer rsi_ble_event_read_by_type2_s for more info.

Returns

  • void

description#

This callback function will be called if the include services list response is received from the module
This callback has to be registered using rsi_ble_gatt_register_callbacks API


Definition at line 2235 of file include/rsi_ble_apis.h

rsi_ble_on_event_read_att_value_t#

void(* rsi_ble_on_event_read_att_value_t)(uint16_t event_status, rsi_ble_event_read_by_type3_t *rsi_ble_event_read_type3) )(uint16_t event_status, rsi_ble_event_read_by_type3_t *rsi_ble_event_read_type3)

The callback function will be called if attribute value event is received.

Parameters
[out]event_status

contains the response status
0 - Success
Non-Zero Value - Failure

[out]rsi_ble_event_read_type3

contains the char services event information. Please refer rsi_ble_event_read_by_type3_s for more info.

Returns

  • void

description#

This callback function will be called if the attribute value response is received from the module
This callback has to be registered using rsi_ble_gatt_register_callbacks API


Definition at line 2250 of file include/rsi_ble_apis.h

rsi_ble_on_event_read_resp_t#

void(* rsi_ble_on_event_read_resp_t)(uint16_t event_status, rsi_ble_event_att_value_t *rsi_ble_event_att_val) )(uint16_t event_status, rsi_ble_event_att_value_t *rsi_ble_event_att_val)

The callback function will be called if attribute value event is received.

Parameters
[out]event_status

contains the response status
0 - Success
Non-Zero Value - Failure

[out]rsi_ble_event_att_val

contains the profile response information. Please refer rsi_ble_event_att_value_s for more info.

Returns

  • void

description#

This callback function will be called if the attribute value is received from the module
This callback has to be registered using rsi_ble_gatt_register_callbacks API


Definition at line 2265 of file include/rsi_ble_apis.h

rsi_ble_on_event_write_resp_t#

void(* rsi_ble_on_event_write_resp_t)(uint16_t event_status, rsi_ble_set_att_resp_t *rsi_ble_event_set_att_rsp) )(uint16_t event_status, rsi_ble_set_att_resp_t *rsi_ble_event_set_att_rsp)

The callback function will be called if gatt write event is received.

Parameters
[out]event_status

contains the response status
0 - Success
Non-Zero Value - Failure

[out]rsi_ble_event_set_att_rsp

contains the profile response information. Please refer rsi_ble_set_att_resp_t for more info.

Returns

  • void

description#

This callback function will be called if the gatt write response is received from the module
This callback has to be registered using rsi_ble_gatt_register_callbacks API


Definition at line 2279 of file include/rsi_ble_apis.h

rsi_ble_on_event_indicate_confirmation_t#

void(* rsi_ble_on_event_indicate_confirmation_t)(uint16_t event_status, rsi_ble_set_att_resp_t *rsi_ble_event_set_att_rsp) )(uint16_t event_status, rsi_ble_set_att_resp_t *rsi_ble_event_set_att_rsp)

The callback function will be called if indication confirmation event is received.

Parameters
[out]event_status

contains the response status
0 - Success
Non-Zero Value - Failure

[out]rsi_ble_event_set_att_rsp

contains the profile response information. Please refer rsi_ble_set_att_resp_s for more info.

Returns

  • void

description#

This callback function will be called if the indication confirmation response is received from the module
This callback has to be registered using rsi_ble_gatt_register_callbacks API


Definition at line 2293 of file include/rsi_ble_apis.h

rsi_ble_on_event_prepare_write_resp_t#

void(* rsi_ble_on_event_prepare_write_resp_t)(uint16_t event_status, rsi_ble_prepare_write_resp_t *rsi_ble_event_prepare_write) )(uint16_t event_status, rsi_ble_prepare_write_resp_t *rsi_ble_event_prepare_write)

The callback function will be called if GATT prepare event is received.

Parameters
[out]event_status

contains the response status
0 - Success
Non-Zero Value - Failure

[out]rsi_ble_event_prepare_write

contains the char services event information. Please refer rsi_ble_prepare_write_resp_s for more info.

Returns

  • void

description#

This callback function will be called if the GATT prepare response is received from the module
This callback has to be registered using rsi_ble_gatt_register_callbacks API


Definition at line 2308 of file include/rsi_ble_apis.h

rsi_ble_on_profiles_list_resp_t#

void(* rsi_ble_on_profiles_list_resp_t)(uint16_t resp_status, rsi_ble_resp_profiles_list_t *rsi_ble_resp_profiles) )(uint16_t resp_status, rsi_ble_resp_profiles_list_t *rsi_ble_resp_profiles)

The callback function will be called if profiles list response is received.

Parameters
[out]resp_status

contains the profiles list response information. Please refer rsi_ble_resp_profiles_list_s for more info.

Note

  • Attribute protocol error codes
    0x4A01 - Invalid Handle
    0x4A0A - Attribute not found

Returns

  • void

description#

This callback function will be called if the profiles list response is received from the module
This callback has to be registered using rsi_ble_gatt_register_callbacks API


Definition at line 2327 of file include/rsi_ble_apis.h

rsi_ble_on_profile_resp_t#

void(* rsi_ble_on_profile_resp_t)(uint16_t resp_status, profile_descriptors_t *rsi_ble_resp_profile) )(uint16_t resp_status, profile_descriptors_t *rsi_ble_resp_profile)

The callback function will be called if profile response is received.

Parameters
[out]resp_status

contains the profile response information. Please refer profile_descriptors_s for more info

Note

  • Attribute protocol error codes
    0x4A01 - Invalid Handle
    0x4A06 - Request not supported
    0x4A0A - Attribute not found

Returns

  • void

description#

This callback function will be called if the profile response is received from the module
This callback has to be registered using rsi_ble_gatt_register_callbacks API


Definition at line 2346 of file include/rsi_ble_apis.h

rsi_ble_on_char_services_resp_t#

void(* rsi_ble_on_char_services_resp_t)(uint16_t resp_status, rsi_ble_resp_char_services_t *rsi_ble_resp_char_serv) )(uint16_t resp_status, rsi_ble_resp_char_services_t *rsi_ble_resp_char_serv)

The callback function will be called if service characteristics response is received.

Parameters
[out]resp_status

contains the service characteristics response information. Please refer rsi_ble_resp_char_services_s for more info

Note

  • Attribute protocol error codes
    0x4A01 - Invalid Handle
    0x4A06 - Request not supported
    0x4A0A - Attribute not found
    0x4A05 - Insufficient authentication
    0x4A08 - Insufficient authorization
    0x4A0C - Insufficient encryption key size
    0x4A0F - Insufficient encryption
    0x4A02 - Read not permitted

Returns

  • void

description#

This callback function will be called if the service characteristics response is received from the module
This callback has to be registered using rsi_ble_gatt_register_callbacks API


Definition at line 2370 of file include/rsi_ble_apis.h

rsi_ble_on_inc_services_resp_t#

void(* rsi_ble_on_inc_services_resp_t)(uint16_t resp_status, rsi_ble_resp_inc_services_t *rsi_ble_resp_inc_serv) )(uint16_t resp_status, rsi_ble_resp_inc_services_t *rsi_ble_resp_inc_serv)

The callback function will be called if include services response is received.

Parameters
[out]resp_status

contains the include services response information. Please refer rsi_ble_resp_inc_services_s for more info

Note

  • Attribute protocol error codes
    0x4A01 - Invalid Handle
    0x4A06 - Request not supported
    0x4A0A - Attribute not found
    0x4A05 - Insufficient authentication
    0x4A08 - Insufficient authorization
    0x4A0C - Insufficient encryption key size
    0x4A0F - Insufficient encryption
    0x4A02 - Read not permitted

Returns

  • void

description#

This callback function will be called if the include service response is received from the module
This callback has to be registered using rsi_ble_gatt_register_callbacks API


Definition at line 2395 of file include/rsi_ble_apis.h

rsi_ble_on_att_desc_resp_t#

void(* rsi_ble_on_att_desc_resp_t)(uint16_t resp_status, rsi_ble_resp_att_descs_t *rsi_ble_resp_att_desc) )(uint16_t resp_status, rsi_ble_resp_att_descs_t *rsi_ble_resp_att_desc)

The callback function will be called if attribute descriptors response is received.

Parameters
[out]resp_status

contains the attribute descriptors response information. Please refer rsi_ble_resp_att_descs_s for more info

Note

  • Attribute protocol error codes
    0x4A01 - Invalid Handle
    0x4A0A - Attribute not found
    0x4A05 - Insufficient authentication
    0x4A08 - Insufficient authorization
    0x4A0C - Insufficient encryption key size
    0x4A0F - Insufficient encryption
    0x4A02 - Read not permitted

Returns

  • void

description#

This callback function will be called if the attribute descriptors response is received from the module
This callback has to be registered using rsi_ble_gatt_register_callbacks API


Definition at line 2418 of file include/rsi_ble_apis.h

rsi_ble_on_read_resp_t#

void(* rsi_ble_on_read_resp_t)(uint16_t resp_status, uint16_t resp_id, rsi_ble_resp_att_value_t *rsi_ble_resp_att_val) )(uint16_t resp_status, uint16_t resp_id, rsi_ble_resp_att_value_t *rsi_ble_resp_att_val)

The callback function will be called upon receiving the attribute value.

Parameters
[out]resp_status

contains the response id because of which, this callback is called response ids: (RSI_BLE_RSP_READ_VAL, RSI_BLE_RSP_READ_BY_UUID, RSI_BLE_RSP_LONG_READ, RSI_BLE_RSP_MULTIPLE_READ)

[out]rsi_ble_resp_att_val

contains the attribute value. Please refer rsi_ble_resp_att_value_s for more info

Note

  • Attribute protocol error codes
    0x4A01 - Invalid Handle
    0x4A0A - Attribute not found
    0x4A05 - Insufficient authentication
    0x4A08 - Insufficient authorization
    0x4A0C - Insufficient encryption key size
    0x4A0F - Insufficient encryption
    0x4A02 - Read not permitted
    0x4A06 - Request not supported
    0x4A07 - Invalid offset
    0x4A0B - Attribute not Long

Returns

  • void

description#

This callback function will be called upon receiving the attribute value
This callback has to be registered using rsi_ble_gatt_register_callbacks API


Definition at line 2447 of file include/rsi_ble_apis.h

rsi_ble_on_write_resp_t#

void(* rsi_ble_on_write_resp_t)(uint16_t resp_status, uint16_t resp_id) )(uint16_t resp_status, uint16_t resp_id)

The callback function will be called if the attribute set/prepare/execute action is completed.

Parameters
[out]resp_status

contains the response id because of which, this callback is called response ids: (RSI_BLE_RSP_WRITE, RSI_BLE_RSP_WRITE_NO_ACK, RSI_BLE_RSP_LONG_WRITE, RSI_BLE_RSP_EXECUTE_WRITE)

Note

  • Attribute protocol error codes
    0x4A01 - Invalid Handle
    0x4A0A - Attribute not found
    0x4A05 - Insufficient authentication
    0x4A08 - Insufficient authorization
    0x4A0C - Insufficient encryption key size
    0x4A0F - Insufficient encryption
    0x4A03 - Write not permitted
    0x4A07 - Invalid offset
    0x4A0D - Invalid attribute value length

Returns

  • void

description#

This callback function will be called if the attribute set/prepare/execute action is completed
This callback has to be registered using rsi_ble_gatt_register_callbacks API


Definition at line 2474 of file include/rsi_ble_apis.h

rsi_ble_on_gatt_write_event_t#

void(* rsi_ble_on_gatt_write_event_t)(uint16_t event_id, rsi_ble_event_write_t *rsi_ble_write) )(uint16_t event_id, rsi_ble_event_write_t *rsi_ble_write)

The callback function will be called if the GATT write/notify/indicate events are received.

Parameters
[out]event_id

contains the gatt_write event id (RSI_BLE_EVENT_GATT_WRITE)

[out]rsi_ble_write

contains the GATT event information. Please refer rsi_ble_event_write_s for more info

Returns

  • void

description#

This callback function will be called if the GATT write/notify/indicate events are received
This callback has to be registered using rsi_ble_gatt_register_callbacks API


Definition at line 2492 of file include/rsi_ble_apis.h

rsi_ble_on_gatt_prepare_write_event_t#

void(* rsi_ble_on_gatt_prepare_write_event_t)(uint16_t event_id, rsi_ble_event_prepare_write_t *rsi_ble_write) )(uint16_t event_id, rsi_ble_event_prepare_write_t *rsi_ble_write)

The callback function will be called if the GATT prepare events are received.

Parameters
[out]event_id

contains the gatt_prepare_write event id (RSI_BLE_EVENT_PREPARE_WRITE)

[out]rsi_ble_write

contains the GATT prepare event information. Please refer rsi_ble_event_prepare_write_s for more info

Returns

  • void

description#

This callback function will be called if the GATT prepare event is received
This callback has to be registered using rsi_ble_gatt_register_callbacks API


Definition at line 2505 of file include/rsi_ble_apis.h

rsi_ble_on_execute_write_event_t#

void(* rsi_ble_on_execute_write_event_t)(uint16_t event_id, rsi_ble_execute_write_t *rsi_ble_execute_write) )(uint16_t event_id, rsi_ble_execute_write_t *rsi_ble_execute_write)

The callback function will be called if the GATT execute events are received.

Parameters
[out]event_id

contains the gatt_execute_write event id (RSI_BLE_EVENT_EXECUTE_WRITE)

[out]rsi_ble_write

contains the GATT event information. Please refer rsi_ble_execute_write_s for more info.

Returns

  • void

description#

This callback function will be called if the GATT execute event is received
This callback has to be registered using rsi_ble_gatt_register_callbacks API


Definition at line 2517 of file include/rsi_ble_apis.h

rsi_ble_on_read_req_event_t#

void(* rsi_ble_on_read_req_event_t)(uint16_t event_id, rsi_ble_read_req_t *rsi_ble_read_req) )(uint16_t event_id, rsi_ble_read_req_t *rsi_ble_read_req)

The callback function will be called if the GATT read request events are received.

Parameters
[out]event_id

contains the gatt_read_req_event id (RSI_BLE_EVENT_READ_REQ)

[out]rsi_ble_write

contains the GATT event information. Please refer rsi_ble_read_req_s for more info.

Returns

  • void

description#

This callback function will be called if the GATT read request event is received
This callback has to be registered using rsi_ble_gatt_register_callbacks API


Definition at line 2530 of file include/rsi_ble_apis.h

rsi_ble_on_mtu_event_t#

void(* rsi_ble_on_mtu_event_t)(rsi_ble_event_mtu_t *rsi_ble_event_mtu) )(rsi_ble_event_mtu_t *rsi_ble_event_mtu)

The callback function will be called if MTU size request is received.

Parameters
[out]rsi_ble_event_mtu

contains the MTU size information. Please refer rsi_ble_event_mtu_s for more info.

Returns

  • void

description#

This callback function will be called when connected to indicate MTU size
This callback has to be registered using rsi_ble_gatt_register_callbacks API


Definition at line 2541 of file include/rsi_ble_apis.h

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 to indicate MTU size and who initated MTU Exchange Request.

Parameters
[out]rsi_ble_event_mtu_exchange_info

contains the MTU exchange information. Please refer rsi_ble_event_mtu_exchange_information_s for more info.

Returns

  • void

description#

This callback function will be called when connected, this event will contain MTU Exchange Information
This callback has to be registered using rsi_ble_gatt_extended_register_callbacks API


Definition at line 2552 of file include/rsi_ble_apis.h

rsi_ble_on_remote_device_info_t#

void(* rsi_ble_on_remote_device_info_t)(uint16_t status, rsi_ble_event_remote_device_info_t *resp_buffer) )(uint16_t status, rsi_ble_event_remote_device_info_t *resp_buffer)

Callback function to get peer device information.

Parameters
[in]status

- status of the asynchronous response

[out]resp_buffer

- remote device ble version information. Please refer rsi_ble_event_remote_device_info_s for more info.

Returns

  • void

description#

This callback function will be called when conn update complete event is received
This callback has to be registered using rsi_ble_enhanced_gap_extended_register_callbacks API


Definition at line 2565 of file include/rsi_ble_apis.h