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

Why ble_app_uart_c stops scanning after some time?

Hello, I am running ble_app_uart_c example on nrf52832 IC. It is connecting to its corresponding peripheral and I achieved bidirectional communication.

The problem is, if peripheral is not available for long time(4 to 5 hours), my central device stops scanning. My peripheral device might come into central's scanning area at any point of time. So I want my central device to scan for peripherals all the time.

What are the corresponding changes need to be done to achieve the above scenario?

Parents
  • Advertising is only open for 3 minutes, configurable by a define in main.c but looks like 180s is max. After that, device powers down. You can wake it up with any button press on the nRF51DK board and it will boot again and start advertising.

    If you want it to continuously advertise I think you need to catch the advertising finished event and instead of powering down, restart advertising.

Reply
  • Advertising is only open for 3 minutes, configurable by a define in main.c but looks like 180s is max. After that, device powers down. You can wake it up with any button press on the nRF51DK board and it will boot again and start advertising.

    If you want it to continuously advertise I think you need to catch the advertising finished event and instead of powering down, restart advertising.

Children
Related