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

DFU OTA for Custom Application

Hi,

I have implemented a custom application(Lets name that file app.hex) which works and sends the data to phone via BLE on my nrf51822 DK. I am using the s110 v8 softdevice(Lets name it sd.hex). I followed the tutorial for DFU OTA and compiled the project "dfu_dual_blank_ble_s110_pca10028.uvprojx" to generate the dual blank DFU hex file. (Lets name it dfu.hex) Firstly I erased my development kit IC completely from nRFgo Studio. Programmed the softdevice, sd.hex file on the board. Then I compiled and burned the chip with "dfu_dual_blank_ble_s110_pca10028.uvprojx" directly from my Kiel platform. I was able to detect the "DfuTarg" from the Nordic nRF Toolbox App in phone.

Following the INIT file generation mentioned in the pdf here, I was able to create a zip file(with just the application specs) which I could load onto the phone and reprogram the firmware with app.hex, successfully with the zip file .

So as of now, DFU over BLE was possible for me.

Here is the problem, I cant seem to program app.hex with dfu.hex from the Nordic nRFgo Studio. Here is my current procedure in sequence.

  1. Program the sd.hex from Nordic nRFgo Studio.
  2. Program the dfu.hex from Nordic nRFgo Studio.
  3. Program the app.hex from Nordic nRFgo Studio.

The problem is even after doing all the above steps, the DK is still advertising with the name "DfuTarg" although I have programmed it advertise with a different name in the app.hex (I have verified app.hex separately to see its advertising name and it works correctly)

So my question is how do I burn the app.hex with a dual blank bootloader first time(which can be later reflashed with say app2.hex, although I have figured out this issue of OTA DFU from phone)?

  • @Vidar Berg

    Thanks for the input. I had already tried merging the app_valid_setting_apply.hex with the app.hex, dfu.hex, softdevice.hex. But it was not showing up as DFU enabled in my phone app.

    I am guessing the issue is I have to edit my application to have DFU capabilities as mentioned here. I am trying that one out now, but it kind of hard to follow the tutorial.

    Please do let me know if there are any other suggestions.

  • Hi all, I have been trying to get the DFU working on my application, I followed word by word of this guide. (And compared with the ble_app_hrs project, s110 with DFU, and it seemed to be same)The Hex file generated was combined with softdevice: sd.hex, Dual blank DFU: dfu.hex and app_valid_setting_apply.hex.

    But I still cant detect the nRF DK as DFU enabled from my phone. Any suggestions on how to go ahead with figuring out why its not working in DFU mode? I am stuck on it for last 2 days.

  • Does ble_dfu_init() return no error? When you connect to your device using Master Control Panel on your phone what services do you see? One of them should be DFU 0x23, 0xD1, 0xBC, 0xEA, 0x5F, 0x78, 0x23, 0x15, 0xDE, 0xEF, 0x12, 0x12, 0x00, 0x00, 0x00, 0x00

  • Does ble_dfu_init() return no error?

    How do I know this?

    When you connect to your device using Master Control Panel on your phone what services do you see? One of them should be DFU 0x23, 0xD1, 0xBC, 0xEA, 0x5F, 0x78, 0x23, 0x15, 0xDE, 0xEF, 0x12, 0x12, 0x00, 0x00, 0x00, 0x00

    Its not showing up this service when device is flashed with custom app integrated with dfu + sd + dfu + settings. Although the the above service shows up when I flash just the sd + dual blank DFU hex files(The example one). I am starting to think it could be an issue with my custom application integrated with DFU. But cant figure out where the issue is as its equivalent to ble_app_hrs project, s110 with DFU(or atleast in my eyes).

    I am attaching my main.c file here for scrutiny in case I am missing something that is obvious. Thanks in advance.

Related