This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Stop advertising

Hi how to power off the ble after one advertising event ? i.e i want to stop advertising after one advertising event!

Parents
  • 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 ????

  • 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();
    

    }

Reply
  • 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();
    

    }

Children
No Data
Related