Cypress PSoC 6 Bluetooth Low Energy Middleware Library 3.60

General Description

API unique to IAS designs configured as a GATT Client role.

A letter 'c' is appended to the API name: Cy_BLE_IASC_

Functions

cy_en_ble_api_result_t Cy_BLE_IASC_SetCharacteristicValue (cy_stc_ble_conn_handle_t connHandle, cy_en_ble_ias_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...
 

Function Documentation

◆ Cy_BLE_IASC_SetCharacteristicValue()

cy_en_ble_api_result_t Cy_BLE_IASC_SetCharacteristicValue ( cy_stc_ble_conn_handle_t  connHandle,
cy_en_ble_ias_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.

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_IASS_WRITE_CHAR_CMD event is generated.

Parameters
connHandleThe connection handle.
charIndexThe index of the Alert Level service characteristic.
attrSizeThe size of the Alert Level characteristic value attribute.
attrValueThe pointer to the Alert Level 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 parameter failed.
CY_BLE_ERROR_INVALID_OPERATION Operation is invalid for this characteristic.
CY_BLE_ERROR_GATT_DB_INVALID_ATTR_HANDLE The peer device doesn't have the particular characteristic.
CY_BLE_ERROR_INVALID_STATE Connection with the server is not established.
CY_BLE_ERROR_MEMORY_ALLOCATION_FAILED Memory allocation failed.