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

[Zigbee] Attribute subscription to multi-endpoint device breaks nvram

Hello.

I'm using Zigbee SDK 4.1.0 with custom pca10059-compatible debug board with nrf52840.

Binding and subscribing to attributes on a multiple endpoint device appears to clear or prevent loading NVRAM memory. The device forgets the state of pairing, subscriptions, bindings and everything else after restart.

Error appears even after applying fix from this topic: https://devzone.nordicsemi.com/f/nordic-q-a/59648/zigbee-unable-to-subscribe-to-attributes-and-or-receive-reports-on-device-with-multiple-endpoints

Steps to reproduce:

1) Start cli agent as router in existing network or as coordinator.

2) Start ble_zigbee_dynamic_color_light_bulb_thingy example holding SLEEPY_ON_BUTTON button to enable rx when idle option (to disable sleepy device behavior) and wait to join into network

3) Start ble_zigbee_dynamic_color_light_bulb_thingy example again. Device will send "rejoin" command (as expected after restart)

4) Bind and subscribe to attributes from cli agent:

> zdo bind on f4ce3663c613276d 10 f4ce36a65cb50caf 64 0x0008 0xed82
> Done

> zcl subscribe on f4ce3663c613276d 10 0x0008 0x0104 0x0000 32 1 2
> Done

<info> zigbee.report: Received value updates from the remote node 0xED82
<info> zigbee.report:     Profile: 0x0104 Cluster: 0x0008 Attribute: 0x0000 Type            : 32 Value: 255

5) Start ble_zigbee_dynamic_color_light_bulb_thingy example again. Device will send "Association Request" command as it it were running with cleared NVRAM memory.

I have attached Wireshark traffic dumps.

subscription-nvram-issue-packets.txt

subscription-nvram-issue-packets.pcapng

  • Hi,

    Sorry for the late reply. I will try to reproduce the case and send to our Zigbee team for analysis.

    Best regards,

    Marjeris

  • Hi. Yet another month has passed. I hope there is news on this topic that you accidentally forgot to write Slight smile

  • Hi,

    I have now an answer for you, I am very sorry for the delay. The ZBOSS stack has a limit on the number of active reporting configurations to 10 entries. This limitation cannot be change inside the application. The only way to mitigate this in the application is to change the size of the reporting table inside the endpoint declaration.

    In case of our Thingy example, we have 3 endpoints, which gives us a maximum of 3 active reporting configurations. In order to apply the mitigation please change the value of ZB_ZCL_COLOR_CONTROL_REPORT_ATTR_COUNT to three:

    #define ZB_ZCL_DECLARE_COLOR_DIMMABLE_LIGHT_EP(ep_name, ep_id, cluster_list)        \
    
        ZB_ZCL_DECLARE_COLOR_DIMMABLE_LIGHT_SIMPLE_DESC(                                \
    
            ep_name,                                                                    \
    
            ep_id,                                                                      \
    
            ZB_HA_COLOR_CONTROL_IN_CLUSTER_NUM,                                         \
    
            ZB_HA_COLOR_CONTROL_OUT_CLUSTER_NUM);                                       \
    
        ZBOSS_DEVICE_DECLARE_REPORTING_CTX(reporting_info## ep_name,                    \
    
            (3));                                  \
    
        ZBOSS_DEVICE_DECLARE_LEVEL_CONTROL_CTX(cvc_alarm_info## ep_name,                \
    
            ZB_ZCL_COLOR_DIMMABLE_LIGHT_CVC_ATTR_COUNT);                                \
    
        ZB_AF_DECLARE_ENDPOINT_DESC(                                                    \
    
            ep_name,                                                                    \
    
            ep_id,                                                                      \
    
            ZB_AF_HA_PROFILE_ID,                                                        \
    
            0,                                                                          \
    
            NULL,                                                                       \
    
            ZB_ZCL_ARRAY_SIZE(                                                          \
    
                cluster_list,                                                           \
    
                zb_zcl_cluster_desc_t),                                                 \
    
            cluster_list,                                                               \
    
            (zb_af_simple_desc_1_1_t*)&simple_desc_## ep_name,                          \
    
           3,                                     \
    
            reporting_info## ep_name,                                                   \
    
            ZB_ZCL_COLOR_DIMMABLE_LIGHT_CVC_ATTR_COUNT,                                 \
    
            cvc_alarm_info## ep_name)
    

    The issue with the limitation on the number of reporting configurations to 10 is reported to DSR (provider of ZBOSS stack).

    Again, I am very sorry for the delay in this case.

    Best regards,

    Marjeris

  • Hello.

    Thank you for the answer.

    Unfortunately, for more than three months no one could help me with this issue. I am deeply disappointed with the level of support from both Nordic and DSR company.

    I switched to Thread (OpenThread) protocol, my life became much easier.
Related