Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs

Implement nRF-SDK BLE DFU transport layer in nRF connect

Hi,

We have developed a product that is using nrf sdk and are moving towards replacing the nrf-SDK with the new connect SDK and one of the main features we have is to perform a DFU of the nRF firmware as well as performing a DFU of an external STM32 microcontroller. We achieve this by performing the DFU as the buttonless_dfu example for nRF and for the external device we mark it as "external" when we create a .zip dfu packet so the bootloader will only place it in the bank and then in our application we perform the DFU of the external STM32.

We have our own developed APP in both IOS and Android for performing the OTA dfu using nRF API's.

What we want to achieve is to move over to nrf connect without modifying our APP and retain all the OTA DFU funcionality.

It is my understanding that the BLE transport layer is new for nRF connect (using the SMP protocol) so to achieve this we need to implement the old BLE transport layer in nRF connect and then use Zephyrs "Flash Image" API's to write the firmware to the bank/slot.

A couple of questions:

1. I have a hard time finding exhaustive documentation for implementing the transport layer, i.e. documentation of the BLE service and commands. What I have found is the following:

A higher level flow chart of the DFU process:
https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.0.0%2Flib_bootloader_dfu_process.html

Documentation (from nRF sdk 11, so quite old) of the characteristics from the "sender" of the firmware:
https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v11.0.0%2Fbledfu_transport_bleservice.html

Is there exhaustive documentation somewhere we can use to implement the transport layer ble service on the nRF side?

2. Can the old transport layer be "paused" or data be put on hold for a while to perform incremental DFU writes to the external microcontroller? I.e. receive X number of bytes, wait until they been written to the external device and the receive another X bytes and repeat until DFU is finished. It seems possible looking at the documentation as the "receive firmware" operation in the transport layer requires a response and my guess is that we could delay the response until we have written the bytes to the external microcontroller.

Note: Re-writing/changing the app is currently not an option unless it would require a minimal effort but we'd really prefer not to.

Best Regards and thanks in advance,
Andreas

Related