2024-01-05 10:00 AM
Hi there,
I explored the attribute reporting topic based on my initial question, which you can find here: [link]. I gained a better understanding of how the feature operates.
Currently, in my setup, the Client pretends to be a Zigbee End device, and the Server acts as a Zigbee Coordinator with simulated or dummy RMS Voltage and Current values. I've configured Attribute Reporting on the End Device side (Client). So, whenever there's a change in attributes on the Server side (Coordinator), it reports to the Client. (Check the attachments for the Client and Server applications.)
#1 Objective:
My goal is to have the Zigbee Coordinator (acting as the Client) fetch Voltage and Current attribute data from the Zigbee End device (acting as the Server). Despite trying various combinations, I faced challenges and haven't succeeded.
I would be grateful if you could take a look at my attachments and offer suggestions on how to move forward to accomplish #1.
Could you also provide some idea on below parameters to use for the Coordinator and End device? and what is this finding & binding?
* attribute in the "Startup Parameters Attribute Set" */
enum ZbStartType {
ZbStartTypePreconfigured = 0x00, /**< (0x00) Preconfigured. No explicit form, join or rejoin to be performed. */
ZbStartTypeForm = 0x01, /**< (0x01) Form network */
ZbStartTypeRejoin = 0x02, /**< (0x02) Rejoin network */
ZbStartTypeJoin = 0x03, /**< (0x03) Join network */
/* Exegin add-ons (Internal use only) */
ZbStartTypeTouchlink = 0xfd, /**< [Internal stack use only] Touchlink */
ZbStartTypeFindBind = 0xfe, /**< [Internal stack use only] Finding & Binding */
ZbStartTypeNone = 0xff /**< [Internal stack use only] None */
};
--
Thanks & Regards,
Naani Ch
2024-01-08 07:09 AM - edited 2024-01-08 07:10 AM
Hello @naanichilakalapudi,
First, let me give you some remarks that I noticed looking at your attached files :
- The cluster defined is ZCL_CLUSTER_MEAS_ELECTRICAL should use the right API functions for allocation as ZbZclElecMeasClientAlloc and ZbZclElecMeasServerAlloc, for your setup, you are using ZbZclDevTempServerAlloc dedicated for Device Temperature Configuration Cluster
From "client.c" file, the device is configured as a router, not as an end device or sleepy end device, please follow the steps in this User Manual (chapter 3) to complete the configuration as an End Device.
To configure the attribute reporting from the client side, the function ZbZclAttrReportConfigReq need to be performed for each attribute with the corresponding configuration ( frome the file "client.c" the configuration is done twice, and the function is called only one time taking into account ZCL_ELEC_MEAS_ATTR_RMS_CURR attribute)
Answer #1 :
To achieve your goal, you have to switch the roles as follow :
Coordinator: is acting as a client, so in the "client.c" file you have to change the line config.startupControl = ZbStartTypeJoin by config.startupControl = ZbStartTypeForm; so the device is considered as a coordinator.
You have to use ZbZclElecMeasServerAlloc API for the cluster allocation instead ofZbZclDevTempClientAlloc.
End Device : is acting like a server, so in the file "server.c", you have to change the line config.startupControl = ZbStartTypeForm by config.startupControl = ZbStartTypeJoin and then follow steps to configure the end device as described previously.
Find & Bind feature:
This feature is an automatic process making the communication between clusters very simple and it's based on the ZCL identify cluster, for more details you can refer to the following AN: Commissioning Guide
Best regards,
Ouadi
2024-01-08 07:42 AM
I see you received quite an expensive reply from Ouadi.
In addition to that, the forum moderator had marked your post as needing a little more investigation and direct support. An online support case has been created on your behalf, please stand by for just a moment and you will hear from us.
Regards,
Billy