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

Problem with Cluster global attributes, in particular "ClusterRevision attribute" [URGENT]

Hello to all,

I have a problem related to the client side Global Attribute: I have implemented an "On / Off Switch" that presents the cluster On / Off (0x0006), client side. I'm using the nRF SDK for Zigbee and Thread 3.0.0.

From specification it is said that the Cluster Global Attribute, and in particular the ClusterRevision attribute, is mandatory, both on the client side and on the server side (cfr. ZigBee Cluster Library Specification 2.3.5.1: "The ClusterRevision global attribute is mandatory for all cluster instances, client and server, conforming to
ZCL revision 6 (ZCL6) and later ZCL revisions.").

At the moment, however, if I send a "Read Attribute" or "Write Attribute" command of this attribute, which has ID 0xFFFD, the On / Off Switch device replies with the error code 134 and, if I go to see with the sniffer the message, the device replies with "unsupported cluster".


On the server side, this problem does not exist, also because by checking the code, on the needed side the macro for the attribute list is called which in turn contains the macro "ZB_ZCL_START_DECLARE_ATTRIB_LIST (attr_list)" which calls the Global Attribute.

#define ZB_ZCL_DECLARE_ON_OFF_ATTRIB_LIST_EXT(                                                  \
    attr_list, on_off, global_scene_ctrl, on_time, off_wait_time                                \
    )                                                                                           \
    ZB_ZCL_START_DECLARE_ATTRIB_LIST(attr_list)                                                 \
    ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_ON_OFF_ON_OFF_ID, (on_off))                                \
    ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_ON_OFF_GLOBAL_SCENE_CONTROL, (global_scene_ctrl))          \
    ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_ON_OFF_ON_TIME, (on_time))                                 \
    ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_ON_OFF_OFF_WAIT_TIME, (off_wait_time))                     \
    ZB_ZCL_FINISH_DECLARE_ATTRIB_LIST

By not calling this macro for cluster 0x0006 client side, how do I activate this particular attribute?


Thank you very much for helping.

BR,

Raffaela

  • Hi Edvin,

    Have you any news about this topic?

    Thank you,

    Raffaela

  • Hello,

    Sorry for the late reply. I wanted someone from our Zigbee team to have a look. He said that this approach looks good. He also did some tests himself, and this is what he did:

    Changes to main.c (light switch example):

    -Added define so I can declare an empty attribute list.

    -Pass declared empty attribute list to the ZB_HA_DECLARE_DIMMER_SWITCH_CLUSTER_LIST (which has been modified to take my empty attr list).

    #define ZB_ZCL_DECLARE_EMPTY_ATTRIB_LIST(attr_list)     \
                ZB_ZCL_START_DECLARE_ATTRIB_LIST(attr_list) \
                ZB_ZCL_FINISH_DECLARE_ATTRIB_LIST
    
     
    
    ZB_ZCL_DECLARE_EMPTY_ATTRIB_LIST(on_off_empty_attr_list);
    
     
    
    /* Declare cluster list for Dimmer Switch device (Identify, Basic, Scenes, Groups, On Off, Level Control). */
    /* Only clusters Identify and Basic have attributes. */
    ZB_HA_DECLARE_DIMMER_SWITCH_CLUSTER_LIST(dimmer_switch_clusters,
                                             basic_attr_list,
                                             identify_attr_list,
                                             on_off_empty_attr_list);

    So, zb_ha_dimmer_switch.h:

    -changed macro so that it takes one additional argument.

    -added an empty attr list to on_off_cluster_desc

    #define ZB_HA_DECLARE_DIMMER_SWITCH_CLUSTER_LIST(                   \
     cluster_list_name,                                                 \
     basic_attr_list,                                                   \
     identify_attr_list,                                                \
     on_off_empty_attr_list)                                            \
     
    ...
    
    
    ZB_ZCL_CLUSTER_DESC(                                                \
     ZB_ZCL_CLUSTER_ID_ON_OFF,                                          \
     ZB_ZCL_ARRAY_SIZE(on_off_empty_attr_list, zb_zcl_attr_t),          \
     (on_off_empty_attr_list),                                          \
     ZB_ZCL_CLUSTER_CLIENT_ROLE,                                        \
     ZB_ZCL_MANUF_CODE_INVALID                                          \
     ), 

  • Hi Edvin,

    Perfect!!! I implement this approach.

    Thank you a lot for your time!

    Have a good day,

    Raffaela

Related