2026-01-15 11:09 AM
Hi,
I'm building a BLE application using custom template in STM32CubeMX. I have two services. The first one has only one characteristic with the properties "Read" and "Write without response". The second service has two characteristics, both with "Read" and "Notify" properties.
The code generated in "custom_app.c" have the function:
void Custom_<Srv2Char1>_Update_Char(void){...}
void Custom_<Srv2Char1>_Send_Notification(void){...}
void Custom_<Srv2Char2>_Update_Char(void){...}
void Custom_<Srv2Char2>_Send_Notification(void){...}However, no function is generated for the characteristic of the first service. I expected to have a function like this:
void Custom_<Srv1Char1>_Update_Char(void){...}
I performed some tests:
In both cases, no "Update_Char" function was generated.
I don’t know if this behavior is correct. If it is, how am I supposed to respond to a "Read" request?
Here’s what I’m doing:
void Custom_STM_App_Notification(Custom_STM_App_Notification_evt_t *pNotification)
{
switch (pNotification->Custom_Evt_Opcode)
{
...
...
case CUSTOM_STM_<Srv1Char1>_READ_EVT:
...
Custom_STM_App_Update_Char(CUSTOM_STM_<Srv1Char1>, (uint8_t*) UpdateCharData);
...
break;
...
...
}
return;
}
Some other info:
Thanks!