I'm trying to send out notifications on DS_STREAM_UUID based on a clock. However, I'm ending up in ICall_abort() with nothing obvious in ROV. My clock callback is simple, but it doesn't seem to like to set the parameter here:
void ProjectZero_notifyHandler(UArg arg) {
uint8_t initVal[40] = { 0 };
DataService_SetParameter(DS_STREAM_ID, DS_STREAM_LEN, initVal); // <- this is the issue
}
It initialized fine:
Util_constructClock(&clkBTENotify, ProjectZero_notifyHandler, 1000, 1000, false, 0x00);
And I'm just turning it on and off based on whether notifications are enabled/disabled.
switch (configValue) {
case GATT_CFG_NO_OPERATION:
configValString = "Noti/Ind disabled";
if (Util_isActive(&clkBTENotify) == true) {
Util_stopClock(&clkBTENotify);
}
break;
case GATT_CLIENT_CFG_NOTIFY:
configValString = "Notifications enabled";
if (Util_isActive(&clkBTENotify) == false) {
Util_startClock(&clkBTENotify);
}
break;
case GATT_CLIENT_CFG_INDICATE:
configValString = "Indications enabled";
break;
default:
configValString = "Unsupported operation";
}
*Using notifications works* if I just place DataService_SetParameter() in ProjectZero_DataService_ValueChangeHandler() and write to it manually (i.e. it sends me back the value I wrote). My understanding was that I could use notifications to 'push' data to my phone, instead of the phone polling the peripheral for data?