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

Setup zigbee mesh network

Dear DevZone Team,

 

I am an absolute beginner in the field of mesh networking and hope you could help me getting started. Please bear with me.

I have a bunch of sensors (200-300) which supplies the nrf52840 with temperature and voltage levels over spi using the nrf52840-DK. I use the supplied spi driver of the SDK 15.2 for this.

I would like to establish a mesh network of theses sensors so that the coordinator (in Zigbee terms) can poll each sensor and receive the values in a timely manner.

My first approach was to use the Zigbee library and the light switch example. I got the coordinator running but struggle to establish a list of all devices in the network so that I can poll each one afterwards. I used the signal ZB_ZDO_SIGNAL_DEVICE_ANNCE in the zboss_signal_handler() to get the device ID that just joined the network (I use the zigbee cli example as routers for testing) but all devices report the same address.

Setting up the routers, which should do the sensing, causes also difficulties. My understanding is that I need to set up the zb_zcl_el_measurement and zb_zcl_temp_measurement cluster libraries, am I right? With all the defines and attributes setting these up is quite difficult for me. If you can point me to some detailed documentation or examples I would be very thankful.

As this is a proprietary application and we do not need to be compatible with other Zigbee devices I wonder if there is a simpler approach to send the data over the mesh network. Maybe Thread or ESB would be an alternative?

The goal is to establish a mesh network, poll each router for voltage and temperature from a gateway, which sends the data to a terminal via uart.

Which protocol would you advise?

Thank you very much in advance for your help.

Best regards

Marco

 

Parents
  • Hello Marco,

    Some questions:

    How do you determine that all the nodes that join have the same address? What address do the nodes get?

    We have some documentation on how to set up clusters, which you can find here.

    This should be possible to do in Zigbee, as well as in Thread and Bluetooth Mesh. In my opinion, Thread and Zigbee are quite similar, they are just different network protocols, based on Routed Mesh technology. The alternative is Bluetooth Mesh, which is a flooding mesh. 

    In terms of power consumption, they are all quite similar. All the  protocols require you to use the radio in RX mode most of the time, so the current consumption is higher than "regular" BLE, as you may know.

    I don't know whether your nodes are intended to move around, or if they are stationary. If they are moving, Bluetooth Mesh is probably a better solution. If they are stationary, and you don't intend to use your network with other Thread or Zigbee devices, it shouldn't really matter what protocol you use.

    Check out the Zigbee documentation that I linked above to see how to set up a new cluster.

    Best regards,

    Edvin

Reply
  • Hello Marco,

    Some questions:

    How do you determine that all the nodes that join have the same address? What address do the nodes get?

    We have some documentation on how to set up clusters, which you can find here.

    This should be possible to do in Zigbee, as well as in Thread and Bluetooth Mesh. In my opinion, Thread and Zigbee are quite similar, they are just different network protocols, based on Routed Mesh technology. The alternative is Bluetooth Mesh, which is a flooding mesh. 

    In terms of power consumption, they are all quite similar. All the  protocols require you to use the radio in RX mode most of the time, so the current consumption is higher than "regular" BLE, as you may know.

    I don't know whether your nodes are intended to move around, or if they are stationary. If they are moving, Bluetooth Mesh is probably a better solution. If they are stationary, and you don't intend to use your network with other Thread or Zigbee devices, it shouldn't really matter what protocol you use.

    Check out the Zigbee documentation that I linked above to see how to set up a new cluster.

    Best regards,

    Edvin

Children
  • Hi Edvin,

    Thank you for your quick response. 

    The sensors are stationary therefore I will stick to Zigbee or Thread. 

    I tried to determine the node address by adding a case for ZB_ZDO_SIGNAL_DEVICE_ANNCE to the  zboss_signal_handler(). My understanding is that it should return the short address of the node but when I join two or more notes the value stayes the same. Maybe this is not the correct way of doing it?  Is it possible to retrieve the ieee address of the notes as well? Here is the code snippet. 

    void zboss_signal_handler(zb_uint8_t param)
    {
    /* Read signal description out of memory buffer. */
    zb_zdo_app_signal_type_t sig = zb_get_app_signal(param, NULL);
    zb_ret_t status = ZB_GET_APP_SIGNAL_STATUS(param);

    switch(sig)
    {
    case ZB_ZDO_SIGNAL_DEVICE_ANNCE:
    NRF_LOG_INFO("JOIND! \r\n");
    zb_zdo_signal_device_annce_params_t *dev_annce_params = ZB_ZDO_SIGNAL_GET_PARAMS(&sig, zb_zdo_signal_device_annce_params_t);
    NRF_LOG_INFO("Addr = %d\r\n", dev_annce_params->device_short_addr);
    break;
    }
    }

    What I understand from the documentation you send is, that it is best to create my own cluster rather than using zb_zcl_el_measurement and zb_zcl_temp_measurement. Is this correct? 

    How would one implement a list of network devices and send messages in thread? 

    Best reagards 

    Marco

  • Hello,

    I think that if you find a suitable zigbee cluster, you should use this. So you can use the zb_zcl_temp_measurement. 

    Check out the cli example located in SDK\examples\zigbee\experimental\cli\cli_agent_router

    You need one device that is a coordinator, and for this, you can use the light_control\light_coordinator example for this.

    I tested this, and they get different addresses, and you can ping other devices in the network using this description.

    http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.thread_zigbee.v2.0.0%2Fzigbee_example_cli_agent.html&cp=4_2_0_2_2_7_2&anchor=Testing

    Please look at the example how the addresses are fetched there.

    Best regards,

    Edvin

Related