2020-06-17 08:32 AM
I am trying HandsOn4 example for STM32WB55 using firmware version 1.7. The one I am following is based on firmware 1.0. STM32CubeMX with firmware 1.7, has changed the code generation making the original hands on example even more difficult to follow. Is there any sample code showing the generation of custom BLE server services and characteristic. The example I am building seems to be working but when running fails to get any service events when the client tries to access any of the service characteristics.
Function: void Custom_APP_Notification(Custom_App_ConnHandle_Not_evt_t *pNotification)
seems to be called whenever I connect or disconnect, but function: void Custom_STM_App_Notification(Custom_STM_App_Notification_evt_t *pNotification) which may be used whenever I try to access a service characteristic is not called. The function is not even linked I believe. It may be it needs registering, so I am sure I am missing something. Any hints will be appreciated.
2020-06-17 11:06 AM
Done some more debugging. It seem that i getting some kind of an event in function.
static SVCCTL_EvtAckStatus_t Custom_STM_Event_Handler(void *Event) , in file custom_stm.c which is generated by STM32CubeMX
This might look like the event i am looking for. I use "ST BLE Sensor" phone app to test BLE connection and services.
2020-06-17 11:51 AM
Done some more debugging, and it looks like the write payload i issue at the phone appears to be part of the "void *Event" pointer I get when the event function static SVCCTL_EvtAckStatus_t Custom_STM_Event_Handler(void *Event) is called. I think in this function I need to escalate the payload to the application layer through the function void Custom_STM_App_Notification(Custom_STM_App_Notification_evt_t *pNotification) I mentioned in my first post.