Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement DFU feature #58

Open
mostafaberg opened this issue Jul 27, 2018 · 35 comments
Open

Implement DFU feature #58

mostafaberg opened this issue Jul 27, 2018 · 35 comments
Labels
enhancement New feature or request

Comments

@mostafaberg
Copy link
Contributor

As a power user, I want to be able to flash mesh nodes with newer firmwares so that I can easily test, update and verify network operation with the latest firmware versions.

@mostafaberg mostafaberg added the enhancement New feature or request label Jul 27, 2018
@mostafaberg mostafaberg added this to the Library integration completeness milestone Jul 27, 2018
@trusbe
Copy link
Contributor

trusbe commented Jul 31, 2018

+1,Urgently need this feature to upgrade the entire network.

@mostafaberg
Copy link
Contributor Author

We haven't spec'd this yet, but we are planning to do so this coming week, will keep you updated about the roadmap:)

@trusbe
Copy link
Contributor

trusbe commented Aug 1, 2018

Nice! 👍👍👍

@BubblyNetDev
Copy link

Any future plans to add DFU to the sample app?

@philips77
Copy link
Member

Not in the coming months. I have to switch to another project for some time.

@BubblyNetDev
Copy link

Okay, when are you moving on? What will be the state of the application?

@philips77
Copy link
Member

I'll transition after I'll release the version 2. I'll be also fixing bugs after that.
The version 2 is almost ready, there are some more features I want to add, e.g. database migration from version 1.

@olsky
Copy link

olsky commented Oct 30, 2019

+1 very important, a must have :)

@philips77
Copy link
Member

We understand, but I'm really busy with other things :(
And the official spec for mesh dfu isn't even released yet!

@PM-BubblyNet
Copy link

Hey @philips77 about the "And the official spec for mesh dfu isn't even released yet!" we also notice that it has being pushed back, originally expected on spring 2020 now its summer 2020... so got me thinking if maybe there is a case about implementing BLE DFU as a temporary solution? I wonder how difficult from the app and firmware would this be? is it temporary solution worth exploring? or the complexity for just few months is not really worth it?

@philips77
Copy link
Member

I didn't read the draft, so I don't know how much work would it require. We also don't have it out backlog now.

@PM-BubblyNet
Copy link

I see... we checked the current DFU from others like Cypress and Silvair, they don't seem to be a "Mesh" DFU, instead they seem to update 1 device at the time using several (4) proxies as a "queue", my idea was to make something like that as a temporary solution.
However this brings few questions, for example all the nodes needs to have proxy enabled, we actually disable most of the proxies, then someone needs to go walking very slowly trough the whole site updating 1 device at the time... all in all this "mesh" BLE DFU doesn't seem a very good idea, but still maybe worth it as a temporary solution until the real Mesh DFU model comes from the SIG?

@philips77 philips77 removed this from the Library integration completeness milestone Feb 5, 2021
@trusbe
Copy link
Contributor

trusbe commented Jul 20, 2021

I would like to ask a few questions about DFU:

  1. Is there a DFU plan that supports the same device firmware in the Mesh network?

  2. Understand that all current new functions only support NCS SDK, nRF5 SDK no longer updates new functions, only fix bugs, currently we are using firmware written by NCS SDK, chip memory must be 512K or more to support separate DFU, Is there a better way to support DFU for chip devices with 512K or less memory?

Thanks.

@philips77
Copy link
Member

Is there a DFU plan that supports the same device firmware in the Mesh network?

I'm afraid I don't understand.

Understand that all current new functions only support NCS SDK, nRF5 SDK no longer updates new functions, only fix bugs, currently we are using firmware written by NCS SDK, chip memory must be 512K or more to support separate DFU, Is there a better way to support DFU for chip devices with 512K or less memory?

Use an external flash memory to download the new firmware, MCUboot which is used for firmware update in NCS SDK can be used with external flash. For more information, please check infocenter or DevZone.

@trusbe
Copy link
Contributor

trusbe commented Jul 22, 2021

Is there a DFU plan that supports the same device firmware in the Mesh network?

It means that only one device needs to be upgraded, and the Mesh network will automatically upgrade other devices of the same device type. For example, if there are five lights in the same network, one of the devices will be upgraded, and the other four will be upgraded automatically.

Thank you very much, it seems that the only way to increase external storage or use other chip models.

@philips77
Copy link
Member

