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

Updating one nRF52 DK board with another nRF52 DK board automatically via OTA DFU

I am trying to update on nRF52 DK board with another, separate nRF52 DK board using OTA firmware updates. Essentially, I am trying to replicate how the nRF Connect Desktop app flashes firmware onto these boards.

Here are the steps that I want to conduct:

  1. "First" nRF52 scans for "second" nRF52.
  2. If "second" nRF52 is present and advertising, connect to it.
  3. After connection, check for Buttonless Service.
  4. If service exists, send "second" nRF52 to DFU mode.
  5. "First" nRF52 will wait for "second" nRF52 to disconnect, then reconnect after it begins advertising again.
  6. "First" nRF52 will transmit the firmware update to "second" nRF52.
  7. "First" nRF52 will disconnect after the firmware update is successfully sent.

The dfu_transport_ble.py example provides a lot of this functionality. However, I am stuck on how to get the firmware image onto the "First nRF52" before the transmission begins.

I found a post asking a similar question that was posted in 2018, however, this post only mentions that the image needs to be stored on the DK, not how to actually do it.

Any help would be greatly appreciated.

Parents Reply Children
  • Hi,

    This implementation is from nrfutil, which is a python script running on a PC. All the DFU logic etc is on the PC, and the nRF is only used as a BLE connectivity device using the pc-ble-driver. The upgrade image is stored on a PC in this case and never resided on the nRF.

    If your use case is to have a computer connected, and run the DFU process from there, this is useful. If not, then you cannot reuse anything, though you can look at the DFU master implementation as a reference for how you would implement it on the nRF.

Related