Quantcast
Channel: Wireless Connectivity
Viewing all articles
Browse latest Browse all 116964

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

$
0
0

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