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
  • Sounds like your Esp8266 plays the role of DFU controller. I've not touched DFU lately but I do find the DFU documentation back in SDKv11 very detailed and readable. There's also an DFU example using uart instead of ble for transferring the new firmware image. Checkout SDKv11 to see if that example helps with what you plan to do: Software Development Kit > Previous versions of nRF5 SDK > nRF5 SDK v11.0.0 > Examples > DFU bootloader examples > BLE & HCI/UART Bootloader/DFU > Architecture

  • Hi can you suggest me the settings that I should do in bootloader file to enable the serial dfu.

  • Hi,

    Is this happening when you test the DFU master example with two DKs or are you now trying to use the  ESP?

    Did you manage to test the example with no modification on two DKs? If you have a logic analyzer you can capture the SPI transaction form a DK to a DK and then compare it with the ESP transaction.

    You should also check the logging on the bootloader. If it doesn't print out so much informatin you can also add some logs yourself.

    BR,

    Marjeris

  • Hi

    1. I am testing this all in our application PCB containing NRF52832 as a chip.

    2. Communication is Done between nrf52832 and esp8266 chip over uart.

    3. Data from esp to nrf is going in correct format. I checked in logs.

    4. All the commands are providing correct response but no response from execute commands. 

    5. From no response I means neither success nor fail.

    6. I tried to implement same with nrfutil but also getting same results " no response from device".

    7. SDK version I using is 5.0.0

  • Hi Vaibhav, 

    I'm taking over the case from Marjeris.

    Please clarify what exactly you planning to do. Earlier you mentioned that you have old application that running on softdevice v5.0. Which SDK version was that application built on ? What do you plan to do with the application, are you planning to upgrade firmware on this old application ? 

    Are you planning to upgrade to SDK v16 ? 

    You are planning to do a complex task (writing DFU host on ESP8266) so my suggestion for you is:

    1 - Test UART DFU using our bootloader in SDK v16 (no modification) and nrfutil serial. This is described in the documentation and partly in my blog post

    2 - Try to do the DFU with a very small image, and capture a UART trace using a logic analyzer. You can use this as the golden sample to compare to your application.

    3 - Try to understand how the bootloader works, print out log.

    4 - Try to test my DFU host on nRF52832 code here. This will do DFU from a nRF52 to a NRF52. Try to capture a UART trace and compare to #2

    After these 4 steps, you can continue the development on the ESP8266

  • Hi Hung

    I will work on this will let you know the results.

    SDK verison of my application is 14.2.

    I am planning to upgrade my device firmware on same version. I had devices deployed in the field with some features that has connectivity over BLE and Wifi. As for firmware upgrade BLE instance and user is not available , and device will work automatically over Wifi only. 

    So I want to upgrade the device firmware over Wifi.

  • Hi

    I am trying to implement you code UART DFU Master example, but not able to compile it. So what I did to compare the code with my DFU controller code that I had written in esp8266.

    Both the codes are same. 

    I also traced the uart lines using logic analyzer and data tx rx is also good and expected values.

    Still when I send the execution command I am not able to receive any response from the device.

    I am sending the .dat file, renamed as init_1.bin file in our server and also compare the data for any type of data corruption. Data is also correct.

    Is possible can we have a code review session on this?  

Reply
  • Hi

    I am trying to implement you code UART DFU Master example, but not able to compile it. So what I did to compare the code with my DFU controller code that I had written in esp8266.

    Both the codes are same. 

    I also traced the uart lines using logic analyzer and data tx rx is also good and expected values.

    Still when I send the execution command I am not able to receive any response from the device.

    I am sending the .dat file, renamed as init_1.bin file in our server and also compare the data for any type of data corruption. Data is also correct.

    Is possible can we have a code review session on this?  

Children
Related