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

Zigbee - Read number of hops (radius)

Hi there,

I'm working on a Zigbee project and I'm using the nRF5 SDK for Thread and Zigbee v4.1.0. For benchmarking purposes I need to read the number of hops a Zigbee-packet took to get from Node A to Node B in a network with mesh topology. According to Zigbee specification the radius value should fulfill this requirement. Is there a way to read this value or any other way to detect this?

Thanks for your help.

Best regards,

Cyrill

Parents
  • Hello,

    I am not sure how you read out the number of hops that packets have used, or if it is possible. But I don't understood exactly why you need this. Zigbee has a routing table that calculates the route cost for all nodes, meaning it will always use the route with the lowest cost. The cost will be a function depending on number of hops and signal strength. 

    Looking at the light_bulb example from the SDK, one packet that is incoming that will trigger a callback is the command to turn on and off the bulb. It will trigger the zcl_device_cb().

    I see that there is some general information in:

    p_device_cb_param->cb_param.gnr.in_cmd_info, such as source address and destination address. To be honest, I am not sure that the number of hops is even part of the packet? I don't think that there is a maximum number of hops, with a TTL (time to live) counter that is decremented for each hop in Zigbee, like it is in Bluetooth Mesh. Do you know that there is?

    Best regards,

    Edvin

  • Hi Edvin,

    We need the TTL or Radius value to calculate the latency per hop of the packet. We are interested in how fast the packet will be transfered over the Zigbee network depending on the hops it took.

    I already checked the p_device_cb_param->cb_param.gnr.in_cmd_info field but couldn't find any helpful data.

    The Zigbee specification says that there is an 8-Bit Radius field in the NWK-header of the packet which is transfered to the APL-layer over the network layer data entity (NLDE). Please correct me if I'm wrong. So the value should be available somehow.

    Greetings,

    Cyrill

Reply
  • Hi Edvin,

    We need the TTL or Radius value to calculate the latency per hop of the packet. We are interested in how fast the packet will be transfered over the Zigbee network depending on the hops it took.

    I already checked the p_device_cb_param->cb_param.gnr.in_cmd_info field but couldn't find any helpful data.

    The Zigbee specification says that there is an 8-Bit Radius field in the NWK-header of the packet which is transfered to the APL-layer over the network layer data entity (NLDE). Please correct me if I'm wrong. So the value should be available somehow.

    Greetings,

    Cyrill

Children
Related