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.

router capacity and device capacity bits (RtrCap, DevCap)

Other Parts Discussed in Thread: CC2530, Z-STACK

Hi,

I'm using Z-Stack version 2.3.1 on TI CC2530.

I want to ask some questions about router capacity and device capacity bits in the beacon payload. As I’ve seen so far, the zigbee coordinator won’t allow any additional routers or enddevices to join if RtrCap and DevCap bits are both 0 even if the Assoc bit is 1 in the superframe specification. So, it is dangerous to judge if the coordinator is now allowing others to join by looking at Assoc bit only.

1. How can I get the current settings of router capacity and device capacity of the local zigbee node (zigbee coordinator).

2. When router capacity and device capacity bits become 0?

Actually, when the coordinator has already associated maximum devices (=NWK_MAX_DEVICE_LIST+1) , router capacity and device capacity bits become 0. That is expected behavior. But I've seen that router capacity and device capacity bits are both 0 even if the num of associated devices doesn’t reach to maximum. I’m sure there was enough space to associate by checking ...

SYS_OSAL_NV_READ( ZCD_NV_DEVICE_LIST and ZCD_NV_ADDRMGR )

Why? 

***

ZMAC.h

typedef struct

{

  byte protocolID;

  byte stackProfile;    // 4 bit in native

  byte protocolVersion; // 4 bit in native

  byte reserved;        // 2 bit in native

  byte routerCapacity;  // 1 bit in native <=

  byte deviceDepth;     // 4 bit in native

  byte deviceCapacity;  // 1 bit in native <=

  byte extendedPANID[Z_EXTADDR_LEN];

  byte txOffset[3];

  byte updateId;

} beaconPayload_t;

***

Thanks

Yusuke,

  • Hi,

    I compared two HEX files read from the local zigbee coordinator
    -- one is when in trouble and the other is when in no trouble.

    I've found that ZCD_NV_ADDRMGR param is different.

    When in trouble, "user" field of AddrMgrEntry_t become 0x7f, that is 0x00 when in no trouble.
    I guess that makes the local zigbee coordinator judge there is no address space to join.
    Please check.

    // entry data
    typedef struct
    {
      uint8  user; <== ?
      uint16 nwkAddr;
      uint8  extAddr[Z_EXTADDR_LEN];
      uint16 index;
    } AddrMgrEntry_t;


    ** NWK_MAX_DEVICE_LIST=29 **

    ---------------
    WHEN IN TROUBLE
    ---------------

    addr=3d17c, id=0x0023, len=0x0155, chk=0x383b, stat=0xffff
    0x01,
      0xf4,0x4a,
      0x70,0x3f,0xa6,0x01,0x00,0x4b,0x12,0x00,
    0x01,
      0x32,0xf3,
      0xa2,0x3f,0xa6,0x01,0x00,0x4b,0x12,0x00,
    0x7f, => should be zero
      0xff,0xff,
      0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
    0x7f, => should be zero
      0xff,0xff,
      0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
    ...<omitted>...
    0x7f, => should be zero
      0xff,0xff,
      0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,

    ------------------
    WHEN IN NO TROUBLE
    ------------------

    addr=3f2b8, id=0x0023, len=0x0155, chk=0x184c, stat=0xffff
    0x01,
      0xd5,0xd2,
      0x65,0xbd,0xc6,0x01,0x00,0x4b,0x12,0x00,
    0x01,
      0x2a,0xf7,
      0x11,0xc1,0xc6,0x01,0x00,0x4b,0x12,0x00,
    0x01,
      0x8a,0x7e,
      0xf6,0xc0,0xc6,0x01,0x00,0x4b,0x12,0x00,
    0x01,
      0x39,0xf0,
      0x0f,0xbc,0xc6,0x01,0x00,0x4b,0x12,0x00,
    0x01,
      0xa2,0xe2,
      0xe8,0xc0,0xc6,0x01,0x00,0x4b,0x12,0x00,
    0x00,
      0xff,0xff,
      0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
    ...<omitted>...
    0x00,
      0xff,0xff,
      0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,

    ***

    Thanks,

  • hi,

    Now I meet the problem,

    have you solve the problem and how can I make the Rtr_Cap and Dev.Cap turn to 1.

    Thanks very much!

  • hi chen,

    unfortunately, i haven't solved this yet.

    (Still, i want to know this solution!)

     

  • hi ,YUSUKE YAMADA

    thank you all the same! 

  • I meet the problem too!


    a router device was sending beacon request all the time but could not join in nwk。 and I am sure the coordinator's AssociatedDevList[] table is empty。

    It drives me crazy!!can someone help me?
  • Have anyone solve the problem? I meet the same problem now and it's really terrible.

  • Hello,

    We have faced the same problem. We are using Ζ-stack Home Automation 1.2 with    

    NWK_MAX_DEVICE_LIST   =  20 .

    However, after the first join the Router Capacity flag in the beacon Response is set to "NO" .  As a result , we couldn't  join any other device in that Coordinator. There is only one Router in the Associated device list.

    How is it possible the Coordinator to be considered full with only one router in its list?

    See attached the trace log from my NWK.

    4188.Beacon_Problem.rar

  • Hi, YUSUKE YAMADA

    Is this problem solved? I meet the same problem too.

    I try to delete the AssociatedDevList table, but it do not work.

    if you have some suggest, please tell me.  thanks.

  • Which Z-Stack version do you use?