Cypress PSoC 6 Bluetooth Low Energy Middleware Library 3.60

General Description

API unique to PASS designs configured as a GATT Server role.

A letter 's' is appended to the API name: Cy_BLE_PASSS_

Functions

cy_en_ble_api_result_t Cy_BLE_PASSS_SetCharacteristicValue (cy_en_ble_pass_char_index_t charIndex, uint8_t attrSize, uint8_t *attrValue)
 Sets the value of a characteristic which is identified by charIndex. More...
 
cy_en_ble_api_result_t Cy_BLE_PASSS_GetCharacteristicValue (cy_en_ble_pass_char_index_t charIndex, uint8_t attrSize, uint8_t *attrValue)
 Gets the value of a characteristic which is identified by charIndex. More...
 
cy_en_ble_api_result_t Cy_BLE_PASSS_GetCharacteristicDescriptor (cy_stc_ble_conn_handle_t connHandle, cy_en_ble_pass_char_index_t charIndex, cy_en_ble_pass_descr_index_t descrIndex, uint8_t attrSize, uint8_t *attrValue)
 Gets a characteristic descriptor of a specified characteristic of the service. More...
 
cy_en_ble_api_result_t Cy_BLE_PASSS_SendNotification (cy_stc_ble_conn_handle_t connHandle, cy_en_ble_pass_char_index_t charIndex, uint8_t attrSize, uint8_t *attrValue)
 Sends a notification of the specified by the charIndex characteristic value. More...
 

Function Documentation

◆ Cy_BLE_PASSS_SetCharacteristicValue()

cy_en_ble_api_result_t Cy_BLE_PASSS_SetCharacteristicValue ( cy_en_ble_pass_char_index_t  charIndex,
uint8_t  attrSize,
uint8_t *  attrValue 
)

Sets the value of a characteristic which is identified by charIndex.

Parameters
charIndexthe index of a service characteristic.
attrSizethe size of the characteristic value attribute.
attrValuethe pointer to the characteristic value data that should be stored to the GATT database.
Returns
A return value of type cy_en_ble_api_result_t.
Error Codes Description
CY_BLE_SUCCESS The request was handled successfully.
CY_BLE_ERROR_INVALID_PARAMETER Validation of the input parameter failed.
CY_BLE_ERROR_GATT_DB_INVALID_ATTR_HANDLE Optional characteristic is absent.

◆ Cy_BLE_PASSS_GetCharacteristicValue()

cy_en_ble_api_result_t Cy_BLE_PASSS_GetCharacteristicValue ( cy_en_ble_pass_char_index_t  charIndex,
uint8_t  attrSize,
uint8_t *  attrValue 
)

Gets the value of a characteristic which is identified by charIndex.

Parameters
charIndexthe index of a service characteristic.
attrSizethe size of the characteristic value attribute.
attrValueThe pointer to the location where characteristic value data should be stored.
Returns
A return value of type cy_en_ble_api_result_t.
Error Codes Description
CY_BLE_SUCCESS The request was handled successfully.
CY_BLE_ERROR_INVALID_PARAMETER Validation of the input parameter failed.
CY_BLE_ERROR_GATT_DB_INVALID_ATTR_HANDLE Optional characteristic is absent.

◆ Cy_BLE_PASSS_GetCharacteristicDescriptor()

cy_en_ble_api_result_t Cy_BLE_PASSS_GetCharacteristicDescriptor ( cy_stc_ble_conn_handle_t  connHandle,
cy_en_ble_pass_char_index_t  charIndex,
cy_en_ble_pass_descr_index_t  descrIndex,
uint8_t  attrSize,
uint8_t *  attrValue 
)

Gets a characteristic descriptor of a specified characteristic of the service.

Parameters
connHandleThe connection handle
charIndexThe index of the characteristic.
descrIndexThe index of the descriptor.
attrSizeThe size of the descriptor value attribute.
attrValueThe pointer to the descriptor value data that should be stored to the GATT database.
Returns
A return value of type cy_en_ble_api_result_t.
Error Codes Description
CY_BLE_SUCCESS The request was handled successfully.
CY_BLE_ERROR_INVALID_PARAMETER Validation of the input parameter failed.
CY_BLE_ERROR_GATT_DB_INVALID_ATTR_HANDLE Optional characteristic is absent.

◆ Cy_BLE_PASSS_SendNotification()

cy_en_ble_api_result_t Cy_BLE_PASSS_SendNotification ( cy_stc_ble_conn_handle_t  connHandle,
cy_en_ble_pass_char_index_t  charIndex,
uint8_t  attrSize,
uint8_t *  attrValue 
)

Sends a notification of the specified by the charIndex characteristic value.

On enabling notification successfully for a service characteristic it sends out a 'Handle Value Notification' which results in CY_BLE_EVT_PASSC_NOTIFICATION event at the GATT Client's end.

Parameters
connHandleThe connection handle which consists of the device ID and ATT connection ID.
charIndexThe index of a service characteristic.
attrSizeThe size of the characteristic value attribute.
attrValueThe pointer to the characteristic value data that should be sent to the client device.
Returns
A return value of type cy_en_ble_api_result_t.
Error Codes Description
CY_BLE_SUCCESS The request was handled successfully.
CY_BLE_ERROR_INVALID_PARAMETER Validation of the input parameter failed.
CY_BLE_ERROR_GATT_DB_INVALID_ATTR_HANDLE Optional characteristic is absent.
CY_BLE_ERROR_INVALID_OPERATION This operation is not permitted
CY_BLE_ERROR_INVALID_STATE Connection with the client is not established
CY_BLE_ERROR_MEMORY_ALLOCATION_FAILED Memory allocation failed.
CY_BLE_ERROR_NTF_DISABLED Notification is not enabled by the client