I found demo JN-AN-1128 automatic report function can not be used, print log found
The eZCL_CreateLocalReport () function returns the error code 0X25.
But I did not find any problems in the input parameters.
This is my code:
for(i=0; i<ZLO_NUMBER_OF_REPORTS; i++)//
{ //asDefaultReports
asSavedReports[i] = asDefaultReports[i];
u16AttributeEnum = asSavedReports[i].sAttributeReportingConfigurationRecord.u16AttributeEnum;
u16ClusterId = asSavedReports[i].u16ClusterID;
psAttributeReportingConfigurationRecord = &(asSavedReports[i].sAttributeReportingConfigurationRecord);
DBG_vPrintf(TRACE_REPORT, "Cluster %04x Attribute %04x Min %d Max %d IntV %d Direct %d Change %d , data_type = %d \n",
u16ClusterId, //6
u16AttributeEnum,//0
psAttributeReportingConfigurationRecord->u16MinimumReportingInterval, //1
psAttributeReportingConfigurationRecord->u16MaximumReportingInterval, //5
psAttributeReportingConfigurationRecord->u16TimeoutPeriodField, //0
psAttributeReportingConfigurationRecord->u8DirectionIsReceived, //0
psAttributeReportingConfigurationRecord->uAttributeReportableChange.zint8ReportableChange,
psAttributeReportingConfigurationRecord->eAttributeDataType
);//0
zcl_status = eZCL_SetReportableFlag( u8Endpoint, u16ClusterId, TRUE, FALSE, u16AttributeEnum);
if(zcl_status != E_ZCL_SUCCESS)
{
DBG_vPrintf(TRACE_REPORT, "eZCL_SetReportableFlag() failed ,err_code = 0x%x \n",zcl_status);
}else
{
DBG_vPrintf(TRACE_REPORT, "eZCL_SetReportableFlag() success \n") ;
}
zcl_status = eZCL_CreateLocalReport( u8Endpoint, u16ClusterId, 0, TRUE, psAttributeReportingConfigurationRecord);
if(zcl_status != E_ZCL_SUCCESS)
{
DBG_vPrintf(TRACE_REPORT, "eZCL_CreateLocalReport() failed ,err_code = 0x%x \n",zcl_status);
}else
{
DBG_vPrintf(TRACE_REPORT, "eZCL_CreateLocalReport() success \n") ;
}
}
This is my LOG:
Cluster 0008 Attribute 0000 Min 1 Max 5 IntV 0 Direct 0 Change 10 , data_type = 32
eZCL_SetReportableFlag() success
eZCL_CreateLocalReport() failed ,err_code = 0x25
Who can help me solve this problem, thank you.