cancel
Showing results for 
Search instead for 
Did you mean: 

How to periodically turn on and off the BLE advertising on the STM32WBA5CG?

Henry_BLE
Associate II

Hello, I'm very new to BLE. I'm following STM example code.

I want to be able to run on battery and turn on the BLE to advertise for 5 minutes then stop. After an interrupt, I want to be able to turn on advertising again.

In the STM32WBA Bluetooth® LE – Serial communication - stm32mcu Example, i found in main while loop, there is  MX_APPE_Process(); which initiates BLE. 

I want to implement something like:

switch (...) {

    case 0: // walking

            MX_APPE_Process();
    case 1: // stationary
            // Turn off advertising
}
How should I do. Please support me.
            

0 REPLIES 0