2025-11-12 5:47 PM
Hello Community,
I have been working on a BLE project with one service and three characteristics, two of which have server notification properties, and I have noticed the following issue in CubeMX 6.15 (server side, custom template).
The function Custom_<CHAR_NAME>_Send_Notification() is no longer auto-generated in custom_app.c if the length is greater that the limit supported by aci_gatt_update_char_value(), which is (BLE_CMD_MAX_PARAM_LEN - 6).
In past CubeMX versions, any char with length greater that such limit genered of a function that internally called aci_gatt_update_char_value_ext(), which indeed supports chars up to 512:
void Custom_CHAR_Send_Notification(void) /* Property Notification */
{
uint8_t updateflag = 0;
/* USER CODE BEGIN Data_NS_1*/
updateflag = Custom_App_Context.Data_Notification_Status;
/* USER CODE END Data_NS_1*/
if (updateflag != 0)
{
Custom_STM_App_Update_Char_Ext(Connection_Handle, CUSTOM_STM_CHAR, (uint8_t *)NotifyCharData);
}
/* USER CODE BEGIN Data_NS_Last*/
/* USER CODE END Data_NS_Last*/
return;
}The latest CubeMX still generates the Send_Notification() function for shorter lengths, but as I soon and I change the length to 512 and re-generate code, the function disappears from custom_app.c. Without that, there is no way to send a notification to the client, unless I implement the function manually.
Am I missing something? Thanks!
2025-11-12 11:11 PM
Hello @LucaP ,
Let me thank you for posting.
For mor investigation, could you please provide your Ioc.File.
Thanks.
Mahmoud
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2025-11-13 6:21 AM
2025-11-18 6:29 AM
Hi @Mahmoud Ben Romdhane
I posted the IOC....could you please take a look if the same issue happens with you, when you have a chance?
Thanks!
2025-11-26 7:26 AM
Hello @LucaP ,
Could you please indicate which MX version generates the Custom_CHAR_Send_Notification function.
Thanks.
Mahmoud
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2025-11-26 9:18 AM
Both 6.15 and 6.15 do NOT generate the function with a char length exceeding 247, but I am 6.12 and 6.13 did. I do not have a 6.14 version to test the IOC on.
2025-11-27 7:11 AM
Hello @LucaP ,
Let me thank you for your interaction.
Your question is submitted to the development team through this Internal Ticket (Ticket Number: 222669).
I will keep you up to date until I have a response.
Thanks.
Mahmoud
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.