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.

CC2530: Zigbee know if network is active on routers

Part Number: CC2530
Other Parts Discussed in Thread: Z-STACK

Hello,

I'm a having a small issue where a router all of the sudden "freezes" and stops receiving zigbee requests, but for the router itself all seems to be fine.

My question is if there is a way to know if messages are flowing trough the router like for example acknoledges, link status, route request, ...

I know there is an issue on the network and I was thinking that maybe I could find a workaround to detect when the router entered that state, and helped me debug it later or as brute force attempt do a reset.

I have some alternative that I was thinking but I'm not sure if they are the best:

-> Read an attribute from the coordinator from time to time and see if I had a response

-> Check for hits on the function "afIncomingData", but this would only work if someone tried use upper layer messages directed at that route. Sitting in iddle there wouldn't be any hits.

-> Use the event "AF_DATA_CONFIRM_CMD

Anyone has a sugestion on how can I know if the network is still active?

Best regards

  • Hello MSantos,

    So the router device does not lock up or power off, it simply fails to receive packets? Do the radio settings change at any point or is the hardware affected by environmental changes? Without returning MAC ACKS the neighbor device routes will be invalidated with an RERR and new routes will be re-established to avoid the bad router, thereby maintaining the integrity of the mesh network. You can poll a known neighbor device, much like an end device would for a parent, and manually reset if time expires without a response. Routers that are prone to get off and on the network are recommended to set the zgRouterOffAssocCleaup flag to TRUE. You can also use the parent annce ZDO message to detect if any children have joined other parent devices, thereby indicating an issue.

    Regards,
    Ryan
  • Router shouldn’t stop working abruptly and I suspect there’s something wrong in your application code. I suggest you to find root cause to fix it.

  • There is an issue on the radio hardware that reduces the range of the devices, this causes more loss packets than it should. I think that may be one of the reasons for the network instability.

    What I'm trying to do is just a way to recover from that situation a bit more gracefully until the hardware problem is sorted out. I already checked the code for heap and stack overflows, code errors and even making a really simple app with just the barebones  for the zigbee to work it always as this behaviour. About the sugestion "zgRouterOffAssocCleanup" flag it was already putted on true.

    About the parent annce I'm not sure I get what you mean, doesn't the stack does this already at power up? Could you explain a little better?

    Thanks for the help

  • Yes, parent annce is typically sent only when forming a network or being reset, after 10 seconds plus a random jitter of up to 10 seconds. I was thinking that you could manually use ZDApp_SendParentAnnce() every so often to see if other parents have picked up the device's orphaned children but on further consideration this doesn't work if the router in question is unable to receive anything. You need to send out a request that you are certain should receive a response and reset if it fails to do so.

    Regards,
    Ryan
  • About the parent annce I was doing some experiments with ubiqua and found something a bit strange that I'm unsure if it's normal or not.

    I have a coordinator with zstack 3.0.0 and two slave devices (router and end device) with the zstack 1.2.2a and the parence annce behaviour seems to be different between the stacks.

    I attached a ubiqua log with this behaviour, the test scenario was:

    -> Connect end device to coordinator

    -> Remove coordinatior and wait end device to connect to the router

    -> Connect coordinator again and wait for "parent annce" where the router should reply saying it is the childs parent

    -> Remove router and wait for end device to connect to coordinator

    -> Connect router again and wait for "parent annce" where the coordinator should reply saying it is the childs parent

    If you look on messages 26 and 62 of the log the data sent in the air isn't the same, is this supposed to happen? Is there a way around it?

    ParentAnnce.zip

  • Which devices are running Z-Stack 3.0.0 vs 1.2.2a? The parent announce command protocol is enforced for 3.0 but was also implemented in 1.2.2a as seen from the Core Release Notes: processors.wiki.ti.com/.../What's_New_in_ZigBee_3.0

    Packets 26 through 28 is correct, the ZC responds that it has the ZED as a child so the ZRshould remove it from the association table. But then the ZC goes offline so the ZED is orphaned and joins the ZR instead. In packet 62 the coordinator has returned and still believes that the end device is its child, but since this isn't the case the ZR should respond with the ZED IEEE address. The data exists but packet 66 seems to be corrupted in some way.  There do appear to be some important differences between 3.0 and 1.2.2a ZDP_ParentAnnce response handling inside ZDProfile.c

    Regards,
    Ryan

  • The devices are:
    zstack 1.2.2a - 0xC707 and 0xD988
    zstack 3.0.0 - 0x000

    So the "parent annce" messages aren't compatible between the two stacks?
    I didn't touch any code responsable for this feature and this causes an issue since when I try to used "LQI Request". In this scenario multiple devices reply saying the have "child x" and this makes along other issues makes it harder to know which is really the child parent.
    Could you confirm if it should be compatible?

    Thanks in advance for your help
  • ZigBee prides itself on cross-compatibility but 2.x stacks do not require parent annce, it has however been added in home 1.2.2a. You can try copying the 3.0 ZDP_ParentAnnce code from 3.0 and pasting it into 1.2.2a to see if this makes any difference, or fully develop your solution on 3.0

    Regards,
    Ryan
  • Hello,

    I copied the functions "ZDO_ParseParentAnnce" and "ZDApp_SetParentAnnceTimer" from tjhe stack 3.0 to 1.2.2a and it seems to work now.

    My question is, the parent annce in zigbee 1.2.2a wasn't zigbee compliant?

    Now I'm wondering if somehow my devices need to support both parent annces construction or I can assume the 1.2.2a wasn't just supposed to happen that why it has compatibility issues

    In any case I'm a better now than I was before so thanks for the sugestion :)

  • Hello MSantos,

    Like I mentioned earlier, Z-Stack Home 1.2.2a is Zigbee specification 2012/r20 and does not require parent annce functionality, although it has been added there are evidently some prevalent bugs/issues. These have not been fixed as we are now maintaining the 2015/r21 3.0 stacks and recommend that customers migrate accordingly.

    Regards,
    Ryan