Cube MX Bug report for Zigbee Projects
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-02-09 8:53 AM
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
Solved! Go to Solution.
- Labels:
-
Bug-report
-
STM32CubeMX
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-02-10 5: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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-02-10 5: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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-02-10 9:46 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-02-17 4: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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-02-18 9: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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-02-19 4: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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-02-22 10:44 AM
Hello Ouadi, I have encountered one more problem with CubeMX that I would consider a bug and need halp.
I have a new Computer with new Toolchain install and when I opened my CubeMX project I was asked to migrate the project from STM32Cube_FW_WB_V1.20.0 to STM32Cube_FW_WB_V1.21.0, which I did.
However, now I get erros like the following:
C:/Users/valen/STM32Cube/Repository/STM32Cube_FW_WB_V1.21.0/Middlewares/ST/STM32_WPAN/zigbee/core/src/zigbee_core_wb.c:3704:14: error: 'MSG_M0TOM4_STARTUP_FINDBIND_EP_CB' undeclared (first use in this function); did you mean 'MSG_M0TOM4_STARTUP_FINDBIND_CB'?
3704 | case MSG_M0TOM4_STARTUP_FINDBIND_EP_CB:
C:/Users/valen/STM32Cube/Repository/STM32Cube_FW_WB_V1.21.0/Middlewares/ST/STM32_WPAN/zigbee/core/src/zigbee_core_wb.c:644:20: error: 'MSG_M4TOM0_STARTUP_FINDBIND_EP' undeclared (first use in this function); did you mean 'MSG_M4TOM0_STARTUP_FINDBIND'?
644 | ipcc_req->ID = MSG_M4TOM0_STARTUP_FINDBIND_EP;
To be able to continue working, I reverted my repository and tried to continue with the older Version of the FW package.
CubeMX tried to download it and unpack, which took very long and ended in the white screen.
Therefore, I can no longer use my project and need support on how to solve this.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-02-23 6:31 AM - edited ‎2025-02-23 6:32 AM
Hello,
A new version of STM32CubeMX v6.14 will be released very soon with some enhancements.
Regarding your issue, CubeMX will be based on the pack STM32Cube_FW_WB_V1.21.0 to migrate the project with the new dependances as "Middlewares" , if you get some errors, I assume that the pack STM32Cube_FW_WB_V1.21.0 is missing some files and I recommend to redownload it manually from our official website : https://www.st.com/en/embedded-software/stm32cubewb
MSG_M0TOM4_STARTUP_FINDBIND_EP_CB should be declared in the file : /STM32Cube_FW_WB_V1.21.0/Middlewares/ST/STM32_WPAN/zigbee/core/inc/stm32wbxx_core_interface_def.h
Best regards,
Ouadi
