Hi how to power off the ble after one advertising event ? i.e i want to stop advertising after one advertising event!
Hi how to power off the ble after one advertising event ? i.e i want to stop advertising after one advertising event!
Don't know if it will work, but try this:
Why not set the advertising timeout to a value less than your advertising interval. Then when the stack returns the BLE_GAP_EVT_TIMEOUT event with a source of BLE_GAP_TIMEOUT_SRC_ADVERTISEMENT you can then do your power off work.
It is possible that sd_ble_gap_adv_start may check to ensure that the timeout is longer than the interval and return an error in which case this won't work. Otherwise I think it is a simple solution.
It will work only with advertising interval > 1 second because minimum advertising timeout value is 1 second.
Thankyou guys ! i tried with advertising start den some delay of 4 ms (using nrf_delay_us()) den power off (sleep ) !.now i can see the current waveform with one advertising ! now i have to try whether master control panel can detect my device or not !!
note: is it right using nrf_delay instead of setting a timer ????
You can do it with nrf_delay for test purpose.