2025-02-09 08:53 AM
Hi,
I want to report two code generation bugs in Cube MX for Zigbee projects:
I hope you can follow what I mean and fix those bugs. Thanks
Solved! Go to Solution.
2025-02-10 05:29 AM
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
2025-02-10 05:29 AM
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
2025-02-10 09:46 AM
2025-02-17 04:46 AM
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
2025-02-18 09:06 AM
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
2025-02-19 04:52 AM
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