BLE Secure DFU Bootloader with nRF52832 Project Build Errors

Hi,

I'm following this "Getting started with Nordic's Secure DFU bootloader, a step by step guide" (https://devzone.nordicsemi.com/guides/short-range-guides/b/software-development-kit/posts/getting-started-with-nordics-secure-dfu-bootloader#h75sjziavjbukzaywg6xlx19np0fm4) and using the nRF5_SDK_17.1.0_ddde560\examples\dfu\secure_bootloader project. However, when I built it (at step B3 in that guide), it gave me these errors.

How may I solve them? Or are there any other example projects or guides that I can follow to program nRF52832 through BLE? I've also tried the ble_app_buttonless_dfu, and that project could be built (no errors) but the nRF52832 didn't BLE advertise after firmware loading. 

Thanks,

Han

  • I granted you the access yesterday. Have you had a chance to try that .zip file yet?

    Thanks,

    Han

  • Hello,

    Yes. I got it now. I am able to select it in nRF Connect for Desktop and iOS, and my colleague was able to do it in nRF Connect for Android. We were not able to actually perform the DFU, but that is because I don't have the bootloader with the correct private key. 

    Can you show me a screenshot from your phone that shows what it looks like when you are not able to select it? Also, did you try to update the device using nRF Connect for Desktop? Does that work? (for debugging purposes)

    Best regards,

    Edvin

  • Sorry for the late reply. I used the wrong app (DFU). It worked on nRF Connect app.

  • I am now having trouble of sending the DFU package when it's larger than 60kB. When loading the DFU package through nRF Connect app, the graph just shows disconnecting (not showing percentage) and then escape without loading the file onto the device. How may I fix this?

    Additionally, when I tried to load the DFU package (with the project hex file is from the ble_app_buttonless_dfu example), the package was loaded successfully through DFU. However, the BLE didn't advertise afterwards (cannot find Nordic_Buttonless when doing BLE scan). I have also tried loading the ble_app_buttonless_dfu directly through Segger and it didn't BLE advertise either. Does it mean something is wrong with the example ble_app_buttonless_dfu code? The blinky and uart examples worked fine.

  • Hello,

    HanCatNguyen said:
    The blinky and uart examples worked fine

    What does that mean, exactly? Did you build these applications yourself, and transfer them via DFU? Or are these some sample application images that you transferred over DFU?

    When testing applications like this, I find it useful to program them manually first, to make sure that the combination with Bootloader, SoftDevice, Application and Bootloader Settings* work as intended. 

    * The bootloader settings must be generated and programmed together with the application .hex file. Every time you re-build your application, you need to update this bootloader settings file, because it holds the signature and CRC check of the application. Without it, the bootloader will reject the application, and remain in DFU mode. 

    I prefer to use a script for this (.bat file or .sh file, depening on your OS). The script will copy the .hex file from the bootloader and application, and generate the bootloader settings file (using "nrfutil settings generate ..." See nrfutil settings generate --help), and then program all the 4 hex files using nrfjprog. Bootloader, application, softdevice and bootloader settings.

    Try this using the image that didn't start advertising. Try enabling logging in your application. Is the application's main() function reached? 

    You can also try to run a debug session, but in that case, please use the "Target" -> "Attach debugger" option:

    Because if you start a debug session like you normally would, a slightly different .hex file is uploaded, and it will be rejected by the bootloader. 

    Best regards,

    Edvin

Related