This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Question about the reporting of the multi-sensor

Good day,

I am currently developing with two NRF52840 DK boards, and I also have two NRF Dongles. On a dongle a sniffer for ZigBee. I am working with SDK 3.2. This is my first project with ZigBee, so I don't have much know-how yet.

I have a few questions about multi-sensor.

1) After successfully binding the two clusters (ZB_ZCL_CLUSTER_ID_TEMP_MEASUREMENT, ZB_ZCL_CLUSTER_ID_PRESSURE_MEASUREMENT), the multi-sensor sends data to the coordinator. Of course, these are also output on the Terminal. With the CLI agent, the Subscribe function is called, so I'm a little confused. Is it normal that in such cases no subscribe function is needed, so it is only needed for devices that do not have automatic attribute reporting?

2) How can the attribute report be increased, i.e. instead of every 5 seconds, only 2 seconds?

Thank you in advance for an answer

Best regards,

Jonas T

  • Hi Jonas,

    Before moving forward with your questions, I have to remind you that the SDK version you are using is quite old, there are many changes(bug fixes and improvements) after this release. You may also have a risk to get certification for your Zigbee product since the Connectivity Standards Alliance(formerly the Zigbee Alliance) requests ZCL 8 compatibility for new Zigbee products, which are now only supported by nRF5 SDK for Thread and Zigbee v4.2.0 and NCS 2.0.0. NCS2.0.0 is highly recommended since  nRF5 SDK for Thread and Zigbee v4.2.0 will be the last release for nRF5 SDK based solution.

    nRF5 SDK for Thread and Zigbee v3.2.0
    -------------------------------------
    Release Date: Week 37, 2019

    Let me know which SDK solution you want to continue with and I will investigate and answer your questions based on it.

    Best regards,

    Charlie

  • Hi Charlie,

    Thank you for your reply, I had a bit of a mix up there. Under the documentation of the SDK for the multi-sensor you will find the following:

    nRF5 SDK for Thread and Zigbee v4.1.0
    -------------------------------------
    Release Date: Week 18, 2020

    Yes, the multi-sensor works with SDK4.1 and not SDK3.2 (W37, 2019). However, the coordinator works with the older one which still works fine.

    In the code of the multi-sensor I have only changed the values of the clusters, nothing else, this works also quite great.

    When I started learning about these areas, the light example worked great with SDK3.2, but did not work with SDK4.1. Afterwards, I read in a devzone that it is necessary to add code, but it was too late. Now I am with the coordinator on the older state. This is just a test setup.

    How my coordinator main is set up can be seen in the ticket at the following verified answer. I have now improved and shortened the code, but still had the same function.

    Best regards,

    Jonas T

  • Hi Jonas,

    Is it normal that in such cases no subscribe function is needed, so it is only needed for devices that do not have automatic attribute reporting?

    If reporting is configured on a device it will send reports based on the current state of its binding table. The multi sensor configures reporting itself, so when you then create a binding on the clusters it has configured reporting for it will start reporting.

    2) How can the attribute report be increased, i.e. instead of every 5 seconds, only 2 seconds?

    Do you want to make this change from the coordinator or on the multi sensor?

    If you want the coordinator to change how often the multi sensor reports you can send a configure reporting command with a new reporting interval. This command has a minimum reporting interval field and maximum reporting interval field, so setting maximum interval 2 seconds will make the device report at least every 2 seconds. You can fill out and send this command using ZB_ZCL_GENERAL_INIT_CONFIGURE_REPORTING_SRV_REQ, ZB_ZCL_GENERAL_ADD_SEND_REPORT_CONFIGURE_REPORTING_REQ and ZB_ZCL_GENERAL_SEND_CONFIGURE_REPORTING_REQ, similar to how it is done in the CLI agent. Make sure to set the max_interval in ZB_ZCL_GENERAL_ADD_SEND_REPORT_CONFIGURE_REPORTING_REQ.

    If you instead want to make these changes locally on the multi sensor you can use zb_zcl_put_reporting_info() to change the configuration. First create a zb_zcl_reporting_info_t structure and set the required fields for the configuration, such as def_max_interval, then call zb_zcl_put_reporting_info():

    /* Structure to store reporting configuration for a given attribute. */
        zb_zcl_reporting_info_t rep_info;
        /* Erase the structure. */
        ZB_BZERO(&rep_info, sizeof(rep_info));
        /* This is a reporting configuration to send Reports. */
        rep_info.direction = ZB_ZCL_CONFIGURE_REPORTING_SEND_REPORT;
        /* Device endpoint to send Reports from. */
        rep_info.ep = TODO;
        /* Cluster ID in which the attribute belongs. */
        rep_info.cluster_id = TODO;
        /* Cluster role (client/server). */
        rep_info.cluster_role = TODO;
        /* Profile ID, usually Home Automation. */
        rep_info.dst.profile_id = TODO;
        /* Set attribute ID */
        rep_info.attr_id = TODO;
        /* TODO: Configure desired intervals of the reporting. */
        rep_info.u.send_info.def_min_interval = TODO;
        rep_info.u.send_info.def_max_interval = TODO;
        
        /* Put the reporting configuration to use and handle the returned value.
         * Use Overrie option so the already present default configuration will be changed. */
        zb_zcl_put_reporting_info(&rep_info, ZB_TRUE);

    Best regards,

    Marte

  • Hi Marte,

    Thanks for your answers. Yes, that with decreasing the ZIGBEE_CONFIGURE_REPORT_DEFAULT_MAX_INTERVAL or increasing the ZIGBEE_CONFIGURE_REPORT_DEFAULT_MIN_INTERVAL worked, after sending the new report request setting.

    So the reporting can be changed by doing this with variables too.

    I'll make a note of that with the sensor.

    Kind regards,

    Jonas T

Related