So there will be many ways you may do DFU. The best one from mobile phone's point of view is indeed initiating DFU using mesh protocol, then sending a new firmware using a OOB (Out Of Band, not through mesh proxy service, but something much faster) and confirming with mesh protocol. Then the proxy node (with dfu capabilities) would be responsible for transferring it to all nodes registered during the initialization phase. You send once in 1 minute, and the image distribution takes very long time.

@smenor
Copy link

smenor commented Apr 19, 2022

Is this ever coming ?

@philips77
Copy link
Member

As far as I know, the official specification is still under development. Realistically speaking, I don't see it coming to mobile implementations in 2022.

@smenor
Copy link

smenor commented Apr 20, 2022 via email

@olsky
Copy link

olsky commented Oct 16, 2023

it has been released: https://www.bluetooth.com/mesh-device-firmware-update/

;-) any hints @philips77 ?

@philips77
Copy link
Member

Yes. With 4.0 released the DFU will come in 4.1. I need to switch to Android for a bit to fix some issues here and there and I'll start updating all my mesh nodes like a crazy person. Hopefully by end of this year you'll be able to join me and we will update the world!

@olsky
Copy link

olsky commented Oct 18, 2023

Great news! I will join you, the world will be updated by two crazy ones :)

@philips77
Copy link
Member

On Android DFU will come later. We're rewriting the lib in Kotlin (should make it public as soon as it's "usable enough") and we need to focus on implementing the basics first.

@olsky
Copy link

olsky commented Oct 18, 2023

Fine too, let's get rock in iOS first 😎

@olsky
Copy link

olsky commented Oct 18, 2023

When basics first, then the initiator role is good starting point, right?

@philips77
Copy link
Member

For DFU - yes. For transport of the image we will use SMP protocol and nRF Connect Device Manager library, sending meta-data over mesh. Then the DFU proxy should take over and slowly forward the image to desired nodes. That way we'll get 30 kB/s from the phone instead of 0.01.

@philips77
Copy link
Member

I mean, in nRF Mesh app. Library will just have API to do whatever.

@olsky
Copy link

olsky commented Oct 18, 2023

For DFU - yes. For transport of the image we will use SMP protocol and nRF Connect Device Manager library, sending meta-data over mesh. Then the DFU proxy should take over and slowly forward the image to desired nodes. That way we'll get 30 kB/s from the phone instead of 0.01.

just to understand your reply better: do we get the mesh dfu (Models like BLOBTransfer, FirmwareDistribution and FirmwareUpdate cli/srv)?

or you refer the off-mesh DFU...

@olsky
Copy link

olsky commented Oct 18, 2023

thinking of speed, sure: faster is better :)

I think if the fw is moved to distributor, then the speed is not that relevand (distributor will push updates and network will be updated). It would be nice to see in the Lib the minimum required for the Initiator Role:

  • Firmware Distribution Client
  • Firmware Update Client
  • BLOB Transfer Client
    then UI/Views can catchup later...

would that fit into our roadmap?

@philips77
Copy link
Member

I didn't memorize the whole DFU spec yet, like I did the other parts of mesh.

We will use mesh models for sending metadata, but will not use BLOB transfer to send the image to Distributor. Instead we'll use OOB method - McuManager. However, I'll try to implement the upload in transport agnostic way so users can choose other protocols. And, depending on complexity, perhaps we can add BLOB as well, just for completeness. As I said, this amazing novel is waiting for me.

@olsky
Copy link

olsky commented Oct 18, 2023

Oh, that's a great plan! A sound-crazy-plan thing 🎢

@olsky
Copy link

olsky commented Feb 7, 2024

Hi, just a quick follow-up: any updates on this?

@philips77
Copy link
Member

Hi, it will come in few months. I'm busy with some other tasks at the moment, but DFU comes next.
Also, as we're working on a new Kotlin mesh library for Android, we want the new one to catch up with the is one in feature set, so we can start adding new features in parallel.

@olsky
Copy link

olsky commented Oct 23, 2024

hey @philips77, hope all good at your side!
could you please share update on the topic? )

@philips77
Copy link
Member

Hi, I'm starting to implement DFU very, very soon. Need to close some old topics, but this or early next week.

On iOS, that is. On Android side we need to finish rewriting the current lib into Kotlin (almost complete) before adding new features, and there are some that will come before DFU, like Remote Provisioning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

7 participants