Skip to main content
LucaP
Associate II
November 13, 2025
Question

CubeMX no longer generates BLE Notification functions

  • November 13, 2025
  • 2 replies
  • 358 views

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!

2 replies

Technical Moderator
November 13, 2025

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.
LucaP
LucaPAuthor
Associate II
November 18, 2025

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! 

Technical Moderator
November 26, 2025

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.
LucaP
LucaPAuthor
Associate II
November 13, 2025

Of course, here it is!