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 no Default Response

Other Parts Discussed in Thread: Z-STACK, CC2530EM, CC2538, CC2530

Hi,

Our test lab testing our End Device is requesting that we send a Default Response to the Identify Query command even if our device is no longer Identifying itself because the Identify Query Command in the frame control did not disable the default response.

The Zigbee Cluster Library specifies that we shall send a default response but if not currently identifying itself shall take no further action.

These two requirements are clash.

What is the correct action please?

It is not mandatory that we support this cluster however we would like to do so.

How can we change the firmware to give the response that our test lab requires?

Thanks

  • Hello Kiwi,

    The test lab is correct, there should be a default response if the default response bit is set to '0' in the command and the message is unicast. In this case we have a bug in the code, which has been corrected and will be part of the next release for the identify_query command. Can you please ask the customer to make the following change in file zcl_general.c  in the function zclGeneral_ProcessInIdentify() (marked in red below) to get the desired behaviour.

    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_QUERY )
          return ( ZFailure );   // Error ignore the command

        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
        {
          zclAttrRec_t attrRec;
          uint16 identifyTime = 0;

          // Retrieve Identify Time
          if ( zclFindAttrRec( pInMsg->msg->endPoint, pInMsg->msg->clusterId, ATTRID_IDENTIFY_TIME, &attrRec ) )
            zclReadAttrData( (uint8 *)&identifyTime, &attrRec, 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 );  //modify add this line

          }
         
         // return ( ZCL_STATUS_CMD_HAS_RSP );  //modify comment out this line
        }

     

    Regards,

  • Looks like this will work thanks,

  • How could i make my end device to send default response for identify query..
  • Hi Praba,
    Identify query response is done in zclGeneral_ProcessInIdentity() automatically. However, Identify query only works when device is under identify mode. You have to make sure your device is under identify mode when you send identify query.
  • Ya identify query response will be done automatically by the function zclGeneral_ProcessInIdentity() .But where i am strucking is how can i keep my end device in identity mode.To enable ezmode we are preesing button in co-ordinator likewise do we need press any buttons in node side
  • The duration of identify mode is defined by zclSampleTemperatureSensor_IdentifyTime. You can try to change its value.
  • Ya Yuki ,
    I have changed the time now working fine but what is the correct way to set the identify time can you please....

    From my understanding i got this
    static void zclSampleLight_EZModeCB( zlcEZMode_State_t state, zclEZMode_CBData_t *pData )
    {

    zclSampleLight_IdentifyTime = ( EZMODE_TIME / 1000 ); // convert to seconds
    zclSampleLight_ProcessIdentifyTimeChange();
    }
    }

    here the call back function zclSampleLight_EZModeCB setting the identify time .While doing registerEZmode we are caling zclSampleLight_EZModeCB.

    but for me while registering ezmode this call back function did not happened..what is the reason might be...or what is the way to set the identify time.
  • When you send identify command using API zclGeneral_SendIdentify(), you can specify identify time on the 3rd parameter.

    extern ZStatus_t zclGeneral_SendIdentify( uint8 srcEP, afAddrType_t *dstAddr,

                                             uint16 identifyTime, uint8 disableDefaultRsp, uint8 seqNum );

  • Ya i understood thanqqq...

    Now I am trying to control multiple nodes.

    Whenever a ZLL node comes to rejoin it is sending device announce request and whenever it lose the connection it is sending orphon notification.

    but my Zigbee HA node devices are not doing the above both.
    I need those two qualities in my 1.2.1 HA node also so what should i do..

  • Is you ZLL node configured to a router? A ZR won't have orphan status.
  • 1. Yes it is router...thanqq so if i make it as end device will it work.
    2.While rejoining ZLL node sending device announce likewise HA node why not sending any request.
  • 1. If you make it as ZED, it should work.
    2. I don't understand you question. Please describe in details.
  • if the node is joined with gateway as first time it will send device anounce then active end point req/resp ,simple descriptr req/resp,user descriptr req/resp everything will happen .
    once the node left from the network it will rejoin with gateway at the time ZLL nodes are sending device announce req and joining with gateway but HA nodes are without sending device announce joining with Gateway..
    but i want the HA sample light node to send device announce.
    How could i make it
  • You can send end node announcement from application when device receives ZDO_STATE_CHANGE event.
  • hi chen,

    While doing factory reset the node it is sending Leave request to gateway. I want to catch the leave request and have to process it.How can i handle the leave message from node.

  • You can check ZDO_ProcessMgmtLeaveReq().
  • Hi,

    I am sending Read attribute to node whenever it joined with coordinator(if i received simple descriptor response) .Issue is when a new node joined first time i am not able to send read attribute to the node.but when the node rejoined at the time read attribute going and response coming .


    Requirement: When a new node joined i want to get the node firmware version .

  • Do you use Ubiqua Packet Analyzer to check this?
  • Yes, I am using . By that only i confirmed that coordinator is not sending read attribute when the node joined first time..After 5sec delay from simple descriptor response i am trying to send read attribute to read the image version but it not at all sending to node.When the node left and rejoined back with coordinator at the time it is able to send and receive.
  • When you send read attribute, do you see device doing polling? The device must do polling to know there is read attribute command for it after polling.
  • Ya that is because of traffic now i make it 30sec delay now i am able to send and receive response.

    I have 2 more doubts

    1. In OTA client (which is downloading the image from OTA server ) i have primary and secondary image options. How could i differentiate both images from coordinator because i want to send secondary image if client current  running image is primary and vice versa.


    2.For OTA client i am keeping ZCL_CLUSTER_ID_OTA  as OutCluster_List.  Should i keep it in OutCluster_List or InCluster_List. If i keep the cluster  ZCL_CLUSTER_ID_OTA in   InCluster_List will it make any impact.

  • Hi Chen,

    Could you plz reply for the above post i am awaiting for your valid response.

  • 1. What do you mean primary and secondary image?
    2. For OTA client, you should put ZCL_CLUSTER_ID_OTA as OutCluster_List. No need to keep it in InCluster_List. If you put it in InCluster_List, it means this device can be an OTA server.
  • 1. Primary and Secondary image mean IMAGE_A and IMAGE_B as given in OTA upgrade document.
    2. In coordinator side i am storing the In_clusterList of the node to identify the node endpoint. So for now i am not able to get the cluster for OTA from node/End device. Is their any other way (other than reading Out_clusterList of node) to get the cluster ??
  • 1. You can refer to the replies at e2e.ti.com/.../376517.
    2. You can send active endpoint request from ZC and send simple descriptor request on active endpoints to know which endpoint supports OTA cluster.
  • Hi.,

    1. we have coordinator router and end device with 1.2.0 ZStack. End device able to form network through router when i keep the end device far away (20 meter )from coordinator and i am keeping the router in between. Parent Child process is fine.

    2. But when i upgrade the ZStack to 1.2.1 i am not able to get the proper parent child process.End device not joining to coordinator.

    can you give a solution.

  • Do you update all of ZC, ZR, and ZED to Z-Stack Home 1.2.1 or partially? By the way, do you erase flash when you do update?
  • yes , I am using the pure Z-Stack Home 1.2.1. ZC,ZR,ZED everything 1.2.1 Home profile.
  • Do you use Ubiqua Packet Analyzer to check this?
  • yes , I checked with sniffer. Router able to forward the end device request but end device not joining with coordinator .
  • I don't understand well. If router is able to forward the end device request, it means the device has joined coordinator network.
  • 1. I have a cordinator ,Router and End device each are placed with 10 meter distance.Router joined with gateway.
    2. As per the Zigbee standard if end device distance is more it should join With coordinator through router.But in my case (ZStack 1.2.1 Home)node is not joinnig.
    3. I checked in sniffer beacons only coming from end device.
  • Do you mean ZED not join either ZR or ZC? It keep sending beacon? Do you press SW2 on ZC or ZR to allow association?
  • Yes, I checked in sniffer ZC and ZR broadcasting Management_permit_join association request going but ZED not joining.
    If i brought the ZED near to the ZR it is directly joining with ZC. But not through ZR at any time.
  • It seems that you have range problem here. If you turn off ZC, does ZED joins ZR? By the way, what HW do you test this? SmartRF05EB+CC2530EM? or your own PCB?

  • No, In absence of ZC also ZED not joining with ZR that is the problem. We are using our PCB not evaluation module.
  • If you erase flash and test Zc/ZED only, does your ZED join ZC?
  • Hi Yikai,

    IN ZED I am using PIR ,Ambient,Flame sensor. For all the three sensors i want to be send report for the respective sensor control system.
    Control System present like below:
    1. For PIR respective control system is ZC
    2. For Ambient ZR
    3. For Flame one another ZR

    So to find the matching end point i am using Match_Descriptor request .In my ZED how can i diferentiate the response like this match descriptor response for this sensor and this is not for this sensor... how can i take the endpoint..

    other than match descriptr request any other way to get endpoint.
  • Basically, device can't tell the difference of match response. In general, we only have one CIE in Zigbee HA network and only it will response match request.
  • Yes yes Yikai device can't tell the difference, What is CIE???
    Can you suggest other solution for my above implementation.
  • CIE is Control and Indicating Equipment. From my point of view, I would suggest you using ZDP_BindReq() to binding the destination of your device.
  • Hi Yikai,

    1. In our power management module we need a RTC..but in CC2538 we dont have any RTC peripheral so is it possible to configure sleep timer as RTC.

     

  • You can refer to RTC APIs in OSAL_Clock.c.
  • hi Yikai,

    in the interrupt handler table i saw halsleeptimer_isr()...this one to put our system in sleep mode..but when this will get called..

    I want to go power down mode when external power is off (i am using battery source to run the sleep timer)..i ll receive interupt when power off..after that i have to go powerdown mode..plz help me how can i implement it
  • You can use osal_pwrmgr_device( PWRMGR_BATTERY ) and osal_pwrmgr_device(PWRMGR_ALWAYS_ON ) to switch between power mode. When your device uses external power, you can call osal_pwrmgr_device(PWRMGR_ALWAYS_ON ) and device would not go to sleep. When device uses battery, you can call osal_pwrmgr_device( PWRMGR_BATTERY ). Device with PWRMGR_BATTERY would go to sleep automatically when there is no task to process.
  • Hi Yikai,

    This is the code which i have tried..When i got interrupt on this gpio pin(geting interupt in falling edge), the isr powerdownIsr() got called..in that i am enabling powerdown mode and running sleep timer..i have to switch back to active mode when i receive interupt in same pin again(rainsing edge)...

    when i remove the power i am able to enter into the powerdownIsr() ISR and it is going to powerdown mode but i am unable to came back to active mode when power on..plz help me ..

            GPIOPinTypeGPIOInput( GPIO_D_BASE, GPIO_PIN_3);
        ioPinIntRegister( GPIO_D_BASE, GPIO_PIN_3, &powerdownIsr);
        IOCPadConfigSet( GPIO_D_BASE, GPIO_PIN_3, IOC_OVERRIDE_PUE);
          GPIOIntTypeSet( GPIO_D_BASE, GPIO_PIN_3, GPIO_FALLING_EDGE);
          GPIOPinIntEnable (GPIO_D_BASE, GPIO_PIN_3);

    void powerdownIsr(void){

     uint32 val=0;
          // Let system enter powermode 2 when going to deep sleep
        //

        SysCtrlPowerModeSet(SYS_CTRL_PM_1);

        //
        // Enable the Sleep Timer wakeup
        //
    //    GPIOIntWakeupEnable(GPIO_IWE_SM_TIMER);
    GPIOIntWakeupEnable(GPIO_IWE_PORT_D | GPIO_IWE_SM_TIMER);

        //
        // Enable sleep mode interrupt
        //
        IntEnable(INT_SMTIM);
        
        //
        // Set timer to 10000 above current value
        //
        val = SleepModeTimerCountGet();
      //  SleepModeTimerCompareSet(val + 10000);

        
    //    /*********************/
       GPIOPowIntTypeSet(GPIO_D_BASE, GPIO_PIN_3,GPIO_POW_RISING_EDGE);

        GPIOPowIntClear(GPIO_D_BASE, GPIO_PIN_3);

        GPIOPowIntEnable(GPIO_D_BASE, GPIO_PIN_3);
       /**********************/
       
        //
        // Display the timer value on the console.
        //
        UARTprintf("Timer val = %d\n", val);
        
        //
        // Wait for UART to be flushed
        //
        while(UARTBusy(UART0_BASE))
        {
        }
        
        //
        // Go to sleep
        //
        SysCtrlSleep();
        //
        // Display the timer value on the console.
        //    
        val = SleepModeTimerCountGet();
        UARTprintf("Timer val = %d (after wakeup)\n", val);
     
    }

  • Hi yikai ,,

    I am following this proceders which you mentioned..In sleep mode ,the device works in which mode PM0/PM1/PM2/PM3..Bcaz my board should work in power mode 2 (PM2)..How i can verify this.
  • Hi yikai,
    I am able to enter into sleep mode. In sleep mode I wants to use this sleep timer as RTC..

    1. Is it possible to use sleep timer as RTC.
    2. How can i use can you giude me..