I'm trying to use ble indication but couldn't have any example regarding CyBle_GattsIndication yet.
I started from the BLE CAPSENSE SLIDER LED example project;
1. enable 'indicate' of profile
2. set notification(the second CCCD value) 'true'
3. replace CyBle_GattsNotification with CyBle_GattsIndication
After these modification, I could get only the first 'Characteristic Value Indication' event, and then the following indication events are not received.
Does anybody try CyBle_GattsIndication and show me how to implement it?
I have just enabled indication on my Pioneer Kit. Below is the function that does the thing.
CYBLE_TEMPALARM_CHAR_HANDLE is a ble handle defined in the BLE_custom.h file (since in my case it is the custom defined characteristics TempAlarm with Indicate as a property and uint8 as a Type, with length=1). TEMP_CHAR_DATA_LEN is 1.
I have connected to device via CyBLE dongle and CySmart application and managed to receive the indication... You just need to call the given function with the value of AlarmTemp, in my case temperature below 10 degrees...
void IndicateTempAlarm(uint8 AlarmTemp)
/* 'BattHandle' stores BattSense indication data parameters */
/* Update indication handle with ... data*/
TempAlarmIndHandle.attrHandle = CYBLE_TEMPALARM_CHAR_HANDLE;
TempAlarmIndHandle.value.val = &AlarmTemp;
TempAlarmIndHandle.value.len = TEMP_CHAR_DATA_LEN;
/* Send indication. */