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

Anyone do successfully DFU OTA for SDK7.0.1 & Softdevice S110 V7.1.0 ?

Hi, I purchased Nordic new reference platform nRF51-DK(pca10028) and try to work for DFU OTA. In my test, first of all program S110 V7.1.0 by nRFgoStudio and downloads bootloader/dual_bank_ble on Keil. nRF51-DK starts advertising "DfuTarg" and can connect my iPhone(iOS7, iOS8) and Nexus7(Android4.4.4) Toolbox or master control panel, but attempts to start DFU(uploads button), it fails soon and never be completed. I also read on the setup and procedure in SDK documentation file, I also believe in DFU memory allocation is correct. Anyone succeed for DFU OTA same as using my platform ?

  • I do successfully and same as your platform as below:

    1. SD v7.1
    2. OTA-DFU with Dual bank mode
    • For iOS, you have to use the DFU of nRF-Toolbox App, don't use the nRF-Loader.
    • For Android, you may need to restart your bluetooth of smart-phone, and try again.
  • I got the PCA0001 working on iOS7 & iOS8 with nRF-Loader. My DFU was compiled with GCC.

  • Hi, Jason & Nguyen

    Thanks for your feedback, I did try OTA DFU again, but still cannot make it.

    1. Program S110 V7.1 by nRFgoStudio into pca10028.
    2. Open C:nRF51_SDK_7.0.1_1d6e5cb\examples\dfu\bootloader\pca10028\dual_bank_ble\arm Check target option in uVision, done ROM1:0x3C000-0x4000, RAM1:20002000-0x2000 at "Target" tab, done check box "Use external tool for flash programming" at "Utilities" tab.
    3. Power on nRF51-DK, starts advertising "DfuTarg".
    4. Open DFU in Toolbox for iOS7 or iOS8, selects application hex "nRF51422_xxac_s110.hex".
    5. Select "Upload" button, but fails DFU and is shown by "Error on Receive Firmware Image Message: Invalid Response". I'm not sure why my tring to do DFU always be into failure, please give me any advice if any finding or concerns for OTA DFU ? Any helpful feedback or message if you have, I greatly appreciate you. Thanks always kinds !
  • I used the one from nrf6310. have not tried the pca10028. perhaps you can compare to see the different. I had to modify nRF-Loader related to buffer size. There was a mismatch between the Firmware and the App. You can check that also.

  • Hi

    The bootloader in SDK 7.0.1/7.1.0 needs an init packet to validate if the application image that is to be transferred is valid or not. You can use Android nRF Toolbox DFU v1.11.1 (available on Google Play) to transmit the applicaiton image. The init file (.dat file) and the application file (.hex file, e.g. ble_app_hrs) must match together. In nRFToolbox there are e.g the following two files that match together by default, namely the Nordic Semiconductor/Board/pca10028/ble_app_hrs_dfu_s110_v7_1_0_ext_init.dat and Nordic Semiconductor/Board/pca10028/ble_app_hrs_dfu_s110_v7_1_0.hex. The proceidure is as follows:

    • In Android nRF Toolbox v1.11.1, press "SELECT FILE" and select the hex file at Nordic Semiconductor/Board/pca10028/ble_app_hrs_dfu_s110_v7_1_0.hex.
    • In the next step you are asked to browse for an "Init packet". Press "yes", then select the file Nordic Semiconductor/Board/pca10028/ble_app_hrs_dfu_s110_v7_1_0_ext_init.dat
    • Press "SELECT DEVICE" Select the device which should be advertising as DfuTarg
    • Press "UPLOAD"

    Update 16.12.2014 Upload custom application to nRF51 SDK 7.x.x bootloader via Win Master Control Panel Master Control Panel (MCP) v3.7.1 for windows is by default not compatible with the bootloader in nRF51 SDK v7.x.x. However, it can work with the python script files which are available with SDK 7.1.0 that must be copied to the MCP installation directory. How that is done is described here in the section for "Master Control Panel, v.3.7.1". Also insert the following file into the MCP folder which generates the init file for the application that is selected for the DFU upload in MCP.

    ble_dfu.py

    Upload procedure in Master Control Panel v3.7.1:

    • If the bootloader is running on the nRF51 (advertising as "DfuTarg"), connect to the device from MCP and perform service discovery
    • Press "DFU" button, select your application (.hex file) and press "Program"

    Note:

    • The above file will generate .dat file (DFU init file) in \Program Files (x86)\Nordic Semiconductor\Master Control Panel\3.7.1.8567 and a .bin file which are the two files that are transferred to the device
    • The generated .dat file only works for application uploads, not for softdevice or bootloader uploads.

    The contents of the generated init packet can be changed by modifying the following code in the ble_dfu.py file:

    def _create_init_packet(self, init_packet):
        hardware_version = [0xFF, 0xFF]
        hardware_revision = [0xFF, 0xFF]
        application_version = [0xFF, 0xFF, 0xFF, 0xFF]
        softdevice_len = [0x02, 0x00]
        softdevice_array = [0x4F, 0x00]
        softdevice_array2 = [0x5A, 0x00]
    

    Documentation for the construction of the init packet can be found here

    NOTE: If you intend to use e.g. Android nRFToolbox to upload the firmware and init file (.dat file) generated by the python script, use the .dat file and the .bin file for the upload in nRFToolbox.

    Update 2.1.2015 There is now also documented a different method of generating the CRC for the SDK 7.x.x bootloader init packet which includes application, bootloader and softdevice updates:

    How to generate the INIT file for DFU.pdf
    hex2bin.exe
    crc.exe

    Update 18.2.2015 I include an example init file below. Its content is the same as in the example given in the "How to generate the INIT file for DFU" document, but you still need to generate the CRC as described in the document.

    application.dat

Related