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!
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.
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.