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, Bjorn:

    1. I tried to use mobile nRF Connect and nRF Toolbox; both not be able to connect the device, see attachment pictures.

    2. Since I can't make SDK 15.0.0 work; I tried to use SDK 16.0.0; but see some issues; I do not have same issues when I build DFU using SDK 15.0.0; please attached document.

    Thanks,

    Donaldbuttonless_dfu_build_stepsSDK16.docx 

  • Hi Donald, 

    After step 11 you see leds 1 and 2 on the nRF52840 DK right? You have flashed the SoftDevice and the bootloader and the bootloader settings, but no application. When you flash the settings, you basically tell the bootloader that there is a valid application that should be started. So when you start the DK it will jump to the bootloader, which examines the settings and it then jumps to the application that it thinks is present. Since there is no application, the nRF52840 will likely hardfault, reset and then start the process over again. Thats probably why you see the leds being on all the time.

    So try to flash the application after the bootloader and the settings are flashed, i.e.

    nrfjprog.exe -e

    nrfjprog.exe --program s140_nrf52_7.0.1_softdevice.hex --verify

    nrfjprog.exe --program settings1_and_bootloader1.hex --verify 

    nrfjprog.exe --program ble_app_buttonless_dfu_pca10056_s140.hex --verify --reset

Reply
  • Hi Donald, 

    After step 11 you see leds 1 and 2 on the nRF52840 DK right? You have flashed the SoftDevice and the bootloader and the bootloader settings, but no application. When you flash the settings, you basically tell the bootloader that there is a valid application that should be started. So when you start the DK it will jump to the bootloader, which examines the settings and it then jumps to the application that it thinks is present. Since there is no application, the nRF52840 will likely hardfault, reset and then start the process over again. Thats probably why you see the leds being on all the time.

    So try to flash the application after the bootloader and the settings are flashed, i.e.

    nrfjprog.exe -e

    nrfjprog.exe --program s140_nrf52_7.0.1_softdevice.hex --verify

    nrfjprog.exe --program settings1_and_bootloader1.hex --verify 

    nrfjprog.exe --program ble_app_buttonless_dfu_pca10056_s140.hex --verify --reset

Children
No Data
Related