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.

Identify Query command

Hi there,

I would like, upon user interaction, that a device broadcasts an Identify Query command to search for devices that are currently identifying and afterwards it sends a Match_Desc_req just to those which replied to the Identify Query.

I am sending out an Identify Query command in this way:

static afAddrType_t dstAddr1;

dstAddr1.addrMode=AddrBroadcast;
dstAddr1.addr.shortAddr=NWK_BROADCAST_SHORTADDR;
zclGeneral_SendIdentifyQuery(SAMPLESW_ENDPOINT, &dstAddr1, false, 0);

I can actually track the packet with the sniffer:

However no devices replies. Why? am I missing something? What could be the reason of this behavior?

thanks

  • According to my experience, Identify command doesn't work like that. In general, your send identify command from your controller (usually it is a coordinator) to a specify device (not using broadcast). When the device receives identify command, it will flash its LED for 10 seconds for example. The purpose of identify command is to help installer easier to identify installed device.

  • uhmm... I think the behavior you mention is related to the identify_command which allow a device to enter of x seconds identifying mode, different from the Identify Query Command. I interpreted the possibility I mentioned looking at the following code:

    static ZStatus_t zclGeneral_ProcessInIdentity( zclIncoming_t *pInMsg,
    zclGeneral_AppCallbacks_t *pCBs )
    {
    if ( zcl_ServerCmd( pInMsg->hdr.fc.direction ) )
    {
    if ( pInMsg->hdr.commandID == COMMAND_IDENTIFY )
    {
    if ( pCBs->pfnIdentify )
    {
    zclIdentify_t cmd;

    cmd.srcAddr = &(pInMsg->msg->srcAddr);
    cmd.identifyTime = BUILD_UINT16( pInMsg->pData[0], pInMsg->pData[1] );

    pCBs->pfnIdentify( &cmd );
    }
    }
    else if ( pInMsg->hdr.commandID == COMMAND_IDENTIFY_QUERY )
    {
    uint16 identifyTime = 0;

    // Retrieve Identify Time
    zcl_ReadAttrData( pInMsg->msg->endPoint, pInMsg->msg->clusterId,
    ATTRID_IDENTIFY_TIME, (uint8 *)&identifyTime, NULL );

    // Is device identifying itself?
    if ( identifyTime > 0 )
    {
    zclGeneral_SendIdentifyQueryResponse( pInMsg->msg->endPoint, &pInMsg->msg->srcAddr,
    identifyTime, true, pInMsg->hdr.transSeqNum );
    return ( ZCL_STATUS_CMD_HAS_RSP );
    }
    }
    #ifdef ZCL_LIGHT_LINK_ENHANCE
    else if ( pInMsg->hdr.commandID == COMMAND_IDENTIFY_TRIGGER_EFFECT )
    {
    if ( pCBs->pfnIdentifyTriggerEffect )
    {
    zclIdentifyTriggerEffect_t cmd;

    cmd.srcAddr = &(pInMsg->msg->srcAddr);
    cmd.effectId = pInMsg->pData[0];
    cmd.effectVariant = pInMsg->pData[1];

    pCBs->pfnIdentifyTriggerEffect( &cmd );
    }
    }
    #endif //ZCL_LIGHT_LINK_ENHANCE
    else
    {
    return ( ZFailure ); // Error ignore the command
    }
    }
    else // Client Command
    {
    if ( pInMsg->hdr.commandID > COMMAND_IDENTIFY_QUERY_RSP )
    return ( ZFailure ); // Error ignore the command

    if ( pCBs->pfnIdentifyQueryRsp )
    {
    zclIdentifyQueryRsp_t rsp;

    rsp.srcAddr = &(pInMsg->msg->srcAddr);
    rsp.timeout = BUILD_UINT16( pInMsg->pData[0], pInMsg->pData[1] );

    pCBs->pfnIdentifyQueryRsp( &rsp );
    }
    }

    return ( ZSuccess );
    }
    #endif // ZCL_IDENTIFY

    the blue part shall indicate what you mentioned and the yellow part shall indicate what I wanted to implement. Am I correct?

  • It looks like you are correct.

  • I am wondering whether the problem is that there is no routine which actually calls the zclGeneral_ProcessInIdentity function to handle such a request.

  • Hi ,so can we figure up what is the deference  between identity  and identity query  as below ?

       identity   was  using in  Unicast , when someone want to talk with the special one!

      identity query was using in broadcast ,when someone want to talk with someone ,but it didn't  know who is right for talking

  • The Identify Query command on the Identify cluster only has an effect if the device is in Identify Mode. If it is, then the device will respond with an identify query response. 

  • so the device sending identity Query instead of identity  in EZMODE, because EZMODE request that those devices who want to talking should be have motion, if only one side have motion,EZMODE is failed,if two side have motion, EZMODE will be success。

    but do you know when will using identity command? could you give a application scene note?

  • After install several devices, you might be confused with which device is who. You can send identify command to each device which would blink LED for a while when it receives identify command.