Callbacks Declarations#
Modules#
Typedefs#
Callback function advertise event report from the module.
Callback function for the BLE connection status from the module.
Callback function for the BLE connection status from the module.
Callback function for the disconnect status event from the module.
Callback function for the LE ping time expired event from the module.
Callback function for the LE LTK request event from the module.
Callback function for the LE security keys event from the module.
Callback function for SMP request in central mode from the remote device.
Callback function for SMP request in peripheral mode from the remote device.
Callback function for SMP passkey event from the module.
Callback function for SMP passkey display event from the module.
Callback function for SMP failed event from the module.
Callback function for a security method event from the module.
Callback function an encrypted event from the module.
Callback function for a BLE Secure Connection passkey event from the module.
Callback function for receiving the PHY update complete event.
Callback function for a connection update complete event from the module.
Callback function for remote connection parameters request.
Callback function for peer device supported features.
Callback function for the LE more data event.
Callback function for the data length update complete event.
Callback function for a directed advertise report event from the module.
Callback function for a GATT error event from the module.
Callback function for an attribute descriptors event from the module.
Callback function for a profiles list response from the module.
Callback function for a profile response from the module.
This callback function will be called if the characteristic services list response is received from the module.
Callback function for an include services list response from the module.
Callback function for an attribute value response from the module.
Callback function for an attribute value from the module.
Callback function for a GATT write response from the module.
Callback function for indication confirmation event.
Callback function for a GATT prepare response from the module.
Callback function for a profiles list response from the module.
Callback function for a profile response from the module.
Callback function for a service characteristics response from the module.
Callback function for an include service response from the module.
Callback function for an attribute descriptors response from the module.
Callback function for receiving an attribute value from the module.
Callback function for attribute set/prepare/execute action completion.
Callback function for GATT write, notify, or indicate events from the module.
The callback function will be called if the GATT prepare events are received.
The callback function will be called if the GATT execute events are received.
The callback function will be called if the GATT read request events are received.
The callback function will be called if MTU size request is received.
Callback function to indicate MTU size and who initiated MTU Exchange Request.
Callback function to peer device information.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.
Callback function type for receiving RCP response events.
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 advertise event report from the module.
Type | Direction | Argument Name | Description |
---|---|---|---|
[out] | rsi_ble_event_adv | contains the advertise report information. Please refer rsi_ble_event_adv_report_s for more info. |
This callback function is called whenever an advertise event report is received from the module. It has to registered using the rsi_ble_gap_register_callbacks
API.
Returns
The following values are returned: void
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 for the BLE connection status from the module.
Type | Direction | Argument Name | Description |
---|---|---|---|
[out] | rsi_ble_event_conn | contains the BLE connection status. Please refer rsi_ble_event_conn_status_s for more info. |
This callback function is called whenever the BLE connection status is received from the module. For BLE 4.1 and lower versions, this callback will be called. It has to be registered using the rsi_ble_gap_register_callbacks
API. Returns
The following values are returned: void
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 for the BLE connection status from the module.
Type | Direction | Argument Name | Description |
---|---|---|---|
[out] | rsi_ble_event_enhance_conn | contains the BLE connection status. Please refer rsi_ble_event_enhance_conn_status_s for more info. |
This callback function is called whenever the BLE connection status is received from the module. For BLE 4.2 and above versions, this callback will be called. It has to be registered using the rsi_ble_gap_register_callbacks
API. Returns
The following values are returned: void
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 for the disconnect status event from the module.
Type | Direction | Argument Name | Description |
---|---|---|---|
[out] | rsi_ble_event_disconnect | contains the disconnect status. Please refer rsi_ble_event_disconnect_s for more information. | |
[out] | reason | contains reason for failure. |
This callback function is called whenever the disconnect status event is received from the module. It has to be registered using the rsi_ble_gap_register_callbacks
API. 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
The following values are returned: void
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 for the LE ping time expired event from the module.
Type | Direction | Argument Name | Description |
---|---|---|---|
[out] | rsi_ble_event_timeout_expired | contains the disconnect status. See rsi_ble_event_le_ping_time_expired_s for more information. |
This callback function is called whenever the LE ping time expired event is received from the module. It has to be registered using the rsi_ble_gap_register_callbacks
API. Returns
The following values are returned: void
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 for the LE LTK request event from the module.
Type | Direction | Argument Name | Description |
---|---|---|---|
[out] | rsi_ble_event_le_ltk_request | contains the LTK request info. See rsi_bt_event_le_ltk_request_s for more information. |
This callback function is called whenever the LE LTK request event is received from the module. It has to be registered using the rsi_ble_smp_register_callbacks
API. Returns
The following values are returned: void
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 for the LE security keys event from the module.
Type | Direction | Argument Name | Description |
---|---|---|---|
[out] | rsi_ble_event_le_security_keys | contains security keys. See rsi_bt_event_le_security_keys_s for more information. |
This callback function is called whenever the LE security keys event is received from the module. It has to be registered using the rsi_ble_smp_register_callbacks
API. Returns
The following values are returned: void
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 for SMP request in central mode from the remote device.
Type | Direction | Argument Name | Description |
---|---|---|---|
[out] | remote_dev_address | contains the smp requested device address. See rsi_bt_event_smp_req_s for more information. |
This callback function is called whenever an SMP request is received in central mode from the remote device. It has to be registered using the rsi_ble_smp_register_callbacks
API. Returns
The following values are returned: void
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 for SMP request in peripheral mode from the remote device.
Type | Direction | Argument Name | Description |
---|---|---|---|
[out] | remote_dev_address | contains the smp resp information. See rsi_bt_event_smp_resp_s for more information. |
This callback function is called whenever an SMP request is received in peripheral mode from the remote device. It has to be registered using the rsi_ble_smp_register_callbacks
API. Returns
The following values are returned: void
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 for SMP passkey event from the module.
Type | Direction | Argument Name | Description |
---|---|---|---|
[out] | remote_dev_address | contains the remote device address. See rsi_bt_event_smp_passkey_s for more information. |
This callback function is called whenever an SMP passkey event is received from the module. It has to be registered using the rsi_ble_smp_register_callbacks
API. Returns
The following values are returned: void
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 for SMP passkey display event from the module.
Type | Direction | Argument Name | Description |
---|---|---|---|
[out] | smp_passkey_display | contains the smp passkey display information. See rsi_bt_event_smp_passkey_display_s for more information. |
This callback function is called whenever an SMP passkey display event is received from the module. It has to be registered using the rsi_ble_smp_register_callbacks
API. Returns
The following values are returned: void
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 for SMP failed event from the module.
Type | Direction | Argument Name | Description |
---|---|---|---|
[out] | resp_status | contains the remote device address. See rsi_bt_event_smp_failed_s for more information. |
This callback function will be called if the smp process is failed with remote device. It has to be registered using the rsi_ble_smp_register_callbacks
API. 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
The following values are returned: void
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 for a security method event from the module.
Type | Direction | Argument Name | Description |
---|---|---|---|
[out] | scmethod | contains Security Method 1 means Just works or 2 means Passkey. See rsi_bt_event_sc_method_s for more information. |
This callback function will be called if the SC method is done with remote device. It has to be registered using the rsi_ble_smp_register_callbacks
API. Returns
The following values are returned: void
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 an encrypted event from the module.
Type | Direction | Argument Name | Description |
---|---|---|---|
[out] | resp_status | contains the response status (Success or Error code) | |
[out] | enc_enabled | contains encryption information. See rsi_bt_event_encryption_enabled_s for more information. |
This callback function will be called if the encryption process is started with remote device. It has to be registered using the rsi_ble_smp_register_callbacks
API. Returns
The following values are returned: void
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 for a BLE Secure Connection passkey event from the module.
Type | Direction | Argument Name | Description |
---|---|---|---|
[out] | sc_passkey | contains LE SC Passkey information. See rsi_bt_event_encryption_enabled_s for more information. |
This callback function is called whenever a BLE Secure Connection passkey event is received from the module. It has to be registered using the rsi_ble_smp_register_callbacks
API. Returns
The following values are returned: void
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 for receiving the PHY update complete event.
Type | Direction | Argument Name | Description |
---|---|---|---|
[out] | rsi_ble_event_phy_update_complete | contains the controller support PHY information. See rsi_ble_event_phy_update_s for more information. |
This callback function is called whenever the PHY update complete event is received. It has to be registered using the rsi_ble_gap_register_callbacks
API. Returns
The following values are returned: void
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 for a connection update complete event from the module.
Type | Direction | Argument Name | Description |
---|---|---|---|
[out] | rsi_ble_event_conn_update_complete | contains the controller support conn information. See rsi_ble_event_conn_update_s for more information. | |
[out] | resp_status | contains the response status (Success or Error code) |
This callback function is called whenever the connection update complete event is received. It has to be registered using the rsi_ble_gap_register_callbacks
API.
Returns
The following values are returned: void
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 for remote connection parameters request.
Type | Direction | Argument Name | Description |
---|---|---|---|
[out] | resp_status | contains the response status (Success or Error code) | |
[out] | rsi_ble_event_remote_conn_param | contains the remote device connection parameters. See rsi_ble_event_remote_conn_param_req_s for more information. |
This callback function is called whenever a remote connection parameters request is received. It has to be registered using the rsi_ble_gap_register_callbacks
API. Returns
The following values are returned: void
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 for peer device supported features.
Type | Direction | Argument Name | Description |
---|---|---|---|
[out] | rsi_ble_event_remote_features | contains the remote device supported features. See rsi_ble_event_remote_features_s for more information. |
This callback function will be called when conn update complete event is received. it has to be registered using rsi_ble_gap_extended_register_callbacks API. Returns
The following values are returned: void
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 for the LE more data event.
Type | Direction | Argument Name | Description |
---|---|---|---|
[out] | rsi_ble_more_data_evt | contains the LE Device Buffer Indication information. See rsi_ble_event_le_dev_buf_ind_s for more infomation. |
This callback function is called whenever an LE more data event is received. It has to be registered using the rsi_ble_gap_extended_register_callbacks
API. Returns
The following values are returned: void
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)
Callback function for the data length update complete event.
Type | Direction | Argument Name | Description |
---|---|---|---|
[out] | remote_dev_address | contains the controller support TX and RX length information. See rsi_ble_event_data_length_update_s for more information. |
This callback function is called whenever the data length update complete event is received. It has to be registered using the rsi_ble_gap_register_callbacks
API. Returns
The following values are returned: void
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 for a directed advertise report event from the module.
Type | Direction | Argument Name | Description |
---|---|---|---|
[in] | rsi_ble_event_directed | contains the advertise report information |
This callback function is called whenever a directed advertise report event is received from the module. It has to be registered using the rsi_ble_gap_register_callbacks
API.
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 for a GATT error event from the module.
Type | Direction | Argument Name | Description |
---|---|---|---|
[out] | event_status | contains the error response | |
[out] | rsi_ble_gatt_error | contains the GATT error information. Please refer rsi_ble_event_error_resp_s for more info |
This callback function is called whenever a GATT error event is received from the module. It has to be registered using the rsi_ble_gatt_register_callbacks
API. Returns
The following values are returned: void
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 for an attribute descriptors event from the module.
Type | Direction | Argument Name | Description |
---|---|---|---|
[out] | event_status | contains the response status
| |
[out] | rsi_ble_gatt_desc_val | contains the profiles list event information. Please refer rsi_ble_event_gatt_desc_s for more info |
This callback function is called whenever an attribute descriptors event is received from the module. It has to be registered using the rsi_ble_gatt_register_callbacks
API. Returns
The following values are returned: void
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 for a profiles list response from the module.
Type | Direction | Argument Name | Description |
---|---|---|---|
[out] | event_status | contains the response status
| |
[out] | rsi_ble_event_profiles | contains the profiles list event information. Please refer rsi_ble_event_profiles_list_s for more info |
This callback function is called whenever a profiles list response is received from the module. It has to be registered using the rsi_ble_gatt_register_callbacks
API. Returns
The following values are returned: void
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 for a profile response from the module.
Type | Direction | Argument Name | Description |
---|---|---|---|
[out] | event_status | contains the response status
| |
[out] | rsi_ble_event_profile | contains the profile response information. Please refer rsi_ble_event_profile_by_uuid_s for more info. |
This callback function is called whenever a profile response is received from the module. It has to be registered using the rsi_ble_gatt_register_callbacks
API. Returns
The following values are returned: void
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)
This callback function will be called if the characteristic services list response is received from the module.
Type | Direction | Argument Name | Description |
---|---|---|---|
[out] | event_status | contains the response status
| |
[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
The following values are returned: void
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 for an include services list response from the module.
Type | Direction | Argument Name | Description |
---|---|---|---|
[out] | event_status | contains the response status
| |
[out] | rsi_ble_event_read_type2 | contains the inc services information. Please refer rsi_ble_event_read_by_type2_s for more info. |
This callback function is called whenever an include services list response is received from the module. It has to be registered using the rsi_ble_gatt_register_callbacks
API. Returns
The following values are returned: void
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 for an attribute value response from the module.
Type | Direction | Argument Name | Description |
---|---|---|---|
[out] | event_status | contains the response status
| |
[out] | rsi_ble_event_read_type3 | contains the char services event information. Please refer rsi_ble_event_read_by_type3_s for more info. |
This callback function is called whenever an attribute value response is received from the module. It has to be registered using the rsi_ble_gatt_register_callbacks
API. Returns
The following values are returned: void
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 for an attribute value from the module.
Type | Direction | Argument Name | Description |
---|---|---|---|
[out] | event_status | contains the response status
| |
[out] | rsi_ble_event_att_val | contains the profile response information. Please refer rsi_ble_event_att_value_s for more info. |
This callback function is called whenever an attribute value is received from the module. It has to be registered using the rsi_ble_gatt_register_callbacks
API. Returns
The following values are returned: void
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 for a GATT write response from the module.
Type | Direction | Argument Name | Description |
---|---|---|---|
[out] | event_status | contains the response status
| |
[out] | rsi_ble_event_set_att_rsp | contains the profile response information. Please refer rsi_ble_set_att_resp_t for more info. |
This callback function is called whenever a GATT write response is received from the module. It has to be registered using the rsi_ble_gatt_register_callbacks
API. Returns
The following values are returned: void
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 for indication confirmation event.
Type | Direction | Argument Name | Description |
---|---|---|---|
[out] | event_status | contains the response status
| |
[out] | rsi_ble_event_set_att_rsp | contains the profile response information. Please refer rsi_ble_set_att_resp_s for more info. |
This callback function is called whenever an indication confirmation response is received from the module. It has to be registered using the rsi_ble_gatt_register_callbacks
API. Returns
The following values are returned: void
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 for a GATT prepare response from the module.
Type | Direction | Argument Name | Description |
---|---|---|---|
[out] | event_status | contains the response status
| |
[out] | rsi_ble_event_prepare_write | contains the char services event information. Please refer rsi_ble_prepare_write_resp_s for more info. |
This callback function is called whenever a GATT prepare response is received from the module. It has to be registered using the rsi_ble_gatt_register_callbacks
API. Returns
The following values are returned: void
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 for a profiles list response from the module.
Type | Direction | Argument Name | Description |
---|---|---|---|
[out] | resp_status | contains the profiles list response information. Please refer rsi_ble_resp_profiles_list_s for more info. |
This callback function is called whenever a profiles list response is received from the module. It has to be registered using the rsi_ble_gatt_register_callbacks
API. Note
Attribute protocol error codes 0x4A01 - Invalid Handle 0x4A0A - Attribute not found
Returns
The following values are returned: void
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 for a profile response from the module.
Type | Direction | Argument Name | Description |
---|---|---|---|
[out] | resp_status | contains the profile response information. Please refer profile_descriptors_s for more info |
This callback function is called whenever a profile response is received from the module. It has to be registered using the rsi_ble_gatt_register_callbacks
API. Note
Attribute protocol error codes 0x4A01 - Invalid Handle 0x4A06 - Request not supported 0x4A0A - Attribute not found
Returns
The following values are returned: void
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 for a service characteristics response from the module.
Type | Direction | Argument Name | Description |
---|---|---|---|
[out] | resp_status | contains the service characteristics response information. Please refer rsi_ble_resp_char_services_s for more info |
This callback function is called whenever a service characteristics response is received from the module. It has to be registered using the rsi_ble_gatt_register_callbacks
API. 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
The following values are returned: void
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 for an include service response from the module.
Type | Direction | Argument Name | Description |
---|---|---|---|
[out] | resp_status | contains the include services response information. Please refer rsi_ble_resp_inc_services_s for more info |
This callback function is called whenever an include service response is received from the module. It has to be registered using the rsi_ble_gatt_register_callbacks
API. 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
The following values are returned: void
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 for an attribute descriptors response from the module.
Type | Direction | Argument Name | Description |
---|---|---|---|
[out] | resp_status | contains the attribute descriptors response information. Please refer rsi_ble_resp_att_descs_s for more info |
This callback function is called whenever an attribute descriptors response is received from the module. It has to be registered using the rsi_ble_gatt_register_callbacks
API. 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
The following values are returned: void
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 for receiving an attribute value from the module.
Type | Direction | Argument Name | Description |
---|---|---|---|
[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 |
This callback function is called upon receiving an attribute value from the module. It has to be registered using the rsi_ble_gatt_register_callbacks
API. 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
The following values are returned: void
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 for attribute set/prepare/execute action completion.
Type | Direction | Argument Name | Description |
---|---|---|---|
[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) |
This callback function is called when an attribute set, prepare, or execute action is completed. It has to be registered using the rsi_ble_gatt_register_callbacks
API. 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
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 for GATT write, notify, or indicate events from the module.
Type | Direction | Argument Name | Description |
---|---|---|---|
[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 |
This callback function is called when GATT write, notify, or indicate events are received from the module. It has to be registered using the rsi_ble_gatt_register_callbacks
API.
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.
Type | Direction | Argument Name | Description |
---|---|---|---|
[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 |
This callback has to be registered using rsi_ble_gatt_register_callbacks API.
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.
Type | Direction | Argument Name | Description |
---|---|---|---|
[out] | event_id | contains the gatt_execute_write event id (RSI_BLE_EVENT_EXECUTE_WRITE) | |
[out] | rsi_ble_execute_write | contains the GATT event information. Please refer rsi_ble_execute_write_s for more info. |
This callback has to be registered using rsi_ble_gatt_register_callbacks API.
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.
Type | Direction | Argument Name | Description |
---|---|---|---|
[out] | event_id | contains the gatt_read_req_event id (RSI_BLE_EVENT_READ_REQ) | |
[out] | rsi_ble_read_req | contains the GATT event information. Please refer rsi_ble_read_req_s for more info. |
This callback has to be registered using rsi_ble_gatt_register_callbacks API.
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.
Type | Direction | Argument Name | Description |
---|---|---|---|
[out] | rsi_ble_event_mtu | contains the MTU size information. Please refer rsi_ble_event_mtu_s for more info. |
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.
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 initiated MTU Exchange Request.
Type | Direction | Argument Name | Description |
---|---|---|---|
[out] | rsi_ble_event_mtu_exchange_info | contains the MTU exchange information. Please refer rsi_ble_event_mtu_exchange_information_s for more info. |
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.
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 peer device information.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.
Type | Direction | Argument Name | Description |
---|---|---|---|
[out] | status | contains the remote device version information. |
Note
Refer Bluetooth Generic Error Codes section up to 0x4FF8 from error-codes.
rsi_ble_on_rcp_resp_rcvd_t#
void(* rsi_ble_on_rcp_resp_rcvd_t)(uint16_t status, rsi_ble_event_rcp_rcvd_info_t *resp_buffer) )(uint16_t status, rsi_ble_event_rcp_rcvd_info_t *resp_buffer)
Callback function type for receiving RCP response events.
Type | Direction | Argument Name | Description |
---|---|---|---|
N/A | status | The status of the RCP response event. | |
N/A | resp_buffer | Pointer to the buffer containing the RCP response information. |