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

Reconnect Automatically after bonding

Hi,

In my application,for the first time device (nrf52832)will start advertising and on nrfconnect for mobile application side we make it get connected and bonded.It may get disconnected, after certain functionality or due to bluetooth disable or battery down.for the next time when i try to connect, if device is advertising as it is already bonded then I must be able to connect automatically  from nrfconnect for mobile app.

For my requirement ,development to be done on application side(device) or nrfconnect for mobile?If it is to be done on application side please let me know how it can be implemented?Is there any example already present is SDK15.3.0 serving the above purpose?If yes, please let me know in which example it is done?

My attempts to solve above involved trying CTS example where it is using whitelisting for the next connection.But there user has to manually connect. Whitelisting provides chance of skipping scanning functionality in CTS example.Did I understand it right?If yes,along with skipping scanning functionality after once getting bonded I always want to get connected automatically if device is advertising.

Thank you.

  • Hi, 

    The Central BLE Heart Rate Collector Example implements bonding and whitelist. You can find the example in the folder <SDK_InstallFolder>\examples\ble_central\ble_app_hrs_c. In order to Initiate bonding the central calls the function pm_conn_secure()

    -Amanda H.

  • Thank you for your response.As per your suggestion I thought  of going through implementation by testing BLE Heart Rate Collector Example but In testing procedure it is mentioned that two boards are required.I have only one DK.And more likely In my requirement I should be able to test using one DK(advertising) and nRFConnect(scanning) mobile app.Is that possible to test?If yes, let me know how it can be done?If no,please Guide me how to approach for such implementation.

  • You can have a look at the heart rate example in the SDK. After you have connected to the device using nRF Connect, you can bond by pressing the three dots in the upper right corner then bond.

    -Amanda H.

  • Hi,

    When I tried following test procedure of heart rate example  I am stuck at "2. Click the settings button, select "Security Settings", check "Enable LE Secure Connection pairing", and click "Apply" ".As I am unable to find security settingd in both iOS and Android  nRFConnect mobile app.where is this Security Settings present in mobile app?

    Thank You.

  • Hi, 

    Those instructions are for nRF Connect for Desktop. If you want to test with mobile phones, you should use the nRF Toolbox app. Please see nRF5 SDK v15.3.0: Heart Rate Application:

    Test the Heart Rate Application with the nRF Toolbox app, which is available on both iOS (App Store) and Android (Google Play).

    -Amanda 

1 2 3