Quantcast
Viewing all articles
Browse latest Browse all 116964

Forum Post: RE: How to know if I am a router?

Dears,

You can refer to ZDO_STATE_CHANGE code segment in your zcl_xxx.c as the followings. You can get devStates_t from MSGpkt->hdr.status and use it to judge what type your device is.

        case ZDO_STATE_CHANGE:
          _xxx_NwkState = (devStates_t)(MSGpkt->hdr.status);
          if ( (_xxx_NwkState == DEV_ZB_COORD)
              || (_xxx_NwkState == DEV_ROUTER)
              || (_xxx_NwkState == DEV_END_DEVICE) )

.....


Viewing all articles
Browse latest Browse all 116964

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>