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

Custom CLUSTER with attributes reporting

Hi

I am trying to declare a custom cluster in zigbee and enable the reporting for some attributes of the cluster, i followed this post to create the custom cluster
devzone.nordicsemi.com/.../how-to-declare-custom-zigbee-cluster

The problem that i am facing is when i send the reporting configuration request from the coordinator, i found that the end device responds just one time,  then doesn't send any other attributes reports.

Using the zigbee sniffer, i found that in the reporting request sent from the coordinator the ZCL Header -> manufacturer-specific is always false (0), which is wrong by ZigBee specification, it should be 1

Here what i found in the specs:
"The manufacturer specific sub-field SHALL be set to 0 if this command is being
used to configure attribute reports defined for any cluster in the ZCL or 1 if this command is being used to configure attribute reports for manufacturer specific attributes."

The problem is that value is set by the macro "ZB_ZCL_GENERAL_INIT_CONFIGURE_REPORTING_SRV_REQ" and it set always to 0.

I have tried to change it manually, but it doesn't work. it gave me a Malformated packet

Unfortunately, i didn't find any examples that can help me to create a custom cluster with attributes reporting, but i did the following things

1) Modifying the ZB_ZCL_CUSTOM_CLUSTER.h to be fit with my custom cluster
2) Using HA profile with device ID = ZB_HA_CUSTOM_ATTR_DEVICE_ID = 0xfff2
3) Modifying the manufacturer code to a custom one and including it in the custom cluster
4) Using the ZB_ZCL_CLUSTER_ID_CUSTOM as cluster-id as declared in zb_zcl_common.h

You can find attached my ZB_ZCL_CUSTOM_CLUSTER.h modified to my custom cluster

So i want to know if you have any suggestions

Thanks in advance

Arsanios


zb_zcl_custom_cluster.h