This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Question about zb_set_max_children function

Hi,

I'm developing a router Zigbee device starting from light bulb example.

In the example the function zb_set_max_children is called passing 10 as parameter.

About this funcion the documentation says only: Set the maximum number of connected devices. Used for coordinators and routers.

Can you explain better this parameter? In that example, what happen if the 11th wants to connect? It's rejected or like a FIFO the first children is dropped?

In my final network I will have about 100 devices, what is a raccomanded value for this parameter?

BR,

Maurizio

  • Hi Maurizio,

    If the maximum number of children is set to 10 for a router, what will happen after the 10th device is attached is that the router will mark a special bit inside beacons saying that it cannot handle more children, so no other children will be able to attach.

    In my final network I will have about 100 devices, what is a raccomanded value for this parameter?

    This will depend on the topology of your network and how many ZED and ZR devices you have.  Keep in mind that the amount of children will affect the memory/resource usage for a router, e.g you have to handle more data request, remember them, etc.

    Best regards,

    Marjeris

  • Hi Marjeris,

    This will depend on the topology of your network and how many ZED and ZR devices you have.

    in my network there's few ZED devices, they are almost all ZR, but only some of this reach the Coordinator directly.

    To clarify, can you confirm me that a ZR can be a children of  another ZR or only ZED can be a childer of ZR?

    Now with the parameter set to 10 we test the system with about 30 device (all ZR). The network is unstable, the devices are never all connected at the same time, at most 23-24, but they are not always the same, they change randomly.

    Best regards,

    Maurizio

  • Hi Maurizio,

    Zigbee routers can be both parent and children (but that does not mean that it will poll its parent for data like an end device). zb_set_max_children will set how many children (ZED and ZR) a router or coordinator can have.

    The maximum network depth for a tree routing is set to 5 in ZBOSS, so if the max number of children for each of your ZR/ZC is set to 10 it should be sufficient for your network, so I don't think that the value of zb_set_max_children is the problem.

    Can you explain a bit more about how the network is unstable? Have you monitored the network with a sniffer to see what happens when a node abandon the network for example?

    Best regards,

    Marjeris

  • Hi Marjeris,
    sorry for late answer, I've done an nrf802154 sniffer to monitor my network. As I described below I've a large network and is very difficult to sniff. Nodes not seems to abandon the network, but every time I power up my node, it sends three permit join request. Debugging the code I saw that these requests happens after zboss_start() call. This cause some nodes to change their Short ID and then is unreachable at the old one.

    This is a screenshot of capture at the moment of node power on.

    There is a way to avoid permit join requests at startup?

    Best regards

    Maurizio

  • Hi Maurizio,

    Sorry for the late reply, unfortunately I have been out of office last week so I just look at your case again today. Are you still struggling with this issue?

    I have asked our Zigbee developers to doublecheck if zboss_start() also calls zb_zdo_mgmt_permit_joining_req(), and I am waiting for their answers.

    From the documentation I found that the typical device start after calling zboss_stack() will look like: init, load some parameters from nvram and proceed with startup. Startup means either formation (for ZC), rejoin or discovery/association join.

    Have you check if zigbee_erase_persistent_storage if set to ZB_FALSE in the nodes that you are powering on and off? Can you also check that you are not calling zb_zdo_mgmt_permit_joining_req() anywhere else in your code?

    BR,

    Marjeris

Related