Good morning, i'm trying to make my custom CC2652P devices (based on zr_genericapp and zed_genericapp) to report a presentValue attribute of the AnalogInput cluster of a Simple Sensor endpoint, which lies next to other Smart plug endpoints inside the device.
My devices are connected to a Zigbee2Mqtt instance, in which i have developed the correct custom converter to support onOff and Metering cluster attributes (not using with report, just polled and actuated).
From the Z2M frontend, if i send a configure report message with a non-zero minimum report interval as in figure, the report works perfectly.

But this is not the ideal scenario for my application, in which i'd like to report that attribute only when changed.
Some times ago, Ryan told me that using setting min and max intervals to NOPERIODIC and NOLIMIT as in figure (both zero as i see in bdb_interface.h) will enable the reporting only when triggered by Zstackapi_bdbRepChangedAttrValueReq().

So i created a periodic routine in my zcl_genericapp.c task which calls the following function emulating a change every 5 seconds, updating the presentValue attribute with a new ''rfid'' value (i will use that attribute to send to my server a new rfid tag, yes)
void zclGenericApp_updateRFIDPresentValueAttribute(uint32_t rfid)
{
rfid_presentValue = rfid;
#ifdef BDB_REPORTING
zstack_bdbRepChangedAttrValueReq_t Req;
Req.attrID = ATTRID_IOV_BASIC_PRESENT_VALUE;
Req.cluster = ZCL_CLUSTER_ID_GENERAL_ANALOG_INPUT_BASIC;
Req.endpoint = RFID_ENDPOINT;
Zstackapi_bdbRepChangedAttrValueReq(appServiceTaskId, &Req);
#endif
}
The problem is that the Zstackapi_bdbRepChangedAttrValueReq freezes my device.
This only happens after i sent a configure report message from the Z2M frontend, if i never send it, leaving the reporting disabled, the function just pass without report anything but not freezing.
I have tried to debug the function, and for now i can just say that it get stuck in "msgStatus = OsalPort_msgSend( stackServiceTaskId, (uint8_t*) pMsg );"
at row 140 of zstackapi.c.
How could i proceed?
Thank you sincerely for any help, i will really appreciate it.
Regards and have nice holidays
Roberto