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

look for sample code for reconnect to bonded devices and share the encryption keys.

Hi, I am looking for sample code that can reconnect to bonded devices and share the encryption keys with DFU-OTA. 

I have worked using DFU-OTA (JUST_WORKS option); I question is:

1. My device does not have a keyboard to inter passkey; is there any other way that I can do?

2. After I connect and bounded the device; how do I share the encryption key to DFU; and restart without rebound this device?

I am using nRF52840-DK; Windows 10; Embedded Studio SD: s140_nrf52_6.0.0_softdevice SDK 15.0.0

Please help.

Donald

Parents
  • Hi Bjørn, 

    Before I try what you told below, I have one question for you:

    I tried to test C:\Nordic_Semi\Gen4_BLE0106\examples\ble_peripheral\ble_app_gls

    using nRF Connect v3.3.0

    1. Buit project and downloaed to nRF52840 -DK

    2. Using nRF Connect to connect the device

    3. Pair and bonded the device

    4. Disconnected the device

    5. It can NOT connect the device again.

    6. Power cycled device; I can see the device; but got error to connect with it.

    I am using SDK 15.0.0; nRF52840 -DK; I can't reply you answer below.

    Please see my screenshots attached with this reply.

  • Hi Donald, 

    Apologies for the late reply.

    You need to set the Security Parameters for nRF Connect to support Bonding. Click the gear wheel and select Security Parameters

    Then tick off Perform Bonding and click Apply.

    Then connect to the Nordic Glucose app and enter the passkey and you should see the devices bonding. You should also be able to disconnect and reconnect without re-entering the passkey. 

    Best regards

    Bjørn

  • Hi, Bjorn:

    Thanks for your response.

    I tried a couple; but got different response with you:

    1. Set the Security Parameters for nRF Connect to support Bonding:

    2. Tried to connect Glucose; got error:

    3. No Pop-up window to entry passkey; no message in Putty window.

    Question: Which SDK do you use? I am using SDK 15.0.0?

    Donald

Reply Children
  • Hi Donald, I was using SDK 16.0.0. 

    I am seeing issues with bonding enabled in nRF Connect on Desktop and the ble_app_gls example in SDK v15.0.0. It seems that nRF Connect for Desktop is trying to perform pairing regardless if the nRF52840 was bonded previously , which the  nRF52840  rejects with error code BLE_GAP_SEC_STATUS_PAIRING_NOT_SUPP(0x85). This seems to be an issue with nRF Connect for Desktop as I do not see the issue with nRF Connect for Android/iOS. 

    Best regards

    Bjørn

Related