I have a beacon type running firmware. My system should start advertising when I press button A. and then stop when I press button B. So here is the scenerio:
Scene 1:Press button A(ok), press button B(error/restart) Scene 2:Press button A(ok), press button B(ok), press button A(error/restart)
I read a lot of these in the forums but cannot find how to properly resolved the issue. Like, stopping the advertisment when it is not advertising, but, how should I know if its in advertising state or not.
Is there any other way to implement this or other function to call. Thank you very much.