I want to advertise only when GPIO pin is High. It should not Advertise when GPIO pin is Low.
I want to advertise only when GPIO pin is High. It should not Advertise when GPIO pin is Low.
You can do this by triggering an interrupt on a pin change, and call sd_ble_gap_adv_start()
or sd_ble_gap_adv_stop()
as appropriate in the interrupt handler.
You could probably make a simple demonstration by basing your code on for example the Beacon Transmitter Sample Application and looking at the Pin Change Interrupt Example.
On sd_ble_gap_adv_stop() device is getting restart. Following steps i am doing
On sd_ble_gap_adv_stop() device is getting restart. Following steps i am doing