I am developing based on ble_app_uart example of SDK12 for nRF51 DK and I need to switch BLE off completely when power disappears to save battery and switch back on when power is restored. How can I proceed?
In detail, I need answers to the following situations:
1) Power fails during active connection: how to detect that it is connected and how to disconnect the connection?
2) How can I then switch off BLE completely (stop advertising and switch radio off)?
3) What sequence should be called to restart advertising when power is back?