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

dfu fails only if bonded

Hello,

Thanks for reading this! I have an odd behavior on my nrf52832 where I am capable of uploading a new firmware via BLE DFU to the peripheral device if it is not bonded to the central device. However, when I bond, the DFU always fails. I suspect it is for this reason, ie the NOINIT section in the ram is not retaining my bond information when passing to the bootloader. I am using Elcipse GCC, so in order to rectify this, I have to modify this linker script: dfu_gcc_nrf52.ld. I dont know how to do so, can anyone point me in the right direction? Is there any way to check that there is indeed bond information retention?

Thank you very much for your time.

edit for phone screenshot: image description

  • Hello, thank you for answering,

    1. When I flash the device with the bootloader from sdk11 and the v2.0.07 s132 softdevice, it advertises and I can connect to it using the master control panel from my nexus 5.

    2. However, when I try to upload a new firmware (dfu_test_app_hrm_s132.zip taken directly from the examples in the sdk11), the master control panel does not seem to recognize it (the file is displayed but it is grayed out and I cannot select it).

    3. I cannot enter the application from the bootloader, even if I write a 0x01 to 0x7F000. Also, if I flash the device with s132 v 2.0.07 and my application, the application does not run seeing as it was conceived using a previous version of the softdevice/sdk. If I flash my device using the older softdevice and bootloader from sdk9.2, I am capable of doing a dfu perfectly fine so long as the device is not bonded.

    Do you recommend that I port all of my code to the new sdk or is there a way around all of this, where I can still use the older bootloader/s132 from sdk9.2 and still share bonding information? I am getting Sniffer working (mind you, I'm working on a nrf52, which does not appear on the list of required hardware in the sniffer user guide) and I will get you a trace of the failure when bonded using sdk9.2. Thank you so much for your help, by the way!

  • In the SDK 9.2, are bond informations shared properly between the application and the bootloader, or am I going to have to do some modifications?

  • @seanbites: It worked fine on my Galaxy S6. Make sure you have the latest version of Master Control Panel. I don't see any reason it allowed to selected the file if you use bootloader from SDK v0.9 but not if you bootloader from SDK v11. Could you take a screenshot ?

    I would suggest you to update the bootloader so that you can run it in debug mode. Please have a look here. You can debug and find why the bootloader won't jump to the application.

    But I suggest to fix the stuff step by step, by first make the bootloader does its job, do DFU.

    If you plan to use the sniffer on nRF52 board, you may need to match the UART pins with what we have on the PCA10028 or PCA10031 (08=RTS, 09 = TXD, 10= CTS, 11= RXD)

    I don't think you need any modification to make the bootloader work with bonding in SDK v0.9.2

  • I have added a screenshot in the original question. Notice that, at the very bottom, myapp.zip is grayed out. Am I not using nrfutil.exe properly? Here is an example of the types of commands I write:

    nrfutil dfu genpkg --application nrf52832_xxaa_s132.hex --application-version 0xffffffff --dev-revision 0xffff --dev-type 0xffff --sd-req 0xfffe myapp.zip
    

    Is it possible that this is a problem with Google drive, which does not recognize that this is indeed a .zip file format? When I use my phone to check information on this file, it says "unknown type".

  • Hi seanbites,

    It could be the problem here. If you connect your phone to PC and copy the file to PC do you have the same issue ? On my phone the same file "dfu_test_app_hrm_s132.zip" is not grayed out.

Related