This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

report attribute failed issue



hi all,

have anyone give me a Suggest for it ?

sometime it don't send out when i report attribute .

i create a Period timer(5s) to send report ,every timeout handle it increase variable(ButCD) and caller send report(Switch_sendToggle)

it seem it do't update attribute information immediately.

static void Switch_sendToggle(void)
{
    afAddrType_t dstAddr;
    zclReportCmd_t  *pReportCmd;

    // Build and send a ZCL temperature reading to the matched device
    pReportCmd = ICall_malloc(sizeof(zclReportCmd_t) + sizeof(zclReport_t));
    if(pReportCmd != NULL)
    {
        dstAddr.addrMode = (afAddrMode_t)zswDstAddr.addrMode;
        dstAddr.addr.shortAddr = zswDstAddr.addr.shortAddr;
        dstAddr.endPoint = zswDstAddr.endpoint;
        dstAddr.panId = zswDstAddr.panID;
        pReportCmd->numAttr = 1;
        pReportCmd->attrList[0].attrID = ATTRID_BUTTON_CD;
        pReportCmd->attrList[0].dataType = ZCL_DATATYPE_UINT8;
        pReportCmd->attrList[0].attrData = (void *) (&ButCD);    
        // Call ZCL function to send the report
        zcl_SendReportCmd(SWITCH_EP, &dstAddr,
                ZCL_CLUSTER_ID_AMIGO, pReportCmd,
                ZCL_FRAME_SERVER_CLIENT_DIR, true, swTransID++);

        ICall_free(pReportCmd);        
    }
}