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

DFU OTA via Android and iOS

Hi everyone,

I recently was able to do firmware upgrade via Android phone(Link). So once I programmed the device with a proper bootlader, I was able to always reflash my application section of nRF51822 device, with a new application.hex, incase of any application updates. I currently compile the new updated application to generate my application.hex and use nrfutil.exe to generate the zip file(containing the .bin, .dat , .json files) needed for DFU update via Android as explained here.

The issue is, I am never able to use this .zip file for a DFU update. I open up my nRF Master Control Panel App(latest version) on my phone, connect to my device, select the DFU option on the top right corner which opens up a dialog box which asks for either Distribution Packet(zip), softdevice, Bootloader or Application. When I select Distribution packet, it asks to select my zip file and I browse(File Manager app on Android) to select the .zip which I created above. The zip file gets opened in the file Manager App and 'not selected' and all the files inside are visible but none of the files are selectable.

  1. So my query is, will just having the zip with the bin and dat file not work for DFU as mentioned in the pdf here? What am I doing wrong in this process? (How I get DFU to work is by selecting the Application button when you click on DFU then go to select the application.hex file, the app then asks for you to select the init file and I select the .dat file and the app proceeds to update the firmware just fine. Is this the correct and only way to do it?)

  2. This brings me to the second issue on my iPhone. Here I use the nRF Toolbox app for DFU update. Here once I select the DFU section on the app. It will go to the screen which asks for you to select the application. If I go ahead and select the application.hex file, and proceed to upload the firmware after selecting the device, it says .init file is needed but doesnt give me an option to select the .dat file like in Android(Even though both application.hex and its .dat file are there in the same folder on the iPhone). So I cant do a DFU update on via an iPhone to my nRF device.

  3. In the iPhone nRF Toolbox app, in DFU section, whenever I click the select device option, I never see the proper advertising name of my device (Lets say ABC as I see in Android), I always see it advertising as DFUTarg. Is this a bug?

Thanks for your time, Hoping someone can help me out.

Thanks in advance.

  • Hi dev,

    The instruction on creating .zip file with .bin and .dat is deprecated and should not be used.

    I suggest to update all your nRFToolbox app and nRFMaster Control App to the latest one.

    When you select the .zip file you should select the file instead of open or unzip it. I am not sure which app you used, but in my case it's FileManager app v2.3.7.6 from CheetahMobile and the zip file is not "open", meaning I won't see the files inside the .zip but the file was simply selected.

    This also applied for iOS, you should select the .zip, not unzip and select the file inside.

    The difference in the name maybe due to the fact that iOS catched the device name instead of updating it from the advertising packet. You can try using nRF Master Control panel to connect to the device and the name will be updated.

  • I am currently using the latest versions on nRFToolbox app and nRFMaster Control App on my phones.

    Can you tell me which is proper way of DFU update? Is it via selecting the zip file or just indvidually selecting using the .hex, .bin, .dat file?

    Right now when I was using the latest File Manager app v2.5 from Cheetah Mobile, it again is "opening" the zip file rather than selecting it. I tried another File Manager app from Zen UI, ASUS Computer which allowed me to select the zip file but nothing happens after the selection is done and control goes back to nRF Control Panel app. Is it supposed to show something? Because firmware did not get uploaded.

  • If you are not using very old DFU bootloader, you should use the .zip file. Could you take a screenshot when you are testing ? You can also test with nRFToolbox app.

    Have you ever successfully perform a DFU update ? Maybe with the PC or with the file directly without the .zip ?

  • I am using a s110 dual bank bootloader. Would that be considered as old? Steps I followed are here. I also tested on Android with nRFToolbox app and when I select the zip and choose upload, it shows "Update failed: DFU File not found."

    I am able to successfully perform DFU update when I select application on the app during file selection(instead of Distribution Packet(zip)) followed by selecting the init file(.dat file) on-prompt from the app. I am currently traveling, I can take a screenshot of the process once I am back.

  • Hi dev_000,

    I would like to know the SDK version that you use. If you are using S110 v8.0 then it should be fine. It's also OK to use the bin file and the .dat file separately. Could you upload the .zip file you used ? Note that we provided some sample .zip file with the nRFToolbox (or nRF MCP) that you can use to test. If it's Android you can find it at the NordicSemiconductor folder in root.

Related