How to Retrieve Supported Cluster List from a Zigbee End Device?

Hi,

How can I retrieve the complete list of supported input and output clusters for all endpoints on a Zigbee end device? I'm currently able to access the On/Off cluster for a plug, but I need to get the full list of supported clusters for the device.

Thanks in advance for your help!

  • static void send_simple_desc_req(zb_bufid_t buf)
    {
      if (!buf)
      {
        zb_buf_get_out_delayed(send_simple_desc_req);
      }
      else
      {
        zb_zdo_simple_desc_req_t *req;
        req = zb_buf_initial_alloc(buf, sizeof(zb_zdo_simple_desc_req_t));
        req->nwk_addr = 0; /* send to coordinator */
        req->endpoint = 5;
        zb_zdo_simple_desc_req(buf, simple_desc_callback);
      }
    }
    
    
    static void simple_desc_callback(zb_bufid_t buf)
    {
      zb_uint8_t *zdp_cmd = zb_buf_begin(buf);
      zb_zdo_simple_desc_resp_t *resp = (zb_zdo_simple_desc_resp_t*)(zdp_cmd);
      zb_uint_t i;
     
      TRACE_MSG(TRACE_APS1, "simple_desc_resp: status %hd, addr 0x%x",
                (FMT__H, resp->hdr.status, resp->hdr.nwk_addr));
      if (resp->hdr.status != ZB_ZDP_STATUS_SUCCESS || resp->hdr.nwk_addr != 0x0)
      {
        TRACE_MSG(TRACE_APS1, "Error incorrect status/addr", (FMT__0));
      }
     
      TRACE_MSG(TRACE_APS1, "simple_desc_resp: ep %hd, app prof %d, dev id %d, dev ver %hd, input count 0x%hx, output count 0x%hx",
                (FMT__H_D_D_H_H_H, resp->simple_desc.endpoint, resp->simple_desc.app_profile_id,
                 resp->simple_desc.app_device_id, resp->simple_desc.app_device_version,
                 resp->simple_desc.app_input_cluster_count, resp->simple_desc.app_output_cluster_count));
     
      TRACE_MSG(TRACE_APS1, "simple_desc_resp: clusters:", (FMT__0));
      for(i = 0; i < resp->simple_desc.app_input_cluster_count + resp->simple_desc.app_output_cluster_count; i++)
      {
        TRACE_MSG(TRACE_APS1, " 0x%hx", (FMT__H, *(resp->simple_desc.app_cluster_list + i)));
      }

    I used this example but not worked nrf restarted and getting below error

    [00:00:05.834,136] <inf> app: 0
    [00:00:05.878,356] <err> zboss_osif: ZBOSS fatal error occurred

  • Hi i able to get cluster list using this example but how to get device endpoint currenlty i am using 1 for endppint and device short address for nwk_addr

  • Hi,

    To get all endpoints you can send an Active Endpoint request using zb_zdo_active_ep_req().

    Best regards,
    Marte

Related