STM32WB55 - Update Characteristic and send a Notification
Hello,
I am pretty new to BLE-Application and trying to build my first own app using the STM-BLE-Stack.
I've been writing about my process in a previous thread (https://community.st.com/t5/stm32-mcus-wireless/stm32wb-ble-update-char-from-main-c/m-p/589220#M16405), but want to be more precise now.
My STM32 should work as server and send sensor data to a client, at first just a smartphone using the BLE Toolbox application.
I generated a project according to ST's YouTube-Tutorial (https://www.youtube.com/watch?v=CKYWy7LKL68&list=PLnMKNibPkDnG9JRe2fbOOpVpWY7E4WbJ-&index=16) and can read and write to my characteristics from my smartphone.
Now I want to update a BLE-characteristic from my main application, i.e. main.c. I want to transfer sensor data and send a notification to my client that new data is available.
I know about the functions
aci_gatt_update_char_value()
and in my case (cause I used the custom template)
Custom_STM_App_Update_Char()
, but they are causing HardFaults if I'm calling them in my main-loop.
Can you help me to find the simpliest way to transfer custom data using the BLE interface and triggering a notification that new data is available from the main-function?
Many thanks in advance :)
