[Zigbee] ZCL: Discover Attributes Extended Command

Setup: 

nrf52840dk

NCS v2.4.1

Hi,

ZCL Discover Attributes Extended Command allows to get the attribute access type. Based on the Zigbee Cluster Library spec 2.5.23.1.5 section the second bit of Attribute access control field should indicate if the discovered attribute is reportable or not. 

In zcl_general_commands.c: zb_zcl_disc_attr_handler() following line of code is used for putting the attribute access type to the ZCL Discover Attributes Extended Response.

It seems that only bit 0 and bit 1 of access field are being put into the packet.
zb_zcl_common.h introduces the bits for setting attribute access as follows: 

ZB_ZCL_ATTR_ACCESS_REPORTING is the bit 2 in the attribute descriptor access, so it seems that it is not possible to determine if discovered attribute is reportable or not. 

Could you elaborate on that topic ? 
Please, correct me if I am wrong and point me to the right direction.
My goal is to be able to determine if discovered attribute is reportable or not.
Parents
  • Hi,

    I am currently investigating this.

    In the meantime, have you tested sending a Discover Attributes Extended command to see if it the correct access is sent in the response?

    Best regards,
    Marte

  • Hi Marte,

    Yes I have tested that and I receive access values in range <0x1, 0x3> so only 2 bits are taken into account.

    Received access correctly reflects what I have defined at my ZED.

  • Hi,

    Thank you for verifying. I was also able to reproduce this in NCS v2.5.0 with the Light Bulb sample. I have reported it to the developers.

    Best regards,
    Marte

  • Hi,

    You can fix this by changing 0x3U to 0x7U in ZB_ZCL_CONVERT_ATTR_ACCESS_BITMASK:

    #define ZB_ZCL_CONVERT_ATTR_ACCESS_BITMASK(_access) ((_access) & 0x7U)

    I have tested that this works, but please verify it on your side as well.

    Best regards,
    Marte

Reply
  • Hi,

    You can fix this by changing 0x3U to 0x7U in ZB_ZCL_CONVERT_ATTR_ACCESS_BITMASK:

    #define ZB_ZCL_CONVERT_ATTR_ACCESS_BITMASK(_access) ((_access) & 0x7U)

    I have tested that this works, but please verify it on your side as well.

    Best regards,
    Marte

Children