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

What should I change to make the ZigBee multisensor end-device example a ZigBee multisensor router?

Hi everyone, 

To give a first introduction, I have been working with this development kit for a while now. I'm trying to develop a Zigbee device and I'm very close to finishing it. 

So, my intro point was the multisensor freertos end device example. After validating the concept, I'm now trying to change it to be a router device instead of being only an end device. It would be great to benefit from the extending capabilities of a router while still measuring some sensors. Since my device will be directly powered from the plug there is no need for battery saving. 

My question is, what should I change? I did the following already:

1. Replaced:

zb_set_ed_timeout(ED_AGING_TIMEOUT_64MIN);
zb_set_keepalive_timeout(ZB_MILLISECONDS_TO_BEACON_INTERVAL(3000));
zb_set_rx_on_when_idle(ZB_FALSE);
 

with:

zb_set_network_router_role(IEEE_CHANNEL_MASK);
zb_set_max_children(10);
zigbee_erase_persistent_storage(ERASE_PERSISTENT_CONFIG);
zb_set_keepalive_timeout(ZB_MILLISECONDS_TO_BEACON_INTERVAL(3000));

2. Replaced:

ZB_ED_ROLE from the MAKEFILE with ZB_ROUTER_ROLE.
Is that enough? What should I do next? Will this behavior like a router now? With the extending capabilities?
Thank you in advance,
Fernando Fontes
Parents
  • Hi,

    The changes you have made should be enough, so it should behave like a router now.

    The device role is set with the functions zb_set_<role>_role(), so calling the function zb_set_network_router_role() will initiate the device as a router. 

    The flag in the Makefile, DZB_ED_ROLE, is not necessary. It is not used for any of the router examples, so you can also remove it from the Makefile, both the C flag and the assembler flag.

    If you still have the following line in your main.c file, you should also remove that:

    #if !defined ZB_ED_ROLE

    Best regards,

    Marte

Reply
  • Hi,

    The changes you have made should be enough, so it should behave like a router now.

    The device role is set with the functions zb_set_<role>_role(), so calling the function zb_set_network_router_role() will initiate the device as a router. 

    The flag in the Makefile, DZB_ED_ROLE, is not necessary. It is not used for any of the router examples, so you can also remove it from the Makefile, both the C flag and the assembler flag.

    If you still have the following line in your main.c file, you should also remove that:

    #if !defined ZB_ED_ROLE

    Best regards,

    Marte

Children
Related