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.

Parents Reply Children
  • I don't know if I can actually help with your code as I've not touched DFU since SDK12. I just downloaded sdk16 and shall see if I can compile the serial dfu example. You may want to consider getting technical support from Nordic folks also.

  • I was looking for technical support from Nordic folks itself, but they are not replying or updating.

  • Hi Vaibhav,

    Due to Christmas holidays in Norway we currently have lower staffing here in Devzone, but anyways I am sorry for the late reply.

    Have you see this step by step guide for 'Getting started with Nordic's Secure DFU bootloader' written by one of my colleagues?

    But as mention in section 5 of the guide: we currently don't have an official DFU master example code to run on an external controller, to for example update the nRF52 via UART as you want to do.

    My colleague provides an example of a very simple UART DFU master for nRF52 which you can study and try to translate into your ESP8266 controller.

    For the nRF chip (DFU target) you can take a look at the Secure DFU Bootloader over serial link example for a startpoint.

    I hope the links I provided above can be of help for the time being and if you have any more questions we will be back with full staffing on the 2nd week of January.

    Best regards,

    Marjeris

  • Hi msromero

    Thanks for reply-

    let me give you a brief of what I had tried and of what version I am using.

    I already had a application built with softdevice version 5.0 so I want to implement this in that application.

    Before going further I had tried to work this with latest SDK and latest softdevice.

    In this I have been through the nordic forum for past days and able to compile and run the code and getting the led 3 glowing.

    But when I go for serial programming It given the logs as

    Timeout waiting for acknowledgement from the device.

    Failed:  No data comes from serial port.

    My hardware configurations are: tx pin as P0.6 and rx pin as P0.8, flow control disabled and baudrate is 9600.

    Then I tried to enable the logs and it gives me error :

    nrf_logs_backend_init(); : undefined refernce.

    So I am not to go further with the code because I am not able to see what's happening inside the code.

    So I used your hex file shared in the example code:

    Logs are coming out.

    when I tried to program it using nrfutil.exe - using baudrate 115200 and flowcontrol enabled with default pin configuration settings , Here is what I am getting:

    1. Received Opcode is invalid

    2. Sending ........(some value)

    3. Received opcode is invalid

    2. Sending ......... (some value)

    So can you suggest how I should I go further.

  • Hi All,

    I have reached a step ahead where I need to transfer hex file from esp8266 to nrf52832 in dfu mode. 

    But I am confused with the packet structure and flow of transfer of data. Can you help me in this. 

Related