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

NRF52832 Firmware Upgrade using Esp8266

Hi Team

I am trying to implement the firmware upgrade for master controller nrf52832 on chip using esp8266 over uart and I am very new with this boot-loader part.

I had gone through many examples and trying to understand the flow from where to start. Code had already implementation of DFU using nrf connect application and working, but now I need to do this using esp8266.

My flow is I will download the hex file from the server and then upgrade the hex file form esp8266 over uart.

I had seen the examples - secure_bootloader_dfu and iot example but still not able to understand the example.

Any help or suggestion in this.

  • The document DFU_SPI_readme is inside the DFU zip file from the blogpost yes Slight smile

  • Ok I had seen two things here. As I am doing upgrade using esp I have few more questions.

    1. in Zip File I found two files - .dat and .bin.

    Which file is needed to upload first.

    2. In document, they has mentioned about object data, which file contains that data.

    Sorry for silly questions but I am confused in this.

  • From document DFU_SPI_readme.docx in the "Getting started with Nordic's Secure DFU bootloader, a step by step guide" blogpost:

    How to test

    The host application itself can be programmed as any other application.

    • Compile the bootloader with the public key you generated. Flash the target board with softdevice and the bootloader. Flash the DFU master application on the master board.
    • Generate the DFU .zip package file as you do on normal DFU (make sure you use private key as used to generate the public key)
    • Open the .zip file and unzip the init .dat file and the binary image .bin of the application or the softdevice/bootloader.
    • Rename the init .dat file to a .bin file (make sure you don’t overwrite the image .bin file) e.g init_packet.bin
    • Use J-Link commander to flash the binary file to the right part of the flash in the host
      1. Run the command line in the folder where you have your binary files
      2. From the command line, start J-Link commander by running jlink (this requires the C:\Program Files (x86)\SEGGER\JLink_VXXX folder to be in your PATH environment settings in Windows)
      3. In J-Link commander, type the following commands, this is for writing application, the similar applied for softdevice/bootloader just choose the right location:
        1. connect
        2. <Select nRF52832 and select SWD interface>
    • loadbin init_packet.bin 0x9000
    1. loadbin app_image.bin 0x10000
    2. r
    3. g
    • When the DFU Master started it will send a SPI ping command. After that you can choose to update application or softdevice/bootloader by pressing Button 1 or button 2 on the DFU master board.
    • LED 1 will lid when the image is being transferred
  • Hi 

    Thanks for your reply. I will try and let you know the results

  • Hi 

    I got no response after I sent the .dat file to the nrf in bootloader mode.

    What I had checked:

    1. Checked the object data - it is as per the file

    2. Check the receive CRC and offsets, they are also correct.

    3. Then send the Execute command but no response coming from the NRF.

    Steps I had followed:

    1. Set PRN Number = 

    2. Get MTU

    3. Create Object - 

    4. After that sent .dat file data 

    5. Then Command for Calculate CRC

    6. Then Send Execute command.

    I got success in all but failing in execute command, not getting any response after that.

    Can you guide me in this for the possible reason for no response.

Related