Hello Nordic support,
I am working on a Zigbee coordinator application to make it work with an IAS zone Zigbee device.
As per the Zigbee device specification, ''when it starts up, it auto scans for client poll control cluster on the coordinator. If it is support on the coordinator an auto bind is created and the sensor will send a check-in command in the interval specified in attribute “Check-in Interval. The coordinator has to reply with a check-in response".
So, in the coordinator code, I have declared the clusters as follows:
typedef struct
{
zb_zcl_basic_attrs_ext_t ias_sensor_basic_attr;
zb_zcl_identify_attrs_t ias_sensor_identify_attr;
zb_zcl_ias_zone_attrs_t ias_sensor_iaszone_attr;
zb_zcl_poll_control_attrs_t ias_sensor_pollctrl_attr;
}ias_sensor_window_device_ctx_t;
static ias_sensor_device_ctx_t m_ias_sensor_device_ctx;
static zb_uint8_t ias_sensor_attr_zcl_version = ZB_ZCL_VERSION;
static zb_uint8_t ias_sensor_attr_power_source = ZB_ZCL_BASIC_POWER_SOURCE_BATTERY;
static zb_uint16_t ias_sensor_attr_identify_time = 0;
static zb_uint8_t ias_sensor_attr_zone_state = 0;
static zb_uint16_t ias_sensor_attr_zone_type = 0x0015;
static zb_uint16_t ias_sensor_attr_zone_status = 0;
static zb_uint64_t ias_sensor_attr_ias_cie_addr = 0;
static zb_uint8_t ias_sensor_attr_zoneid = 0;
static zb_uint16_t ias_sensor_attr_cie_short_addr = 0;
static zb_uint8_t ias_sensor_attr_cie_ep = 0;
static zb_uint8_t ias_sensor_attr_battvoltage = 0;
static zb_uint32_t ias_sensor_attr_checkin_intvl = 3600;
static zb_uint32_t ias_sensor_attr_checkin_intvl_min = ZB_ZCL_POLL_CONTROL_CHECKIN_INTERVAL_MIN_DEFAULT_VALUE;
static zb_uint32_t ias_sensor_attr_longpoll_intvl = ZB_ZCL_POLL_CONTROL_LONG_POLL_INTERVAL_MIN_DEFAULT_VALUE;
static zb_uint32_t ias_sensor_attr_longpoll_intvl_min = ZB_ZCL_POLL_CONTROL_LONG_POLL_INTERVAL_MIN_DEFAULT_VALUE;
static zb_uint16_t ias_sensor_attr_shortpoll_intvl = 3;
static zb_uint16_t ias_sensor_attr_fastpoll_timeout = 300;
static zb_uint16_t ias_sensor_attr_fastpoll_timeout_max = ZB_ZCL_POLL_CONTROL_FAST_POLL_TIMEOUT_MAX_DEFAULT_VALUE;
/* Declare attribute list for Basic cluster. */
ZB_ZCL_DECLARE_BASIC_ATTRIB_LIST(IAS_SENSOR_basic_attr_list, &ias_sensor_attr_zcl_version, &ias_sensor_attr_power_source);
/* Declare attribute list for Identify cluster. */
ZB_ZCL_DECLARE_IDENTIFY_ATTRIB_LIST(IAS_SENSOR_identify_attr_list, &ias_sensor_attr_identify_time);
/* Declare attribute list for IAS Zone cluster. */
ZB_ZCL_DECLARE_IAS_ZONE_ATTRIB_LIST(IAS_SENSOR_iaszone_attr_list, &ias_sensor_attr_zone_state, &ias_sensor_attr_zone_type, &ias_sensor_attr_zone_status, &ias_sensor_attr_ias_cie_addr, &ias_sensor_attr_cie_short_addr, &ias_sensor_attr_cie_ep);
/* Declare attribute list for Poll Control cluster. */
ZB_ZCL_DECLARE_POLL_CONTROL_ATTRIB_LIST(IAS_SENSOR_WINDOW_pollctrl_attr_list, &ias_sensor_attr_checkin_intvl, &ias_sensor_attr_longpoll_intvl, &ias_sensor_attr_shortpoll_intvl, &ias_sensor_attr_fastpoll_timeout, &ias_sensor_attr_checkin_intvl_min, &ias_sensor_attr_longpoll_intvl_min, &ias_sensor_attr_fastpoll_timeout_max);
/* Declare cluster list for IAS Zone device */
ZB_HA_DECLARE_IAS_ZONE_CLUSTER_LIST_COORD(ias_sensor_window_clusters, IAS_SENSOR_basic_attr_list, IAS_SENSOR_identify_attr_list, IAS_SENSOR_iaszone_attr_list, IAS_SENSOR_pollctrl_attr_list);
ZB_HA_DECLARE_IAS_ZONE_EP(ias_zone_ep, HA_IAS_ZONE_ENDPOINT, ias_sensor_window_clusters);
ZB_HA_DECLARE_IAS_ZONE_CTX(ias_zone_ctx, ias_zone_ep);
In the main function, I have used the following function calls:
UNUSED_RETURN_VALUE(ZB_MEMSET(&m_ias_sensor_device_ctx, 0, sizeof(ias_sensor_device_ctx_t))); /* Register callback for handling ZCL commands. */ ZB_ZCL_REGISTER_DEVICE_CB(ias_sensor_zcl_cmd_cb); ZB_AF_REGISTER_DEVICE_CTX(&ias_zone_ctx);
However, when the Zigbee device starts up, even though it is discovered by the coordinator as indicated by the event ZB_ZDO_SIGNAL_DEVICE_ANNCE, the registered callback 'ias_sensor_zcl_cmd_cb' is not called. I believe this means the device is not able to find the client poll cluster.
Could you please provide inputs to resolve this?
Regards,
Anusha