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!
I tried but with timer i couldnt get a single advertising event .(the timer yu mention is app_timer_start() rite??).when i tried with software delay the sleep current between each advertising is nearly 4 mA !!!!
Yes, I'm talking about app timer. How did you test that there was no advertising? You tried to receive them with central scanning for peripheral? Maybe central just missed this packets? Try to test your current consimption with oscilloscope and see if the advertising packets being sent.
hi I was capturing the current waveform through daQ .when i used apptimer_start() there is no advertising channels ..but when i used nrf_delay_us i can see the advertising channels clearly.but the problem is when i call sd_ble_gap_adv_stop the sleep current doesnt go to zero it forms a steady current of 4.3 mA. so i tried with system_off_mode_enter().And there is some sleep current of 4.3mA in between two advertisng events !
I think you do something wrong with timer init. Show me the test code that you're using. Or just show timer init part, and parts where you start advertising, where you stop advertising and main loop.
The timer init is the default from the api. am using the battery timer for my use
int main(void) { // Initialize //leds_init(); timers_init(); gpiote_init(); buttons_init(); ble_stack_init(); bond_manager_init(); gap_params_init(); advertising_init(BLE_GAP_ADV_FLAGS_LE_ONLY_LIMITED_DISC_MODE); services_init(); conn_params_init(); sec_params_init();
// Start execution
advertising_start();
// Enter main loop
// nrf_delay_us(5000); app_timer_start(m_battery_timer_id, BATTERY_LEVEL_MEAS_INTERVAL, NULL);
sd_ble_gap_adv_stop();
//system_off_mode_enter();
}