API unique to DIS designs configured as a GATT Client role.
A letter 'c' is appended to the API name: Cy_BLE_DISC_
Functions | |
cy_en_ble_api_result_t | Cy_BLE_DISC_GetCharacteristicValue (cy_stc_ble_conn_handle_t connHandle, cy_en_ble_dis_char_index_t charIndex) |
This function is used to read the characteristic Value from a server which is identified by charIndex. More... | |
cy_en_ble_api_result_t Cy_BLE_DISC_GetCharacteristicValue | ( | cy_stc_ble_conn_handle_t | connHandle, |
cy_en_ble_dis_char_index_t | charIndex | ||
) |
This function is used to read the characteristic Value from a server which is identified by charIndex.
The Read Response returns the characteristic value in the Attribute Value parameter. The Read Response only contains the characteristic value that is less than or equal to (MTU - 1) octets in length. If the characteristic value is greater than (MTU - 1) octets in length, a Read Long Characteristic Value procedure may be used if the rest of the characteristic value is required.
This function call can result in generation of the following events based on the response from the server device.
connHandle | The connection handle. |
charIndex | The index of a service characteristic of type cy_en_ble_dis_char_index_t. |
Error Codes | Description |
---|---|
CY_BLE_SUCCESS | The Read 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_INVALID_STATE | Connection with the server is not established. |
CY_BLE_ERROR_MEMORY_ALLOCATION_FAILED | Memory allocation failed. |
CY_BLE_ERROR_GATT_DB_INVALID_ATTR_HANDLE | The peer device doesn't have the particular characteristic. |