cancel
Showing results for 
Search instead for 
Did you mean: 

Cube MX Bug report for Zigbee Projects

vh789
Associate III

Hi, 

I want to report two code generation bugs in Cube MX for Zigbee projects:

  • Color Control: having a color control functionality requires to fill out capabilities, such as XY or HS color settings. Those capabilites are not saved when regenerating the project, even though there is a custom code field
  • Moisture Sensor: for moisture sensor, the Endpoint ID is not saved, e.g. I use 3 endpoints with moisture sensors and after each regeneration they use Endpiont 2 instead of 2,3,4

I hope you can follow what I mean and fix those bugs. Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Ouadi
ST Employee

Hello @vh789,

Thank you for this report.

Can you please mention the version of CubeMX you are using and join the IOC file to analyze ?

Best regards,

Ouadi

View solution in original post

5 REPLIES 5
Ouadi
ST Employee

Hello @vh789,

Thank you for this report.

Can you please mention the version of CubeMX you are using and join the IOC file to analyze ?

Best regards,

Ouadi

vh789
Associate III

I have used the version 1.17.0 and here is attached my ioc file.

Greetings

Hi @vh789

Thanks for sharing your IOC file.

I regenerated the source code based on the provided IOC file with CubeIDE v1.17.0 and the result was as expected. 

Color Control cluster : the cluster is configured on Endpoint 20, only colorControl_server_1_move_to_color_xy is enabled :

Generated code : 

#define SW1_ENDPOINT                                20 
/* ColorControl server */
  struct ZbColorClusterConfig colorServerConfig_1 = {
    .callbacks = ColorServerCallbacks_1,
    /* Please complete the other attributes according to your application:
     *          .capabilities           //uint8_t (e.g. ZCL_COLOR_CAP_HS)
     *          .enhanced_supported     //bool
     */
    /* USER CODE BEGIN Color Server Config (endpoint1) */
    /* USER CODE END Color Server Config (endpoint1) */
  };
  zigbee_app_info.colorControl_server_1 = ZbZclColorServerAlloc(zigbee_app_info.zb, SW1_ENDPOINT, zigbee_app_info.onOff_server_1, NULL, 0, &colorServerConfig_1, NULL);
  assert(zigbee_app_info.colorControl_server_1 != NULL);
  ZbZclClusterEndpointRegister(zigbee_app_info.colorControl_server_1);

Same for Water content measurement, the code generated is aligned with the configuration, it uses 3 endpoint as expected.

Did you get the same result ? if yes, what is the issue ? 

Regards,

Ouadi 

 

vh789
Associate III

Hello Ouadi, thanks for trying it.

In my project, I have to place capabilities in the user code below. However, they get removed when regernating the project.

 

  struct ZbColorClusterConfig colorServerConfig_1 = {
    .callbacks = ColorServerCallbacks_1,
    /* Please complete the other attributes according to your application:
     *          .capabilities           //uint8_t (e.g. ZCL_COLOR_CAP_HS)
     *          .enhanced_supported     //bool
     */
    /* USER CODE BEGIN Color Server Config (endpoint1) */
    /* USER CODE END Color Server Config (endpoint1) */
  };

 

  Regarding the water content sensors, they are configured in endpoints 21-23 (which equals the defines SW2_ENDPOINT-SW4_ENDPOINT. However, the endpoint regstrations use SW1_ENDPOINT.

 

 

 

zigbee_app_info.water_content_server_2 = ZbZclWaterContentMeasServerAlloc(zigbee_app_info.zb, SW1_ENDPOINT, ZCL_CLUSTER_MEAS_HUMIDITY, HUMIDITY_MIN_2, HUMIDITY_MAX_2);
//...
zigbee_app_info.water_content_server_3 = ZbZclWaterContentMeasServerAlloc(zigbee_app_info.zb, SW1_ENDPOINT, ZCL_CLUSTER_MEAS_HUMIDITY, HUMIDITY_MIN_3, HUMIDITY_MAX_3);
//...
zigbee_app_info.water_content_server_4 = ZbZclWaterContentMeasServerAlloc(zigbee_app_info.zb, SW1_ENDPOINT, ZCL_CLUSTER_MEAS_HUMIDITY, HUMIDITY_MIN_4, HUMIDITY_MAX_4);

 

Thanks

 

Hello @vh789,

You are right, I reported the issue under an internal ticket number 203588.

The issue will be fixed in the upcoming releases.

Thanks and best regards,

Ouadi