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.

DevState enums difference in sources (zstack.h and zd_app.h)

I found that DevState enums in zstack.h and zd_app.h are different and devStates_t doesn't have NWK_BACKOFF.

Why? It looks like a bug and some device states may be handled incorrectly.

    

  • Hi Alex,

    Thank you for reporting this.  I further investigated zstack.h zstack_DevState and found that they are only used for the zcl_sampleapps_ui so at worst the only bugs that will appear are incorrect UI line reports for the device state during rejoins (backoff state is deprecated).  I will report this to the Software Development Team.

    Regards,
    Ryan

  • ok, thanks, got it;

    I also have another question, maybe you can clarify this.

    Sometimes our ZR have devState 6 that belongs to ZED

        /** Started as device after authentication */
        zstack_DevState_DEV_END_DEVICE = 6,

    but our device is ZR, it should be 7.

    I found in sources that sometimes ZR may have device status DEV_END_DEVICE

    So,it even directly says that ZR may stay to be ZED

    And during rejoining we see that it is supposed that ZR may be in this condition where "ZED device state" may be set for ZR

    Could you explain exactly in what cases ZR may turn into ZED (from devState point of view) and what negative consequences may be?

  • DEV_END_DEVICE is the last state used before NLME_StartRouterRequest, which if successful (nwkStatus == ZSuccess inside ZDO_ROUTER_START event) will change the devState to DEV_ROUTER.  Staying as a ZED indicates issues with starting routing functionality successfully.

    In what instances is your ZR reporting the zstack_DevState_DEV_END_DEVICE state?  Is it actively joined to and communicating within a Zigbee network?

    Regards,
    Ryan