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

Adding DFU in custom application

Hi all,

There are lots of posts on the devzone about adding DFU service to a custom application and they have been very helpful in getting to this point.

At this point, I have an application that works very well on its own. Within this application I have defined a custom service with a 128-bit UUID. For adding the DFU service I am following the buttonless_dfu example (which works well on its own).

Now in the services_init() function when I call ble_dfu_init(&m_dfus, &dfus_init); and ble_ais_init(&m_ais, &ais_init);both, the application doesn't advertise anything. The log shows:

SDH:DEBUG:sd_ble_enable: RAM start at 0x20002128
:INFO:running nrf_dfu_settings_init
APP_ERROR:ERROR:Fatal

If I run the application with only the DFU service and do not initialise my own service, it does advertise. Similarly, if I init my own service only it works fine (functionally) without the DFU service.

The problem appears to be similar to these posts:

devzone.nordicsemi.com/.../

devzone.nordicsemi.com/.../

The two main solutions are to increment vs_uuid_count and/or to increase the GATT table size. I have tried the first one and that still results in the same problem. I don't know how to increase the GATT table size and what value should it be increased to. Additionally, I have updated my linker file with the bootloader settings section as well.

Can someone point me in the direction of how to go about finding the root cause of the problem here? I am using SDK 12.2 with nRF52832.

UPDATE:

I am getting an error code of 4, when doing the init of the second service (regardless of whether its the DFU or my custom one - even if I change their orders).

Parents
  • Do mean it does not advertise at all when you add the dfu service?

    If so, how do you know if the code has not crashed?

    Did you turn on logging or run the code in a debugger ?

    Btw. Why do you want to add the dfu service to your application. I thought the normal process is for the bootloader to provide the dfu service, and your application just needs to reboot into the bootloader dfu mode when an upload of firmware is required

Reply
  • Do mean it does not advertise at all when you add the dfu service?

    If so, how do you know if the code has not crashed?

    Did you turn on logging or run the code in a debugger ?

    Btw. Why do you want to add the dfu service to your application. I thought the normal process is for the bootloader to provide the dfu service, and your application just needs to reboot into the bootloader dfu mode when an upload of firmware is required

Children
No Data
Related