Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

CC2530: Reporting problem for Saturation

$
0
0

Part Number:CC2530

Hello,

I have used the following reporting command to send Report to ZNP:

static void zclReport_Hue_Command (uint8 *device_hue_state)
{
  afAddrType_t dstaddr;
  dstaddr.addr.shortAddr = zclColor_DstAddr.addr.shortAddr;
  dstaddr.addrMode = afAddr16Bit;
  dstaddr.endPoint =  zclColor_DstAddr.endPoint;
  dstaddr.panId = zclColor_DstAddr.panId;

  zclReportCmd_t rptcmd;
  rptcmd.numAttr = 1;
  rptcmd.attrList[0].attrID = ATTRID_LIGHTING_COLOR_CONTROL_CURRENT_HUE;
  rptcmd.attrList[0].dataType = ZCL_DATATYPE_UINT8;
  rptcmd.attrList[0].attrData = device_hue_state;

  zcl_SendReportCmd(ENDPOINT, &dstaddr ,
                    ZCL_CLUSTER_ID_LIGHTING_COLOR_CONTROL, &rptcmd,
                    ZCL_FRAME_SERVER_CLIENT_DIR, 1, 0 );
}

I have used this one sending for Hue and the following one for sending Saturation

static void zclReport_Sat_Command (uint8 *device_sat_state)
{
  afAddrType_t dstaddr;
  dstaddr.addr.shortAddr = zclColor_DstAddr.addr.shortAddr;
  dstaddr.addrMode = afAddr16Bit;
  dstaddr.endPoint =  zclColor_DstAddr.endPoint;
  dstaddr.panId = zclColor_DstAddr.panId;

  zclReportCmd_t rptcmd;
  rptcmd.numAttr = 1;
  rptcmd.attrList[0].attrID = ATTRID_LIGHTING_COLOR_CONTROL_CURRENT_SATURATION;
  rptcmd.attrList[0].dataType = ZCL_DATATYPE_UINT8;
  rptcmd.attrList[0].attrData = device_sat_state;

  zcl_SendReportCmd(ENDPOINT, &dstaddr ,
                    ZCL_CLUSTER_ID_LIGHTING_COLOR_CONTROL, &rptcmd,
                    ZCL_FRAME_SERVER_CLIENT_DIR, 1, 0 );
}

Now here I can only send report on Hue, for Saturation I cant see any report being sent, what could be the problem here?


Viewing all articles
Browse latest Browse all 262198