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

BLE DFU Extension Issue

Hi,

I have added "DFU" functionality to my existing BLE application Test.rar.

"I am using nrf52 SDK v11.0".

I have programmed the device with softdevices (S132.hex) and application and it doesn't work. I am sure I have something wrong but don't know where....

At line 991 in the main.c where I have defined "reset_prepare" function to enter dfu mode.

Also, do I have to load bootloader file? If so where can I find "Bootloader.hex"?

If I am using bootloader do I still have to load softdevices?

It would be great if anyone can advise on this.

Regards Siva

  • Could you explain in detail what you mean when you say "it doesn't work"? Are you getting any errors when you attempt to perform DFU?

    Yes, you have to flash both the bootloader and the softdevice to your nRF5x device for OTA DFU to function properly. You have to compile the bootloader project found in nRF5_SDK_v11_0_0\examples\dfu\bootloader\pca10040\dual_bank_ble_s132and then flash it your board the same way you flash an application.

  • The problem in my application is at line 1146 where "service_init()" had been defined. In this function I have added DFU functions which causing the problem. If I remove the dfu functionality it works as usual.

    I think the problem is, I am not placing the dfu functions in the correct location. Here are the locations where I have defined dfu parameters/functions.

    Parameters --> from Lines 53 to 74 Functions --> 1. advertising_stop------line 79 2. reset_prepare---------line 97 3. Service Initialization------line578 4. BLE stack events-----------line755 5. BLE_Support----------------line786 6. Calling reset_prepare-----line987

    Are the above declarations correct?

  • Hi Siva, I recommend that you use the ble_app_hrs example with DFU support as a reference when adding DFU to you own application. You can find it in the following folder in the nRF5_SDK_v11_0_0\examples\ble_peripheral\ble_app_hrs\pca10040\s132_with_dfu\arm5_no_packs

Related