Callbacks Declarations#

Typedefs#

typedef void(*
rsi_ble_on_adv_report_event_t)(rsi_ble_event_adv_report_t *rsi_ble_event_adv)

Callback function to 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)

Callback function to 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)

Callback function to 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)

Callback function to 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)

Callback function to 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)

Callback function to 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)

Callback function to 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)

Callback function to 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)

Callback function to 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)

Callback function to 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)

Callback function to 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)

Callback function to 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)

Callback function to 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)

Callback function to 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)

Callback function to 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)

Callback function to 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)

Callback function to 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)

Callback function to 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)

Callback function to 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)

Callback function to 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)

Callback function to 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)

Callback function to 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)

Callback function to 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)

Callback function to 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)

Callback function to 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)

Callback function to 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)

Callback function to 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)

Callback function to 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)

Callback function to 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)

Callback function to 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)

Callback function to 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)

Callback function to 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)

Callback function to 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)

Callback function to 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)

Callback function to 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)

Callback function to be called upon receiving the attribute value.

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

Callback function to 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)

Callback function to 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)

Callback function to 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)

Callback function to 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)

Callback function to 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)

Callback function to be called if MTU size request is received.

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)

Callback function to 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 1463 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)

Callback function to 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.0 version this callback will be triggered This callback has to be registered using rsi_ble_gap_register_callbacks API


Definition at line 1474 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)

Callback function to 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 triggered This callback has to be registered using rsi_ble_gap_register_callbacks API


Definition at line 1485 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)

Callback function to 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 1504 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)

Callback function to 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 1515 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)

Callback function to 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 1527 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)

Callback function to 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

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 1538 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)

Callback function to 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 1556 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)

Callback function to 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 1568 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)

Callback function to 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 1581 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)

Callback function to 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 1594 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)

Callback function to 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 1619 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)

Callback function to 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 1631 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)

Callback function to 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.

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 1644 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)

Callback function to 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 1656 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)

Callback function to 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 1667 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)

Callback function to 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 1680 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)

Callback function to 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 1694 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 1707 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 1718 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 1730 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)

Callback function to 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 1741 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)

Callback function to 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 1803 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)

Callback function to 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 1817 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)

Callback function to 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 1833 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)

Callback function to 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 1849 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)

Callback function to 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 1864 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)

Callback function to 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 1880 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)

Callback function to 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 1895 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)

Callback function to 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 1910 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)

Callback function to 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 1924 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)

Callback function to 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 1938 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)

Callback function to 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 1953 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)

Callback function to 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 1972 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)

Callback function to 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 1991 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)

Callback function to 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 2015 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)

Callback function to 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 2040 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)

Callback function to 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 2063 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)

Callback function to 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 2092 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)

Callback function to 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 2119 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)

Callback function to be called if the GATT write/notify/indicate events are received.

Parameters
[out]event_id

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

[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 2139 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)

Callback function to be called if the GATT prepare events are received.

Parameters
[out]event_id

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

[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 2153 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)

Callback function to be called if the GATT execute events are received.

Parameters
[out]event_id

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

[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 2167 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)

Callback function to be called if the GATT read request events are received.

Parameters
[out]event_id

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

[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 2181 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)

Callback function to 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 2193 of file include/rsi_ble_apis.h