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

DFU in Experimental: ATT_MTU Throughput Example

Hello,

I'd like to develop and base on the "Experimental: ATT_MTU Throughput Example" project.

Seems like the example project doesn't implement the DFU (aka, OAD).

How can I add this feature to the project easily? Do you have an example for that? Would you evaluate it as "risky" / "complicated"?

Thanks in advanced,

Amit

Parents
  • Hello Amit,

    You are correct. The throughput example from the SDK doesn't have DFU implemented. In fact, this example is not really made to build on, but meant as a demo to see how much a link can transfer using different connection parameters. I would actually recommend to not start with this example as a starting point for your application. 

    If you haven't seen it already, I would recommend this guide which describes how to get started with DFU. 

    So you first need a bootloader, and then you need a way to tell the bootloader to enter DFU mode. Typically, this is either by holding a specific button on startup, or to have a BLE service to trigger DFU mode. Which one do you see fit for your application?

    Best regards,

    Edvin

  • The final result we're aiming for is to have a Central with BLE DFU. 

    1. We wanted to use a peripheral_central example project in order to achieve that, and add the DFU functionality to it. Unfortunately all the peripheral_central projects are labeled as "experimental". Is one of those experimental examples more reliable and stable than other?

    2. Another option is maybe base on a peripheral with BLE DFU project and add the Central functionalities. Could we base on the Peripheral project example:  BLE Secure DFU example and add the Central role to it? 

    Regards,

     Amit

  • What SDK version are you using?

    I think you should read through the guide that I linked to in the previous reply, to get an overview of how the bootloader works.

     

    Edvin said:
    So you first need a bootloader, and then you need a way to tell the bootloader to enter DFU mode. Typically, this is either by holding a specific button on startup, or to have a BLE service to trigger DFU mode. Which one do you see fit for your application?

     What way do you intend to use to trigger DFU mode? A button or do you want to trigger it over BLE?

    What do you intend to send the actual update from (this is called a DFU master)? A Mobile phone? Or is the plan to connect it via something to a computer and use a serial interface?

  • - SDK version: nRF5SDK153059ac345

    - I want to update a fw version using BLE, (and in the future maybe using a cellular 4G connection)

    ... So I understand it is not possible to add the central role to an existing peripheral-with-DFU example project?

Reply Children
  • 1: Let me try again. How do you want to trigger the DFU mode? Do you understand what I mean by this?

    The reason I stress this question is that if you want to trigger this with a button press, you don't need to worry about this. It is already built into the bootloader. If your product doesn't have any buttons, you can use a BLE service to trigger DFU mode. Note that "trigger DFU mode" is not the same as "performing DFU update".

    2: Did you read through the guide that I linked to?

    3: The bootloader is a separate small application that is running on startup. Whenever you trigger DFU mode, the bootloader will not start the already present application but starts advertising (as a peripheral) as a DFU target. Then you have to connect to the bootloader via BLE. Now the bootloader is a peripheral, and the DFU master (the other part wich is sending the update) is the central. You don't need to change this.

    4: Please go through the guide. When you are done with the guide, please try the ble_app_buttonless example from ble_peripheral folder. I know that this is a peripheral, but you need to understand how this example works, and how it triggers DFU mode from the BLE service: buttonless DFU service.

  • Hi Edvin,

    Thank you for clarifying and insisting :) It helped.

    So you first need a bootloader, and then you need a way to tell the bootloader to enter DFU mode.
    1. Bootloader -
    Does the bootloader work with the example project "Experimental: ATT_MTU Throughput Example"?
    Can it be added easily?
    No restrictions due to image size, etc'?
    2. Trigger DFU mode-
    Our first stage would be to use a BLE service to trigger DFU mode.
  • Hello,

    Let me insist some more Slight smile did you read the guide from the link?

    The bootloader and application are two separate projects, and two separate .hex files. 

    The reason I am sceptical with regards to the ATT_MTU throughput example is that it is a quite complex setup. There are other examples in the SDK that works both as a central and a peripheral, if that is what you need. You can for example look at the ble_app_hrs_rscs_relay example. 

    So:

    1: Yes. As mentioned the bootloader and your application are two different projects, and two different hex files that are programmed separately. There is a restriction based on the actual flash size of the nRF52840, but it can be quite large. Here is a screenshot of the flash of the nRF52840 containing softdevice, application(which the mouse hovers over), and the bootloader on the top.

    The grey area is free space.

    2: If your first stage is to trigger DFU via a BLE service, I recommend that you look into the ble_app_buttonless_dfu example, which contains a service that does this. This is a peripheral example, but you need to see how the application handles the event that triggers the DFU. 

    Again. Please go through the guide even if it is not exactly what you need. It will make you more familiar with how the bootloader works.

    BR,

    Edvin

Related