i got problem wher program cant go in while loop in main while advertising is running. Im using ble uart template. So was thinking to stop advertising when button is pressed but i didnt find solution noowher how to stop advertising. In beacon mode i can acces to while loop in main.
Here is my funtion to start advertising.
uint32_t err_code = ble_advertising_start(&m_advertising, BLE_ADV_MODE_FAST );
Now please verify the answer.
Also, for the benefit of others who may come along with a similar question, please describe how you solved it.