Pairing

I'm developing two products that will communicate via ble_uart. Both products have battery, so I need to reduce consumption as much as possible. I'm currently using nrf52832 with SDK 16.0. I have a doubt about how the two devices should work so that I have a lower battery consumption, I will better describe the scenario so that you can give me some suggestions.

Both devices trigger sleep_mode_enter after a period of non-use. The central device has a button that, when pressed, wakes up and sends via ble_uart to the peripheral device. However, when falling asleep, the micro central loses the connection with the peripheral. Am I doing something wrong with this part or is that it? If this behavior is normal, how can I make the device when waking up to do a search for the device that was connected, I think it must be something like pairing between devices or something like that. Is there any example of this type of case within the SDK?

  • Hi Arthur, 

    Could you give more information about the application you are doing ? 
    How often the central and peripheral need to communicate with each other ? 

    Note that the way BLE connection is established and reestablished is that the peripheral needs to advertise and then the central can connect to it. 
    If the central wake up but the peripheral is not advertising, there is no way the central can re-connect to it. 

    So what you need to do on the Peripheral's side is to continue periodically advertise when in low power mode. This can draw more power but not necessary significant more power if you only advertise, say every 1 second. 

     Another option is to keep the connection all the time and only reduce the advertising interval so that you achieve low power when the connection is kept. If you do this, the sleep mode shouldnt be the deep sleep (disconnect) but only the idle_state_handle()/nrf_pwr_mgmt_run() function as in the examples in the SDK. 

Related