This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DFU & Bonding problem

hello everybody,

I'm working in a project & have to do something like security for the connection & be able to do updates to firmwares, someone suggested that doing bonding, exhanging the IRK addresses & add to whitelist & next time advertise with the whitelist only & reject any other connection, this is a short discription about what I need to do, I'm successful at doing FOTA at the first time then bonding with the new firmware but failed to do multiple FOTA, I'm attaching the log file logfile.txt to show you the result when I'm trying to do FOTA when I'm bonded to the central, note that I'm using s110 softdevice & here is the code: main.c

I'm not able to use s130 because it tells me as the photo:

image description

Note that the packages I'm using is the latest version released :) :)

  • Hi Mohamed,

    You should not use pack, I would suggest you to use the .zip package of the SDK. You can find the .zip here.

    Note that the latest SDK doesn't have support for S110. Next you need to tell me step by step what you do for testing DFU OTA. For example:

    Step 1: flash softdevice

    Step 2: flash bootloader

    Step 3: Use bootloader to update application

    Step 4: Use application to bond

    and so on.

    And let me know at which step the issue occurs.

    Also if you want to preserve bond information or application data in general, you would need to choose the number of pages (bytes) you want to save by defining DFU_APP_DATA_RESERVED in dfu_types.h This should match with the number of page you use for pstorage plus the swap page.

    Also please don't attach your code into the question text, attach it as a file.

  • @Hung Bui okay, What I'm doing is that:

    step 1: flash softdevice

    step 2: flash the bootloader

    step 3: use bootloader to update application

    step 4: use application to bond

    step 5: use application to do FOTA again which is hanged with me as shown in the log file I attached in the question title?

    I need to ask if the softdevice s110 doesn't support DFU & bonding & if I need to use S130 if any :)

    now I'm using s130, I face some problems in advertising as sd_adv_start function back with an error NO_MEM, but I need to know what is the actual problem ??

  • @Mohamed: Please use the examples provided in the SDK .zip file first, before testing with your application. Also let me know the version of SDK you use. This is depends on the hardware you have. Then you should test with the ble_app_hrs_with_dfu

  • @HungBui okay, I'll test the sdk.zip, before I'm testing my application, I tested the ble_app_hrs_dfu , it uses the Softdevice S130 & as shown in the post, it has a problem something missing & I couldn't get it :)

    the SDK version I have is 2.0.0.7-alpha :) I'm downloading now SDK v10 attached in your answer :)

  • From what you have described, my understanding is that the first attempt to perform FOTA works fine for you, then you do the bonding and then later again trying to perform FOTA with a bonded peripheral, fails. There seem to be multiple workarounds but I think the best solution is to upgrade to NRF51822 IC revision 3, Softdevice S100 v8.0.0 and SDK 10.0.0, Since the support for sharing bond information between Bootloader and the Application was first implelemented from Softdevice v8.0.0 onwards. I'm also currently in the process of migrating my application to the above compatibility matrix, while keeping the IC revision to '2' still.

    OOTH, I've tested FOTA multiple times with success with the following Compatibility matrix (see below) and with one caveat that I delete the bond information before I perform FOTA and it works fine everytime for me :)

    • NRF51822 IC revision: 2
    • Softdevice: s110, v 7.1.0
    • SDK: v6.1.0
    • Android Application: Nordic's Android APP (nrf Toolbox and nrf MCP)
Related