ZCL Attributes Reporting

I am working on a zigbee Coordinator and have successfully able to perform most of the operations on the end device (thermostat which is custom developed) including read and write of multiple attributes. Now would like to receive reporting data from the end device. I have a few doubts regarding the same and any info regarding that will be highly helpful.
    1. Is it mandatory to send a bind request from coordinator to end device in order to enable reporting of a specific attribute? Or is there an alternative where the end device can do local binding without a bind request from Coordinator? The reporting attributes are already configured in the end device and have tested the same in third party coordinators such as deconz.
    2. If bind request from coordinator is mandatory, can you point me to any resources, possibly some sample codes which can help me to do the same.
    3. If local binding on the end device is possible, any help regarding how it can be done.
we are using nrf Connect SDK V2.1.0, on nrf52840
Parents Reply
  • Hello,

    Sorry if I wasn't being clear. The purpose of sending the nRF5 SDK links was that they describe with some samples how to use the command line sample, which was called the "cli" sample in the nRF5 SDK, and "Zigbee shell" in NCS (nRF Connect SDK). So the purpose was for you to test it on NCS, but instead of having to read through the documentation of the CLI commands to figure out how to enable subscriptions, you could use the guide from the old SDK. 

    And I know that those descriptions/guides says to use "bdb role zc", which would set the device in the coordinator role, but I was thinking you could try it with "bdb role zr", to use it as a router. Please note that you need another device acting as the networks coordinator.

    My claim is that you don't need to be the coordinator to do this. 

Children
  • Edvin,

              The aim here is to get reporting data from end device. I can now send bind request from zigbee coordinator to end device. But the end device responds with status not supported. When i am testing with third party coordinator such as deconz, I am able to receive bind response with status success.I am attaching the wireshark logs of deconz and our zigbee coordinator. Comparing the wireshark logs, the difference I can see is that the source and destination addresses are interchanged with respect to deconz log. So I also tried interchanging the source and destination addresses in my code, but then I was not able to send the bind request. I have also attached the code for your reference. What is the correct way to send bind request?

    int SendBindReq()
    {
    
    	zb_ret_t zb_err_code;
    	zb_err_code = (zb_buf_get_out_delayed(send_bind_req));
    	if (!zb_err_code)
    	{
    		LOG_DBG("Buffer is full");
    	}
    	return zb_err_code;
    }
    
    
    
    void send_bind_req(zb_uint8_t param)
    {
     zb_bufid_t buf = param;
     zb_zdo_bind_req_param_t *req;
     TRACE_MSG(TRACE_APP2, ">> bind_device param %hd", (FMT__H, param));
     req = ZB_BUF_GET_PARAM(buf, zb_zdo_bind_req_param_t);
     ZB_MEMCPY(&req->src_address, arr1, sizeof(zb_ieee_addr_t));
     req->src_endp = ZIGBEE_COORDINATOR_ENDPOINT;
     req->cluster_id = ZB_ZCL_CLUSTER_ID_THERMOSTAT;
     req->dst_addr_mode = ZB_APS_ADDR_MODE_64_ENDP_PRESENT;
     req->dst_endp = ENDDEVICE_END_POINT;
     req->req_dst_addr = dev_ctx.dev_addr.short_addr;
     zb_zdo_bind_req(param, zb_bind_callback);
     TRACE_MSG(TRACE_APP2, "<< bind_device", (FMT__0));
    }
     
    void zb_bind_callback(zb_uint8_t param)
    {
     zb_bufid_t buf = param;
     zb_zdo_bind_resp_t *bind_resp = (zb_zdo_bind_resp_t*)zb_buf_begin(buf);
     
     if (param)
     {
     zb_buf_free(buf);
     }
    }

  • Hello,

    Sorry for the late reply. Quite some backlog after the Easter holidays. 

    Let us fix this now.

    What is the difference between the two sniffer traces? As far as I can tell, it is the coordinator sending the bind request in both cases, but it was only accepted in one of them? I assume you don't have the source code of the deconz device? And that it doesn't use the same stack?

    Is it possible to send the pcapng files, so that I can look at the packets?

    Best regards,

    Edvin

  • Edvin,

               I interchanged the source and destination address and also the endpoints in my code. I am now able to send bind request and got bind response as success. Thank you.

Related