API unique to IPS designs configured as a GATT Client role.
A letter 'c' is appended to the API name: Cy_BLE_IPSC_
|
cy_en_ble_api_result_t | Cy_BLE_IPSC_SetCharacteristicValueWithoutResponse (cy_stc_ble_conn_handle_t connHandle, cy_en_ble_ips_char_index_t charIndex, uint8_t attrSize, uint8_t *attrValue) |
| This function is used to write the characteristic (which is identified by charIndex) value attribute in the server without response. More...
|
|
cy_en_ble_api_result_t | Cy_BLE_IPSC_SetCharacteristicValue (cy_stc_ble_conn_handle_t connHandle, cy_en_ble_ips_char_index_t charIndex, uint8_t attrSize, uint8_t *attrValue) |
| This function is used to write the characteristic (which is identified by charIndex) value attribute in the server. More...
|
|
cy_en_ble_api_result_t | Cy_BLE_IPSC_ReliableWriteCharacteristicValue (cy_stc_ble_conn_handle_t connHandle, cy_en_ble_ips_char_index_t charIndex, uint8_t attrSize, uint8_t *attrValue) |
| This function is used to perform a reliable write command for the Indoor Positioning service (identified by charIndex) value attribute to the server. More...
|
|
cy_en_ble_api_result_t | Cy_BLE_IPSC_GetCharacteristicValue (cy_stc_ble_conn_handle_t connHandle, cy_en_ble_ips_char_index_t charIndex) |
| This function is used to read the characteristic Value from a server, as identified by its charIndex. More...
|
|
cy_en_ble_api_result_t | Cy_BLE_IPSC_GetMultipleCharacteristicValues (cy_stc_ble_conn_handle_t connHandle, const cy_en_ble_ips_char_index_t *charIndexesList, uint8_t numberOfCharIndexes) |
| This function reads multiple Characteristic Values from a GATT Server when the GATT Client knows the Characteristic value handles. More...
|
|
cy_en_ble_api_result_t | Cy_BLE_IPSC_GetLongCharacteristicValue (cy_stc_ble_conn_handle_t connHandle, cy_en_ble_ips_char_index_t charIndex, uint16_t attrSize, uint8_t *attrValue) |
| Sends a request to read a long characteristic. More...
|
|
cy_en_ble_api_result_t | Cy_BLE_IPSC_SetCharacteristicDescriptor (cy_stc_ble_conn_handle_t connHandle, cy_en_ble_ips_char_index_t charIndex, cy_en_ble_ips_descr_index_t descrIndex, uint8_t attrSize, uint8_t *attrValue) |
| This function is used to write the characteristic Value to the server, as identified by its charIndex. More...
|
|
cy_en_ble_api_result_t | Cy_BLE_IPSC_GetCharacteristicDescriptor (cy_stc_ble_conn_handle_t connHandle, cy_en_ble_ips_char_index_t charIndex, cy_en_ble_ips_descr_index_t descrIndex) |
| Gets the characteristic descriptor of the specified characteristic. More...
|
|
◆ Cy_BLE_IPSC_SetCharacteristicValueWithoutResponse()
This function is used to write the characteristic (which is identified by charIndex) value attribute in the server without response.
- Parameters
-
connHandle | The connection handle. |
charIndex | The index of the service characteristic. |
attrSize | The size of the characteristic value attribute. |
attrValue | The pointer to the characteristic value data that should be sent to the server device. |
- Returns
- A return value of type cy_en_ble_api_result_t.
Error Codes | Description |
CY_BLE_SUCCESS | The request was sent successfully. |
CY_BLE_ERROR_INVALID_PARAMETER | Validation of the input parameters failed. |
CY_BLE_ERROR_MEMORY_ALLOCATION_FAILED | Memory allocation failed. |
CY_BLE_ERROR_INVALID_STATE | Connection with the server is not established. |
CY_BLE_ERROR_GATT_DB_INVALID_ATTR_HANDLE | The peer device doesn't have the particular characteristic. |
CY_BLE_ERROR_INVALID_OPERATION | Operation is invalid for this characteristic. |
◆ Cy_BLE_IPSC_SetCharacteristicValue()
This function is used to write the characteristic (which is identified by charIndex) value attribute in the server.
As a result a Write Request is sent to the GATT Server and on successful execution of the request on the server side, the CY_BLE_EVT_IPSS_WRITE_CHAR event is generated. On successful request execution on the server side, the Write Response is sent to the client.
The Write Response just confirms the operation success.
- Parameters
-
connHandle | The connection handle. |
charIndex | The index of the service characteristic. |
attrSize | The size of the characteristic value attribute. |
attrValue | The pointer to the characteristic value data that should be sent to the server device. |
- Returns
- A return value of type cy_en_ble_api_result_t.
Error Codes | Description |
CY_BLE_SUCCESS | The request was sent successfully. |
CY_BLE_ERROR_INVALID_PARAMETER | Validation of the input parameters failed. |
CY_BLE_ERROR_MEMORY_ALLOCATION_FAILED | Memory allocation failed. |
CY_BLE_ERROR_INVALID_STATE | Connection with the server is not established. |
CY_BLE_ERROR_GATT_DB_INVALID_ATTR_HANDLE | The peer device doesn't have the particular characteristic. |
CY_BLE_ERROR_INVALID_OPERATION | Operation is invalid for this characteristic. |
- Events
- In the case of successful execution (return value = CY_BLE_SUCCESS) the following events can appear:
If the IPS service-specific callback is registered (with Cy_BLE_IPS_RegisterAttrCallback):
Otherwise (if the IPS service-specific callback is not registered):
◆ Cy_BLE_IPSC_ReliableWriteCharacteristicValue()
This function is used to perform a reliable write command for the Indoor Positioning service (identified by charIndex) value attribute to the server.
The Write Response just confirms the operation success.
- Parameters
-
connHandle | The connection handle. |
charIndex | The index of a service characteristic. |
attrSize | The size of the characteristic value attribute. |
attrValue | The pointer to the characteristic value data that should be sent to the server device. |
- Returns
- The return value is of type cy_en_ble_api_result_t.
Error Codes | Description |
CY_BLE_SUCCESS | The request was sent successfully. |
CY_BLE_ERROR_INVALID_PARAMETER | Validation of the input parameters failed. |
CY_BLE_ERROR_MEMORY_ALLOCATION_FAILED | Memory allocation failed. |
CY_BLE_ERROR_INVALID_STATE | Connection with the server is not established. |
CY_BLE_ERROR_GATT_DB_INVALID_ATTR_HANDLE | The peer device doesn't have the particular characteristic. |
CY_BLE_ERROR_INVALID_OPERATION | Operation is invalid for this characteristic. |
- Events
- In case of successful execution (return value = CY_BLE_SUCCESS) the following events can appear:
If the IPS service-specific callback is registered (with Cy_BLE_IPS_RegisterAttrCallback):
Otherwise (if the IPS service-specific callback is not registered):
◆ Cy_BLE_IPSC_GetCharacteristicValue()
This function is used to read the characteristic Value from a server, as identified by its charIndex.
The Read Response returns the characteristic Value in the Attribute Value parameter.
- Parameters
-
connHandle | The connection handle. |
charIndex | The index of the service characteristic. |
- Returns
- A return value of type cy_en_ble_api_result_t.
Error Codes | Description |
CY_BLE_SUCCESS | The request was sent successfully. |
CY_BLE_ERROR_INVALID_PARAMETER | Validation of the input parameters failed. |
CY_BLE_ERROR_MEMORY_ALLOCATION_FAILED | Memory allocation failed. |
CY_BLE_ERROR_INVALID_STATE | Connection with the server is not established. |
CY_BLE_ERROR_GATT_DB_INVALID_ATTR_HANDLE | The peer device doesn't have the particular characteristic. |
CY_BLE_ERROR_INVALID_OPERATION | Operation is invalid for this characteristic. |
- Events
- In case of successful execution (return value = CY_BLE_SUCCESS) the following events can appear:
If the IPS service-specific callback is registered (with Cy_BLE_IPS_RegisterAttrCallback):
Otherwise (if the IPS service-specific callback is not registered):
◆ Cy_BLE_IPSC_GetMultipleCharacteristicValues()
This function reads multiple Characteristic Values from a GATT Server when the GATT Client knows the Characteristic value handles.
This is a non-blocking function.
Internally, Read Multiple Request is sent to the peer device in response to which Read Multiple Response is received. This results in CY_BLE_EVT_GATTC_READ_MULTI_RSP event, which is propagated to the application layer.
An Error Response event is sent by the server (CY_BLE_EVT_GATTC_ERROR_RSP) in response to the Read Multiple Request if insufficient authentication, insufficient authorization, insufficient encryption key size is used by the client, or if a read operation is not permitted on any of the Characteristic values. The Error Code parameter is set as specified in the Attribute Protocol.
Refer to Bluetooth 4.1 core specification, Volume 3, Part G, section 4.8.4 for more details on the sequence of operations.
- Parameters
-
connHandle | Connection handle to identify the peer GATT entity, of type cy_stc_ble_conn_handle_t. |
charIndexesList | Pointer to a list of Characteristic value handles |
numberOfCharIndexes | Number of requested Characteristic handles |
- Returns
- cy_en_ble_api_result_t : Return value indicates whether the function succeeded or failed. Following are the possible error codes.
Errors codes | Description |
CY_BLE_SUCCESS | On successful operation |
CY_BLE_ERROR_INVALID_PARAMETER | 'connHandle' value does not represent any existing entry in the Stack |
CY_BLE_ERROR_INVALID_OPERATION | This operation is not permitted |
CY_BLE_ERROR_MEMORY_ALLOCATION_FAILED | Memory allocation failed. |
CY_BLE_ERROR_INVALID_STATE | Connection with the client is not established. |
CY_BLE_ERROR_GATT_DB_INVALID_ATTR_HANDLE | The peer device doesn't have the particular characteristic. |
- Events
- In case of successful execution (return value = CY_BLE_SUCCESS) the following events can appear:
If the IPS service-specific callback is registered (with Cy_BLE_IPS_RegisterAttrCallback):
Otherwise (if the IPS service-specific callback is not registered):
◆ Cy_BLE_IPSC_GetLongCharacteristicValue()
Sends a request to read a long characteristic.
- Parameters
-
connHandle | The connection handle. |
charIndex | The index of the service characteristic. |
attrSize | The size of the characteristic value attribute. |
attrValue | The pointer to the buffer where the read long characteristic descriptor value should be stored. |
- Returns
- A return value of type cy_en_ble_api_result_t.
Error Codes | Description |
CY_BLE_SUCCESS | The request was sent successfully. |
CY_BLE_ERROR_INVALID_PARAMETER | Validation of the input parameters failed. |
CY_BLE_ERROR_MEMORY_ALLOCATION_FAILED | Memory allocation failed. |
CY_BLE_ERROR_INVALID_STATE | Connection with the server is not established. |
CY_BLE_ERROR_GATT_DB_INVALID_ATTR_HANDLE | The peer device doesn't have the particular characteristic. |
CY_BLE_ERROR_INVALID_OPERATION | Operation is invalid for this characteristic. |
- Events
- In the case of successful execution (return value = CY_BLE_SUCCESS) the following events can appear:
If the IPS service-specific callback is registered (with Cy_BLE_IPS_RegisterAttrCallback):
Otherwise (if the IPS service-specific callback is not registered):
◆ Cy_BLE_IPSC_SetCharacteristicDescriptor()
This function is used to write the characteristic Value to the server, as identified by its charIndex.
- Parameters
-
connHandle | The connection handle. |
charIndex | The index of the service characteristic. |
descrIndex | The index of the service characteristic descriptor. |
attrSize | The size of the characteristic descriptor value attribute. |
attrValue | The pointer to the characteristic descriptor value data that should be sent to the server device. |
- Returns
- A return value of type cy_en_ble_api_result_t.
Error Codes | Description |
CY_BLE_SUCCESS | The request was sent successfully. |
CY_BLE_ERROR_INVALID_PARAMETER | Validation of the input parameters failed. |
CY_BLE_ERROR_MEMORY_ALLOCATION_FAILED | Memory allocation failed. |
CY_BLE_ERROR_INVALID_STATE | Connection with the server is not established. |
CY_BLE_ERROR_GATT_DB_INVALID_ATTR_HANDLE | The peer device doesn't have the particular characteristic. |
CY_BLE_ERROR_INVALID_OPERATION | Operation is invalid for this characteristic. |
- Events
- In the case of successful execution (return value = CY_BLE_SUCCESS) the following events can appear:
If the IPS service-specific callback is registered (with Cy_BLE_IPS_RegisterAttrCallback):
Otherwise (if the IPS service-specific callback is not registered):
◆ Cy_BLE_IPSC_GetCharacteristicDescriptor()
Gets the characteristic descriptor of the specified characteristic.
- Parameters
-
connHandle | The connection handle. |
charIndex | The index of the service characteristic. |
descrIndex | The index of the service characteristic descriptor. |
- Returns
- A return value of type cy_en_ble_api_result_t.
Error Codes | Description |
CY_BLE_SUCCESS | The request was sent successfully. |
CY_BLE_ERROR_INVALID_PARAMETER | Validation of the input parameters failed. |
CY_BLE_ERROR_MEMORY_ALLOCATION_FAILED | Memory allocation failed. |
CY_BLE_ERROR_INVALID_STATE | Connection with the server is not established. |
CY_BLE_ERROR_GATT_DB_INVALID_ATTR_HANDLE | The peer device doesn't have the particular characteristic. |
CY_BLE_ERROR_INVALID_OPERATION | Operation is invalid for this characteristic. |
- Events
- In the case of successful execution (return value = CY_BLE_SUCCESS) the following events can appear:
If the IPS service-specific callback is registered (with Cy_BLE_IPS_RegisterAttrCallback):
Otherwise (if the IPS service-specific callback is not registered):