cancel
Showing results for 
Search instead for 
Did you mean: 

STM32WB55 zigbee reporting issue. How to enable automated reports of registered servers?

holy
Associate

Hello,

I've got an issue with STM32WB55

(ZigBee) reporting routines. I've successfully registered 3 servers

(temp_meas_server_1, temp_meas_server_2, water_content_server_1). I can easily

read the temperatures and the humidity from my ED using another ED (address

0x0000). The attributes data is refreshed every 1 second.

Unfortunately, there is no way to enable the BDB Reporting. The attribute list is as follows:

static const struct ZbZclAttrT ZclTemp_AttrList[] = {

     {

      ZCL_TEMP_MEAS_ATTR_MEAS_VAL, ZCL_DATATYPE_SIGNED_16BIT,

             ZCL_ATTR_FLAG_REPORTABLE,

             0,               // custom size

             NULL,            // callback

             {60, 120},

             {10, 20}

     },

       {

             ZCL_TEMP_MEAS_ATTR_MIN_MEAS_VAL, ZCL_DATATYPE_SIGNED_16BIT,

             ZCL_ATTR_FLAG_NONE,

             0,               // custom size

             NULL,            // callback

             {0, 0},

             {0, 0}

       },

       {

             ZCL_TEMP_MEAS_ATTR_MAX_MEAS_VAL, ZCL_DATATYPE_SIGNED_16BIT,

             ZCL_ATTR_FLAG_NONE,

             0,               // custom size

             NULL,            // callback

             {0, 0},

             {0, 0}

       },

 };

result = ZbZclAttrAppendList(zigbee_app_info.temperature_meas_client_1, ZclTemp_AttrList, ZCL_ATTR_LIST_LEN(ZclTemp_AttrList));

Then goes the report config:

result = ZbZclAttrReportConfigDefault(zigbee_app_info.temperature_meas_client_1, ZCL_TEMP_MEAS_ATTR_MEAS_VAL, 0, 0, (double *)&chg);

And binding:

result = ZbZclClusterBind(zigbee_app_info.temperature_meas_client_1, ENDPOINT_1, ZCL_PROFILE_HOME_AUTOMATION, ZCL_DIRECTION_TO_CLIENT);

The “result�? in binding is: ZCL_STATUS_INSUFFICIENT_SPACE

Any ideas, how to configure binding and reporting?

5 REPLIES 5
Remy ISSALYS
ST Employee

Hello,

Attribute reporting can be configured in several ways:

  •  Default attribute reporting configuration can be set on server side using cluster attributes list at cluster init or configured later on using ZbZclAttrReportConfigDefault.
  • Dedicated attribute configuration can also be set from client side using ZbZclAttrReportConfigReq.

In sample code you provided, default attribute reporting configuration for Temperature Measurement cluster, Measured Value attribute is as follow:

static const struct ZbZclAttrT ZclTemp_AttrList[] = {

    {

     ZCL_TEMP_MEAS_ATTR_MEAS_VAL, ZCL_DATATYPE_SIGNED_16BIT,

            ZCL_ATTR_FLAG_REPORTABLE,

            0,              // custom size

            NULL,           // callback

            {60, 120},

            {10, 20} => {min_report, max_report}

    },

With above configuration, Temperature Measurement Server will send attribute report to any bound Temperature Measurement Client.

  • Minimum reporting interval is set to 10 seconds.
  • Maximum reporting interval is set to 20 seconds.

As a result, Attribute report will be sent at least every 20 seconds if temperature does not change and no more than every 10 seconds if temperature changes.

Temperature Measurement Attributes are to be defined on server side. So, below code is wrong.

  • result = ZbZclAttrAppendList(zigbee_app_info.temperature_meas_client_1, ZclTemp_AttrList, ZCL_ATTR_LIST_LEN(ZclTemp_AttrList));

ZbZclAttrReportConfigDefault is to be used on server side, not on client side. So, below code is wrong.

If you want to configure attribute report from client side, you shall use ZbZclAttrReportConfigReq

  • ZbZclAttrReportConfigDefault(zigbee_app_info.temperature_meas_client_1, ZCL_TEMP_MEAS_ATTR_MEAS_VAL, 0, 0, (double *)&chg);

When calling ZbZclAttrReportConfigReq from client, Binding entry will be added on server side.

So, you do not have to call ZdoBindReq on client side or ZbApsmeBindReq on server side to add an entry in binding table.

Best Regards

Thanks for getting out from STM32WB55 zigbee server issue. Do you know how can we registered ourself in https://curiousdesire.com/types-of-backing-storage/ through which we integrated API ourself in our web application?

jboui.1
Associate II

Hello,

i am trying aswell to get reporting from a remote temperature sensor Server ( End device)

is use ZbZclAttrReportConfigReq to acheive it. I got a STATUS SUCCES in the callback but the device never send its temperature.

Can you tell me if i miss someting ? Here is my code

Best

	enum ZclStatusCodeT status;
 
	struct ZbZclAttrReportConfigT config;
 
	config.dst.mode = ZB_APSDE_ADDRMODE_SHORT;
	config.dst.nwkAddr = AT_GetParam1_hex();
	config.dst.endpoint = AT_GetParam2_hex();
 
	config.num_records = 1;
 
	config.record_list[0].direction = ZCL_REPORT_DIRECTION_NORMAL;
	config.record_list[0].attr_id = 0; // Temperature ID is Zero
	config.record_list[0].timeout_period = 30;
 
	config.record_list[0].attr_type = ZCL_DATATYPE_GENERAL_16BIT;
	config.record_list[0].min = 5;
	config.record_list[0].max = 10;
	config.record_list[0].change = 0.1;
 
	status = ZbZclAttrReportConfigReq(
			getAppInfo()->temp_meas_client,
			&config,
			AT_attReportCb,
			NULL
		);

Did you solve this? What's the solution to get attributes to report when changed?

Lizerd_
Associate II

@jboui.1did you find a solution for this problem ?
Best regards // Mike