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

wants to know that device will go sleep or it just stop advertise after timeout occurs

Hi i am using nrf52840 DK and i am trying out sleep_mode after timeout happens. but i had a doubt in ble_adv_evt_idle i.e if i use this case the device goes into sleep and i fi use ble_adv_evt_fast then after timeout i could not able see any advertisement packet. is so because device gone into sleep or system is still on but advertisement is not happening.

Parents
  • Hi

    Due to the Easter holiday we are understaffed and you will have to expect delayed replies. Sorry for the inconvenience!

    ble_adv_evt_idle does not make your device go to sleep. To make your device go to sleep, use the __WFE function for example. The rest of your question I am having some trouble understanding. Does your device not start advertising after the connection with the central times out? Try resetting the central to confirm whether or not the peripheral device is the problem.

    Best regards and happy Easter,

    Simon

  • Thanks for you reply. Actually in ble_app_uart peripheral there is an function called on_adv_evt in that two switch cases were defined one is BLE_ADV_EVT_FAST and another one BLE_ADV_EVT_IDLE. so the example code starts advertising and i reduce the timeout from 180sec to 10sec. After the timeout i cannot able to discover any advertisement in my nrfConnect app. so i want to advertise till timeout then go to sleep then wake up and advertise. i have read some post recently and what they said was use RTC1 timer to wake up device, if so tell me how to use rtc timer or suggest me some examples and i am trying to implement system_power_on() instead of system_power_off to run cpu but if i change to system_power_on() compile error as undefined system_power_on(nrf SDK 15.3.0). Tell me is there any alternative function to make cpu on while sleep.

Reply
  • Thanks for you reply. Actually in ble_app_uart peripheral there is an function called on_adv_evt in that two switch cases were defined one is BLE_ADV_EVT_FAST and another one BLE_ADV_EVT_IDLE. so the example code starts advertising and i reduce the timeout from 180sec to 10sec. After the timeout i cannot able to discover any advertisement in my nrfConnect app. so i want to advertise till timeout then go to sleep then wake up and advertise. i have read some post recently and what they said was use RTC1 timer to wake up device, if so tell me how to use rtc timer or suggest me some examples and i am trying to implement system_power_on() instead of system_power_off to run cpu but if i change to system_power_on() compile error as undefined system_power_on(nrf SDK 15.3.0). Tell me is there any alternative function to make cpu on while sleep.

Children
No Data
Related