Asynchronous Client#
Functions#
Get the supported profiles / services of the connected remote device asynchronously.
Get the specific profile / service of the connected remote device.
Get the service characteristics of the connected / remote device.
Get the supported include services of the connected / remote device.
Get the characteristic value by UUID (char_uuid).
Get the characteristic descriptors list from the remote device.
Get the attribute with a handle.
Get the long attribute value by using handle and offset.
Execute the prepared attribute values.
Function Documentation#
rsi_ble_indicate_value_sync#
int32_t rsi_ble_indicate_value_sync (const uint8_t * dev_addr, uint16_t handle, uint16_t data_len, const uint8_t * p_data)
N/A | dev_addr | |
N/A | handle | |
N/A | data_len | |
N/A | p_data |
3298
of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h
rsi_ble_indicate_confirm#
int32_t rsi_ble_indicate_confirm (const uint8_t * dev_addr)
N/A | dev_addr |
3313
of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h
rsi_ble_get_profiles_async#
int32_t rsi_ble_get_profiles_async (uint8_t * dev_addr, uint16_t start_handle, uint16_t end_handle, rsi_ble_resp_profiles_list_t * p_prof_list)
Get the supported profiles / services of the connected remote device asynchronously.
[in] | dev_addr | - remote device address |
[in] | start_handle | - start handle (index) of the remote device's service records |
[in] | end_handle | - end handle (index) of the remote device's service records |
[out] | p_prof_list | - profiles/services information will be filled in this structure after retrieving from the remote device, please refer rsi_ble_resp_profiles_list_s structure for more info. |
rsi_ble_on_event_profiles_list_t callback function will be called after the profiles list event is received. This is a blocking API and can unblock the application on the reception of the callback functions either rsi_ble_on_event_profiles_list_t or rsi_ble_on_gatt_error_resp_t.
Pre-conditions: rsi_ble_connect() API needs to be called before this API.
Note
p_prof_list structure should be passed as NULL because nothing will be filled in this structure
Returns
The following values are returned:
0 - Success
Non-Zero Value - Failure
0x4E62 - Invalid Parameters
0x4D04 - BLE not connected
0x4D05 - BLE Socket not available
Note
Refer to the Status Codes section for the above error codes at additional-status-codes .
3779
of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h
rsi_ble_get_profile_async#
int32_t rsi_ble_get_profile_async (uint8_t * dev_addr, uuid_t profile_uuid, profile_descriptors_t * p_profile)
Get the specific profile / service of the connected remote device.
[in] | dev_addr | - remote device address |
[in] | profile_uuid | - services/profiles which are searched using profile_uuid |
[out] | p_profile | - profile / service information filled in this structure after retrieving from the remote device, please refer profile_descriptor_s structure for more info. |
rsi_ble_one_event_profile_by_uuid_t callback function is called after the service characteristics response is received. This is a blocking API and can unblock the application on the reception of the callback functions either rsi_ble_one_event_profile_by_uuid_t or rsi_ble_on_gatt_error_resp_t.
Pre-conditions:
rsi_ble_connect() API needs to be called before this API.
Note
p_profile structure should be passed as NULL because nothing will be filled in this structure
Returns
The following values are returned:
0 - Success
Non-Zero Value - Failure
0x4E62 - Invalid Parameters
0x4D04 - BLE not connected
0x4D05 - BLE Socket not available
Note
Refer to the Status Codes section for the above error codes at additional-status-codes .
3807
of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h
rsi_ble_get_char_services_async#
rint32_t rsi_ble_get_char_services_async (uint8_t * dev_addr, uint16_t start_handle, uint16_t end_handle, rsi_ble_resp_char_services_t * p_char_serv_list)
Get the service characteristics of the connected / remote device.
[in] | dev_addr | - remote device address |
[in] | start_handle | - start handle (index) of the remote device's service records |
[in] | end_handle | - end handle (index) of the remote device's service records |
[out] | p_char_serv_list | - service characteristics details are filled in this structure, please refer rsi_ble_resp_char_serv_s structure for more info. |
rsi_ble_on_event_read_by_char_services_t callback function is called after the included service characteristics response is received. This is a blocking API and can unblock the application on the reception of the callback functions either rsi_ble_on_event_read_by_char_services_t or rsi_ble_on_gatt_error_resp_t.
Pre-conditions: rsi_ble_connect() API needs to be called before this API.
Note
p_char_services_list structure should be passed as NULL because nothing will be filled in this structure
Returns
The following values are returned:
0 - Success
Non-Zero Value - Failure
0x4E60 - Invalid Handle range
0x4E62 - Invalid Parameters
0x4D04 - BLE not connected
0x4D05 - BLE Socket not available
Note
Refer to the Status Codes section for the above error codes at additional-status-codes .
3837
of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h
rsi_ble_get_inc_services_async#
int32_t rsi_ble_get_inc_services_async (uint8_t * dev_addr, uint16_t start_handle, uint16_t end_handle, rsi_ble_resp_inc_services_t * p_inc_serv_list)
Get the supported include services of the connected / remote device.
[in] | dev_addr | - remote device address |
[in] | start_handle | - start handle (index) of the remote device's service records |
[in] | end_handle | - end handle (index) of the remote device's service records |
[out] | p_inc_serv_list | - include service characteristics details are filled in this structure, please refer rsi_ble_resp_inc_serv structure for more info. |
rsi_ble_on_event_read_by_inc_services_t callback function is called after the service characteristics response is received. This is a blocking API and can unblock the application on the reception of the callback functions either rsi_ble_on_event_read_by_inc_services_t or rsi_ble_on_gatt_error_resp_t.
Pre-conditions: rsi_ble_connect() API needs to be called before this API.
Note
p_inc_serv_list structure should be passed as NULL because nothing will be filled in this structure
Returns
The following values are returned:
0 - Success
Non-Zero Value - Failure
0x4E60 - Invalid Handle range
0x4E62 - Invalid Parameters
0x4D04 - BLE not connected
0x4D05 - BLE Socket not available
Note
Refer to the Status Codes section for the above error codes at additional-status-codes .
3869
of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h
rsi_ble_get_char_value_by_uuid_async#
int32_t rsi_ble_get_char_value_by_uuid_async (uint8_t * dev_addr, uint16_t start_handle, uint16_t end_handle, uuid_t char_uuid, rsi_ble_resp_att_value_t * p_char_val)
Get the characteristic value by UUID (char_uuid).
[in] | dev_addr | - remote device address |
[in] | start_handle | - start handle (index) of the remote device's service records |
[in] | end_handle | - end handle (index) of the remote device's service records |
[in] | char_uuid | - UUID of the characteristic |
[out] | p_char_val | - characteristic value is filled in this structure, please refer rsi_ble_resp_att_value_s structure for more info. |
rsi_ble_on_event_read_att_value_t callback function is called after the attribute value is received. This is a blocking API and can unblock the application on the reception of the callback functions either rsi_ble_on_event_read_att_value_t or rsi_ble_on_gatt_error_resp_t.
Pre-conditions:
rsi_ble_connect() API needs to be called before this API.
Note
p_char_value structure should be passed as NULL because nothing will be filled in this structure
Returns
The following values are returned:
0 - Success
Non-Zero Value - Failure
0x4E60 - Invalid Handle range
0x4E62 - Invalid Parameters
0x4D04 - BLE not connected
0x4D05 - BLE Socket not available
Note
Refer to the Status Codes section for the above error codes at additional-status-codes .
3902
of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h
rsi_ble_get_att_descriptors_async#
int32_t rsi_ble_get_att_descriptors_async (uint8_t * dev_addr, uint16_t start_handle, uint16_t end_handle, rsi_ble_resp_att_descs_t * p_att_desc)
Get the characteristic descriptors list from the remote device.
[in] | dev_addr | - remote device address |
[in] | start_handle | - start handle (index) of the remote device's service records |
[in] | end_handle | - end handle (index) of the remote device's service records |
[out] | p_att_desc | - pointer to characteristic descriptor structure, Please refer rsi_ble_resp_att_descs_s strcuture for more info.
|
rsi_ble_on_gatt_desc_val_event_t callback function is called after the attribute descriptors response is received. This is a blocking API and can unblock the application on the reception of the callback functions either rsi_ble_on_gatt_desc_val_event_t or rsi_ble_on_gatt_error_resp_t.
Pre-conditions: rsi_ble_connect() API needs to be called before this API.
Returns
The following values are returned:
0 - Success
Non-Zero Value - Failure
0x4E60 - Invalid Handle range
0x4E62 - Invalid Parameters
0x4D04 - BLE not connected
0x4D05 - BLE Socket not available
Note
Refer to the Status Codes section for the above error codes at additional-status-codes .
3935
of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h
rsi_ble_get_att_value_async#
int32_t rsi_ble_get_att_value_async (uint8_t * dev_addr, uint16_t handle, rsi_ble_resp_att_value_t * p_att_val)
Get the attribute with a handle.
[in] | dev_addr | - remote device address |
[in] | handle | - handle value of the attribute |
[out] | p_att_val | - attribute value is filled in this structure, Please refer rsi_ble_resp_att_value_s structure for more info. |
rsi_ble_on_event_read_resp_t callback function is called upon receiving the attribute value. This is a blocking API and can unblock the application on the reception of the callback functions either rsi_ble_on_event_read_resp_t or rsi_ble_on_gatt_error_resp_t.
Pre-conditions: rsi_ble_connect() API needs to be called before this API.
Note
p_att_val structure should be passed as NULL because nothing will be filled in this structure
Returns
The following values are returned:
0 - Success
Non-Zero Value - Failure
0x4E60 - Invalid Handle range
0x4E62 - Invalid Parameters
0x4D04 - BLE not connected
0x4D05 - BLE Socket not available
Note
Refer to the Status Codes section for the above error codes at additional-status-codes .
3962
of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h
rsi_ble_get_multiple_att_values_async#
int32_t rsi_ble_get_multiple_att_values_async (uint8_t * dev_addr, uint8_t num_of_handlers, const uint16_t * handles, rsi_ble_resp_att_value_t * p_att_vals)
N/A | dev_addr | |
N/A | num_of_handlers | |
N/A | handles | |
N/A | p_att_vals |
3988
of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h
rsi_ble_get_long_att_value_async#
int32_t rsi_ble_get_long_att_value_async (uint8_t * dev_addr, uint16_t handle, uint16_t offset, rsi_ble_resp_att_value_t * p_att_vals)
Get the long attribute value by using handle and offset.
[in] | dev_addr | - remote device address |
[in] | handle | - attribute handle |
[in] | offset | - offset within the attribute value |
[out] | p_att_vals | - attribute value filled in this structure, please refer rsi_ble_resp_att_value_s structure for more info. |
rsi_ble_on_event_read_resp_t callback function is called after the attribute value is received. This is a blocking API and can unblock the application on the reception of the callback functions either rsi_ble_on_event_read_resp_t or rsi_ble_on_gatt_error_resp_t.
Pre-conditions: rsi_ble_connect() API needs to be called before this API.
Note
p_att_vals structure should be passed as NULL because nothing will be filled in this structure
Returns
The following values are returned:
0 - Success
Non-Zero Value - Failure
0x4E60 - Invalid Handle range
0x4E62 - Invalid Parameters
0x4D04 - BLE not connected
0x4D05 - BLE Socket not available
Note
Refer to the Status Codes section for the above error codes at additional-status-codes .
4018
of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h
rsi_ble_set_att_value_async#
int32_t rsi_ble_set_att_value_async (uint8_t * dev_addr, uint16_t handle, uint8_t data_len, const uint8_t * p_data)
N/A | dev_addr | |
N/A | handle | |
N/A | data_len | |
N/A | p_data |
4045
of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h
rsi_ble_prepare_write_async#
int32_t rsi_ble_prepare_write_async (uint8_t * dev_addr, uint16_t handle, uint16_t offset, uint8_t data_len, const uint8_t * p_data)
N/A | dev_addr | |
N/A | handle | |
N/A | offset | |
N/A | data_len | |
N/A | p_data |
4072
of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h
rsi_ble_execute_write_async#
int32_t rsi_ble_execute_write_async (uint8_t * dev_addr, uint8_t exe_flag)
Execute the prepared attribute values.
[in] | dev_addr | - remote device address |
[in] | exe_flag | - execute flag to write, possible values mentioned below
|
rsi_ble_on_event_write_resp_t callback function is called after the execute attribute write action is completed. This is a blocking API and can unblock the application on the reception of the callback functions either rsi_ble_on_event_write_resp_t or rsi_ble_on_gatt_error_resp_t.
Pre-conditions: rsi_ble_connect() API needs to be called before this API.
Returns
The following values are returned:
0 - Success
Non-Zero Value - Failure
0x4D05 - BLE Socket not available
Note
Refer to the Status Codes section for the above error codes at additional-status-codes .
4096
of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h