How to take control of when the STM32WB's BLE is advertising?
To utilize the STM32WB's BLE capabilities we must enable STM32WPAN in peripherals in CUBEMX. Doing so will add the BLE template "p2p_server_app" to your project. This template by default will call APPE_Init() in your main which will in turn call the following ACI API functions to advertise your device over BLE.
- aci_gap_set_discoverable()
- aci_gap_set_non_discoverable()
- aci_gap_update_adv_data()
My question is how do I access CUBEMX generated parameters, such as "local_name" and "manuf_data" and that are inserted into "app_ble.c" (located STM32_WPAN -> APP) in my own calls to the listed ACI API functions.
More broadly my question is really, what is the best method of implementing control of the BLE connections my STM32WB is making. Should it be done inside of the files generated by CUBEMX such as for registration of tasks using the sequencer inside of "p2p_server_app.c" or is it fine to just do it inside my own custom files?
Ref: AN5289