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.

Using cc2530 as znp and sensor, sensor cannot join the network

Other Parts Discussed in Thread: CC2530, Z-STACK

I am using cc2530 as znp and sensor.

The zigbee stack is ZStack-CC2530-2.5.1a,

and my sensor project is based on Samples\simpleApp using simpleAPI,

as while as my znp project is based on znp project.

Normally, 20 more sensors can join the zigbee network.

Neither software nor hardware is changed, but now I found that only 5 or 6 zigbee sensors  can join the network.

Once a new sensor can not join the network, no sensor can join the network, even the already joined sensor(first leave network, then try to rejoin the network).

This situation can only be solved by reprograming the znp cc2530.

Because the software and hardware used to work. So I think maybe there is some special case that I don't notice.

Is there any ideas to solve this problem?

Thank you all.

  • It sounds that the association table is full in your case. If you want to avoid this, you have to send correct leave request to device to make them removed from association table.
  • Thanks for your quick reply.
    Where is the association table is stored in cc2530? Each I reprogram the znp cc2530, is the association table erased too?
    What is the correct leave request? When the sensors are leaving the network, I use NLME_LeaveReq, is this right?
  • Association table is stored on internal flash of CC2530 and would be erased if your reprogram CC2530. You can use ZDP_MgmtLeaveReq to send leave request to device that you want to remove from Zigbee network.
  • Here is the problem, what is the max count in the association table?
    I don't think the max count of association table in znp is only 6.
    The situation is each time I reprogram the znp cc2530, no more than six sensors can be added to the table.
    Is there any suggestions?
    Thanks very much.
  • The size of association table is defined by NWK_MAX_DEVICE_LIST which is 20 by default in Z-Stack 2.5.1a. It is not only 6 but if you don't use leave request to ask unwanted device to leave Zigbee network, some devices will always be kept on association list. When there is no slot available in association table, new device can not join anymore. So, I suggest you try my solution.
  • OK, i will try your solution.
    The result will be given next week.
    Thanks.
  • One more thing,
    what is the max count of sensors with a single znp cc2530?

    I designed a znp with 50 sensors in my project. If a znp cannot accept 50 sensors, I have to change my plan.
    Thank you very much.
  • The default association table in Z-Stack 2.5.1a is 20 so I suppose pre-build ZNP image can accept 20 devices at most. If you need upto 50, you have to revise NWK_MAX_DEVICE_LIST to 50 and build ZNP hex file by yourself.
  • I changed NWK_MAX_DEVICE_LIST to 50, error occurred while the compiler linking.

    It seems that memory is not enough to hold 50 sensors in association table.

    The error is:

    Linking

    Error[e104]: Failed to fit all segments into specified ranges. Problem discovered in segment XDATA_N. Unable to place 2 blocks(s) (0xad4 bytes total) in 0xa91 bytes of memory. The problem occurred while processing the segment placement command "-P(XDATA)XDATA_N=_XDATA_START-XDATA_END", where at the moment of placement the available memory ranges were "XDATA:146f-1eff"

    Error while running Linker.

    Set NWK_MAX_DEVICE_LIST to 20, then compilation succeed.

    Is this mean the znp can only support maximum of 20 sensors?

    Or can I change linkscript to make znp support 50 sensors? 

  • Yes, I can only set NWK_MAX_DEVICE_LIST upto 22. If you need to support 50 devices, I think you have to use ZRs in your system.
  • I finally change znp NWK_MAX_DEVICE_LIST to 20 and sensor NWK_MAX_DEVICE_LIST to 10.
    I think this will work for my project.
    Thanks very much, chen.
  • You are welcome and it's good to know it will work for you.