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

DFU works via Master Control Panel but not via nRF Toolbox

Hello all,

I am working on the implementation of DFU OTA in our application, running on a custom board using the nRF51822-QFAC.

The tools that I am using are:

  • SDK 7.2.0
  • Keil uVision V5.15
  • Softdevice S110 7.1.0
  • nRFgo Studio 1.21.0.2
  • Master Control Panel 3.9.0.6
  • nRF Toolbox running on an iPad air using iOS 8.1
  • nrf.exe bundled with Master Control Panel 3.9.0.6

Using nRFgo Studio I did the following :

  • 'Erase all'
  • programmed the softdevice into the nRF51822
  • programmed the bootloader hex file into the nRF51822

After these steps, the board is up and running and can be discovered and connected to from Master Control Panel and other tools like LightBlue.

When selecting DFU in Master Control Panel, selecting the correct hex file and selecting 'Bootloader', I can upload a new version of the bootloader via DFU OTA.

When I try to DFU OTA via nRF Toolbox on the iOS device, starting from exactly the same hex file, the DFU OTA always interrupts after 1% with the message "DFU The connection has been lost".

To generate the zip-file to be used by nRF Toolbox I used nrf.exe with the following parameters: dfu genpkg bootloader.zip --bootloader bootloader.hex --application-version 0xffffffff --dev-type 0xFFFF --dev-revision 0xFFFF --sd-req 0xFFFE

The generated manifest.json file in the zip file has the following content:

{
"manifest": {
    "bootloader": {
        "bin_file": "bootloader.bin",
        "dat_file": "bootloader.dat",
        "init_packet_data": {
            "application_version": 4294967295,
            "device_revision": 65535,
            "device_type": 65535,
            "firmware_crc16": 21660,
            "softdevice_req": [
                65534
            ]
        }
    }
}

Any Idea why this is not working via nRF Toolbox?

Thank you very much in advance, with kind regards,

Johan

  • Hi

    Thank you for a very good and detailed description of your problem

    I generated the bootloader zip file with the same nrf dfu genpkg ... string as you and it works fine.

    Perhaps what is going on is that there is old bonding information residing on the phone. nRF51 SDK 7.2 bootloader does not handle that properly, as it advertises on the same GAP address as the application, making it use the same GATT table. It should work in nRF51 SDK 8.0.0+, where the bootloader advertises on a different GAP address, which results in the IOS to do a new service discovery for the bootloader and to refresh the GATT table.

    Check if this makes it work: go to Settings -> Bloetooth on your IOS device, erase all pairing/bonding information and then turn off bluetooth and turn it on again. That should erase the old GATT table and force IOS to do a new service discovery when connecting.

Related