What iOS DFU library do I use to incorporate into an iOS for a specific custom device?

If I'm building an iOS app to connect to a nRF5340 device and want to build DFU/FOTA into my app. I used the IOS-nRF-Connect app and followed the FOTA over Bluetooth Low Energy lesson to update my DK. If I wanted to build the DFU functionality into my app specifically for my device, what library do I use? I see the IOS-DFU-Library, which has it's own screens, and the IOS-nRF-Toolbox but don't want a bunch of screens. I just need a button to update and some way to show progress, success, or failure.

Or do I use IOS-nRF-Connect-Device-Manager? Again, I just want to check for updates for a custom device and update it when one is available.

Since I updated the app from the nRF app it would be great to see the code as a guide. Also is there a specific service/characteristic required?

In another approach I downloaded the nRF Toolbox because the code for it is on GitHub which means I could actually see what it's doing, but the app_update.bin file I used with the nRF Connect for Mobile is greyed out. Only .zip files seem to be selectable. The screen says Choose DFU Distribution Package, so my guess is that the .bin does not conform to the distribution package.

When I read Developing with nRF5340 DK, I decided to try the dfu_application.zip, but got this error:

I get an error when using the nrf Connect mobile app for iOS and the dfu_application.zip but the app_update.bin still seemed to work.

Should I be using distribution packages moving forward? Is the .bin to update the app core the old way of doing this? If so is there a way to generate the package when I do a build? I suppose this could/should be initiated in a GitHub workflow.

  • Hi lcj,

    The IOS-DFU-Library supports DFU for solutions based on the nRF5 SDK, and the IOS-nRF-Connect-Device-Manager library supports DFU for solutions based on the nRF Connect SDK.

    As you are following the DevAcademy lesson, you are using the nRF Connect SDK, and should use the Device Manager library.

    Hieu

  • I followed the Dev Academy lesson (nRF Connect SDK Intermediate, Exercise 3 – FOTA over Bluetooth Low Energy) and was able to update the nrf5340 DK using the method described. Specifically using the nrf Connect mobile app with a app_update.bin file.

    I am looking to use a custom mobile app with a custom device, so I need to get to the next level with this. Updating the device from my mobile app is only single capability. I need a library which is specifically focused on this one capability. Do I use the IOS-DFU-Library for this? Is it meant to be integrated into an app or is it an example library to be used as an example?

    I will have other components of the app which interact with the device to send and receive information, configure settings, etc. Does this library duplicate the peripheral object I use for that? If so, it's really just an example, correct?

    Additionally, if's being used by the nrf Toolbox, it's not working when I use the app.

  • I think perhaps you misunderstood what I said in my previous reply somehow.

    Hieu said:
    The IOS-DFU-Library supports DFU for solutions based on the nRF5 SDK, and the IOS-nRF-Connect-Device-Manager library supports DFU for solutions based on the nRF Connect SDK.

    The nRF5 SDK and the nRF Connect SDK are two different SDKs.

    If you are following the DevAcademy lessons, you should be using the nRF Connect SDK, and the IOS-nRF-Connect-Device-Manager library does exactly what you are asking for here:

    lcj said:
    Updating the device from my mobile app is only single capability. I need a library which is specifically focused on this one capability.

    Please go over the iOS nRF Connect Device Manager library README for more information.

Related