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: Problem with max reaport time

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

We are working on a temperature and humidity sensor on cc2530. The device has 2 sensors. One temperature and second temperature and humidity. The device reports humidity and temperature at endpoint 1 and the second temperature at endpoint 2. Reaport max time is set to 20 minutes. Reaport value change in temperature is set to 0.2C and humidity to 1%. There are situations when e.g. the temperature on the sensor is not reported for an hour. This occurs when, for example, the humidity often changes during this period. As if max reaport time did not function then.
It also often happens that the report comes not every 20 minutes but e.g. 19 minutes and 58 seconds.

  • Hi,

    Which Z-Stack are you using? Is it 3.0.2, based on your previous post: https://e2e.ti.com/support/wireless-connectivity/zigbee-and-thread/f/158/t/795893?

    Regards,
    Toby

  • Hi,

    we use 3.0.2 stack. We have made one modifaction in bdb_RepReport() function on bdb_Reporting.c like in this topic:

    Piotr.

  • There is example how it looks. FIrst it is everything ok.  And when "blue" sensor starts spam with values "black" stops sending for over 8 hour. And max reaport time is 20 min.

    Piotr.

  • Thanks for sharing detailed explanation of the situation.

    I'm looking into the BDB reporting functionality of Z-Stack 3.0.2 to find what could be causing this.

  • How frequently are these reports being sent? Can you provide a sniffer log?

    What value are you using for the minimum reporting interval for both sensors (temperature and humidity)? How frequent do you need this to be?
    If you are using a value of 0, then it may be the case that frequent humidity reports cause overhead such that extra time is effectively added to the maximum reporting interval (in the current BDB reporting module).

  • Hi,

    Now for both sensors min time is set to 0. We set it to 0 to debug this problem. We observed this problem in our normall configuration that was min=2min, max=20min for both sensors. Of course It was less intense.

    Can you tell us in detail where the problem is (in which function)? Maybe we can add a workaround.

    I don't have snifer logs right now. I paste a bit of logs from our zigbee gate. After the weekend I will try to add logs from the sniffer.

    First endpoint (ictID=77) it's two attributs endpoint (temperature and enabled) second (ictID=78) it's temperature and hummidity.  This 77 often changes.

    Nov 23 01:25:14  : time="2019-11-23T01:25:14Z" level=info msg="Device(ictID=78) Attribute temperature = 17.9"
    Nov 23 01:29:45  : time="2019-11-23T01:29:45Z" level=info msg="Device(ictID=77) Attribute enabled = true"
    Nov 23 01:29:45  : time="2019-11-23T01:29:45Z" level=info msg="Device(ictID=77) Attribute temperature = 26.33"
    Nov 23 01:47:02  : time="2019-11-23T01:47:02Z" level=info msg="Device(ictID=77) Attribute enabled = true"
    Nov 23 01:47:02  : time="2019-11-23T01:47:02Z" level=info msg="Device(ictID=77) Attribute temperature = 26.55"
    Nov 23 02:05:50  : time="2019-11-23T02:05:50Z" level=info msg="Device(ictID=77) Attribute enabled = true"
    Nov 23 02:05:50  : time="2019-11-23T02:05:50Z" level=info msg="Device(ictID=77) Attribute temperature = 26.77"
    Nov 23 02:23:07  : time="2019-11-23T02:23:07Z" level=info msg="Device(ictID=77) Attribute enabled = true"
    Nov 23 02:23:07  : time="2019-11-23T02:23:07Z" level=info msg="Device(ictID=77) Attribute temperature = 27"
    Nov 23 02:43:07  : time="2019-11-23T02:43:07Z" level=info msg="Device(ictID=77) Attribute enabled = true"
    Nov 23 02:43:07  : time="2019-11-23T02:43:07Z" level=info msg="Device(ictID=77) Attribute temperature = 27.15"
    Nov 23 02:43:07  : time="2019-11-23T02:43:07Z" level=info msg="Device(ictID=78) Attribute humidity = 25.68"
    Nov 23 02:43:07  : time="2019-11-23T02:43:07Z" level=info msg="Device(ictID=78) Attribute temperature = 17.8"
    Nov 23 02:56:11  : time="2019-11-23T02:56:11Z" level=info msg="Device(ictID=77) Attribute enabled = true"
    Nov 23 02:56:11  : time="2019-11-23T02:56:11Z" level=info msg="Device(ictID=77) Attribute temperature = 27.35"
    Nov 23 03:14:14  : time="2019-11-23T03:14:14Z" level=info msg="Device(ictID=77) Attribute enabled = true"
    Nov 23 03:14:14  : time="2019-11-23T03:14:14Z" level=info msg="Device(ictID=77) Attribute temperature = 27.55"
    Nov 23 03:30:01  : time="2019-11-23T03:30:01Z" level=info msg="Device(ictID=77) Attribute enabled = true"
    Nov 23 03:30:01  : time="2019-11-23T03:30:01Z" level=info msg="Device(ictID=77) Attribute temperature = 27.75"
    Nov 23 03:50:01  : time="2019-11-23T03:50:01Z" level=info msg="Device(ictID=77) Attribute enabled = true"
    Nov 23 03:50:01  : time="2019-11-23T03:50:01Z" level=info msg="Device(ictID=77) Attribute temperature = 27.92"
    Nov 23 03:50:01  : time="2019-11-23T03:50:01Z" level=info msg="Device(ictID=78) Attribute humidity = 25.45"
    Nov 23 03:50:01  : time="2019-11-23T03:50:01Z" level=info msg="Device(ictID=78) Attribute temperature = 17.87"
    Nov 23 04:09:51  : time="2019-11-23T04:09:51Z" level=info msg="Device(ictID=77) Attribute enabled = true"
    Nov 23 04:09:51  : time="2019-11-23T04:09:51Z" level=info msg="Device(ictID=77) Attribute temperature = 28.12"
    Nov 23 04:29:40  : time="2019-11-23T04:29:40Z" level=info msg="Device(ictID=78) Attribute humidity = 25.42"
    Nov 23 04:29:40  : time="2019-11-23T04:29:40Z" level=info msg="Device(ictID=78) Attribute temperature = 17.9"
    Nov 23 04:29:51  : time="2019-11-23T04:29:51Z" level=info msg="Device(ictID=77) Attribute enabled = true"
    Nov 23 04:29:51  : time="2019-11-23T04:29:51Z" level=info msg="Device(ictID=77) Attribute temperature = 28.3"
    Nov 23 04:49:40  : time="2019-11-23T04:49:40Z" level=info msg="Device(ictID=78) Attribute humidity = 25.36"
    Nov 23 04:49:40  : time="2019-11-23T04:49:40Z" level=info msg="Device(ictID=78) Attribute temperature = 17.92"
    Nov 23 04:49:51  : time="2019-11-23T04:49:51Z" level=info msg="Device(ictID=77) Attribute enabled = true"
    Nov 23 04:49:51  : time="2019-11-23T04:49:51Z" level=info msg="Device(ictID=77) Attribute temperature = 28.48"
    Nov 23 05:09:14  : time="2019-11-23T05:09:14Z" level=info msg="Device(ictID=77) Attribute enabled = true"
    Nov 23 05:09:14  : time="2019-11-23T05:09:14Z" level=info msg="Device(ictID=77) Attribute temperature = 28.18"
    Nov 23 05:09:59  : time="2019-11-23T05:09:59Z" level=info msg="Device(ictID=77) Attribute enabled = true"
    Nov 23 05:09:59  : time="2019-11-23T05:09:59Z" level=info msg="Device(ictID=77) Attribute temperature = 27.87"
    Nov 23 05:10:44  : time="2019-11-23T05:10:44Z" level=info msg="Device(ictID=77) Attribute enabled = true"
    Nov 23 05:10:44  : time="2019-11-23T05:10:44Z" level=info msg="Device(ictID=77) Attribute temperature = 27.35"
    Nov 23 05:11:29  : time="2019-11-23T05:11:29Z" level=info msg="Device(ictID=77) Attribute enabled = true"
    Nov 23 05:11:29  : time="2019-11-23T05:11:29Z" level=info msg="Device(ictID=77) Attribute temperature = 27.06"
    Nov 23 05:12:14  : time="2019-11-23T05:12:14Z" level=info msg="Device(ictID=77) Attribute enabled = true"
    Nov 23 05:12:14  : time="2019-11-23T05:12:14Z" level=info msg="Device(ictID=77) Attribute temperature = 26.86"
    Nov 23 05:13:44  : time="2019-11-23T05:13:44Z" level=info msg="Device(ictID=77) Attribute enabled = true"
    Nov 23 05:13:44  : time="2019-11-23T05:13:44Z" level=info msg="Device(ictID=77) Attribute temperature = 26.55"
    Nov 23 05:15:15  : time="2019-11-23T05:15:15Z" level=info msg="Device(ictID=77) Attribute enabled = true"
    Nov 23 05:15:15  : time="2019-11-23T05:15:15Z" level=info msg="Device(ictID=77) Attribute temperature = 26.33"
    Nov 23 05:17:30  : time="2019-11-23T05:17:30Z" level=info msg="Device(ictID=77) Attribute enabled = true"
    Nov 23 05:17:30  : time="2019-11-23T05:17:30Z" level=info msg="Device(ictID=77) Attribute temperature = 26.09"
    Nov 23 05:19:45  : time="2019-11-23T05:19:45Z" level=info msg="Device(ictID=77) Attribute enabled = true"
    Nov 23 05:19:45  : time="2019-11-23T05:19:45Z" level=info msg="Device(ictID=77) Attribute temperature = 25.86"
    Nov 23 05:22:46  : time="2019-11-23T05:22:46Z" level=info msg="Device(ictID=77) Attribute enabled = true"
    Nov 23 05:22:46  : time="2019-11-23T05:22:46Z" level=info msg="Device(ictID=77) Attribute temperature = 25.6"
    Nov 23 05:27:16  : time="2019-11-23T05:27:16Z" level=info msg="Device(ictID=77) Attribute enabled = true"
    Nov 23 05:27:16  : time="2019-11-23T05:27:16Z" level=info msg="Device(ictID=77) Attribute temperature = 25.37"
    Nov 23 05:32:32  : time="2019-11-23T05:32:32Z" level=info msg="Device(ictID=77) Attribute enabled = true"
    Nov 23 05:32:32  : time="2019-11-23T05:32:32Z" level=info msg="Device(ictID=77) Attribute temperature = 26.21"
    Nov 23 05:33:17  : time="2019-11-23T05:33:17Z" level=info msg="Device(ictID=77) Attribute enabled = true"
    Nov 23 05:33:17  : time="2019-11-23T05:33:17Z" level=info msg="Device(ictID=77) Attribute temperature = 25.88"
    Nov 23 05:34:02  : time="2019-11-23T05:34:02Z" level=info msg="Device(ictID=77) Attribute enabled = true"
    Nov 23 05:34:02  : time="2019-11-23T05:34:02Z" level=info msg="Device(ictID=77) Attribute temperature = 25.55"
    Nov 23 05:35:32  : time="2019-11-23T05:35:32Z" level=info msg="Device(ictID=77) Attribute enabled = true"
    Nov 23 05:35:32  : time="2019-11-23T05:35:32Z" level=info msg="Device(ictID=77) Attribute temperature = 25.2"
    Nov 23 05:37:02  : time="2019-11-23T05:37:02Z" level=info msg="Device(ictID=77) Attribute enabled = true"
    Nov 23 05:37:02  : time="2019-11-23T05:37:02Z" level=info msg="Device(ictID=77) Attribute temperature = 24.9"
    Nov 23 05:37:47  : time="2019-11-23T05:37:47Z" level=info msg="Device(ictID=77) Attribute enabled = true"
    Nov 23 05:37:47  : time="2019-11-23T05:37:47Z" level=info msg="Device(ictID=77) Attribute temperature = 24.68"
    Nov 23 05:40:03  : time="2019-11-23T05:40:03Z" level=info msg="Device(ictID=77) Attribute enabled = true"
    Nov 23 05:40:03  : time="2019-11-23T05:40:03Z" level=info msg="Device(ictID=77) Attribute temperature = 24.39"
    Nov 23 05:41:33  : time="2019-11-23T05:41:33Z" level=info msg="Device(ictID=77) Attribute enabled = true"
    Nov 23 05:41:33  : time="2019-11-23T05:41:33Z" level=info msg="Device(ictID=77) Attribute temperature = 24.09"
    Nov 23 05:43:03  : time="2019-11-23T05:43:03Z" level=info msg="Device(ictID=77) Attribute enabled = true"
    Nov 23 05:43:03  : time="2019-11-23T05:43:03Z" level=info msg="Device(ictID=77) Attribute temperature = 23.78"
    

    Look in this fragment:

    Nov 23 03:50:01  : time="2019-11-23T03:50:01Z" level=info msg="Device(ictID=77) Attribute enabled = true"
    Nov 23 03:50:01  : time="2019-11-23T03:50:01Z" level=info msg="Device(ictID=77) Attribute temperature = 27.92"
    Nov 23 03:50:01  : time="2019-11-23T03:50:01Z" level=info msg="Device(ictID=78) Attribute humidity = 25.45"
    Nov 23 03:50:01  : time="2019-11-23T03:50:01Z" level=info msg="Device(ictID=78) Attribute temperature = 17.87"
    Nov 23 04:09:51  : time="2019-11-23T04:09:51Z" level=info msg="Device(ictID=77) Attribute enabled = true"
    Nov 23 04:09:51  : time="2019-11-23T04:09:51Z" level=info msg="Device(ictID=77) Attribute temperature = 28.12"
    Nov 23 04:29:40  : time="2019-11-23T04:29:40Z" level=info msg="Device(ictID=78) Attribute humidity = 25.42"
    Nov 23 04:29:40  : time="2019-11-23T04:29:40Z" level=info msg="Device(ictID=78) Attribute temperature = 17.9"
    Nov 23 04:29:51  : time="2019-11-23T04:29:51Z" level=info msg="Device(ictID=77) Attribute enabled = true"
    Nov 23 04:29:51  : time="2019-11-23T04:29:51Z" level=info msg="Device(ictID=77) Attribute temperature = 28.3"
    Nov 23 04:49:40  : time="2019-11-23T04:49:40Z" level=info msg="Device(ictID=78) Attribute humidity = 25.36"
    Nov 23 04:49:40  : time="2019-11-23T04:49:40Z" level=info msg="Device(ictID=78) Attribute temperature = 17.92"
    Nov 23 04:49:51  : time="2019-11-23T04:49:51Z" level=info msg="Device(ictID=77) Attribute enabled = true"
    Nov 23 04:49:51  : time="2019-11-23T04:49:51Z" level=info msg="Device(ictID=77) Attribute temperature = 28.48"
    Nov 23 05:09:14  : time="2019-11-23T05:09:14Z" level=info msg="Device(ictID=77) Attribute enabled = true"
    

    After that:

    Nov 23 03:50:01  : time="2019-11-23T03:50:01Z" level=info msg="Device(ictID=78) Attribute humidity = 25.45"
    Nov 23 03:50:01  : time="2019-11-23T03:50:01Z" level=info msg="Device(ictID=78) Attribute temperature = 17.87"


    Next report from 78 shoud by on 04:10:01 but it goes on 04:29:40 and it was only one reaport from 77 endpoint beetwen that.

    Piotr.

  • Hi Piotr,

    Thank you for the additional information, the sniffer logs would be helpful to understand if the reports are being sent over-the-air but are not parsed/processed correctly by the gateway.  Would you also be able to provide your application files so that we may try to replicate the issue?  Here are some additional resources:

    https://e2e.ti.com/support/wireless-connectivity/zigbee-and-thread/f/158/t/835016 
    http://processors.wiki.ti.com/index.php/Zigbee_Known_Issues_and_Proposed_Fixes 

    Please be aware the responses will be delayed due to the U.S. Thanksgiving Holiday, thank you for your patience and understanding.

    Regards,
    Ryan

  • Hi,

    We tried to rip snifer logs but unfortunately the snifer crashes. They were logs from several hours, maybe too much data.


    The error is easily replicated. It is enough to register two clusters, e.g. one temperature and the other humidity. Set a maximum reaport time for 10 minutes for both. Time is critical. For example, no error occurs if the max time is 90 seconds. If the value comes from one of the clusters due to a change in value, reaport from second cluster come after max reaport time from that moment.

    I think we found where the error was. We are currently testing our sensors on corrected firmware.

    Piotr.

  • Thanks for the update.

    Feel free to share what you think the error is, and we can further investigate.

  • Hi,

    after several days of testing, the error did not return.

    he solution we used was described in the thread

    In this line:

    passTimeOfEvent = nextEventTimeout*1000L >= remainingTimeoutTimer? nextEventTimeout*1000L - remainingTimeoutTimer: 0;

    Without adding the letter L, the value of passTimeOfEvent is always 0. An implicit conversion probably occurs.

    Piotr.

  • Thanks for sharing this.

    As the post suggests, please make sure you are using the IAR version (EW8051 10.20.1) specified in the release notes.