nrf52832 OTA over ESB based on SDK17.1.0

Hi everyone:    I developed an application based on ESB wireless communication protocol ofr the nRF52832, and I would like to perform an OTA DFU with it.    Do you know any example of some over the air FW upgrade of nRF52832 chip via ESB protocol.

    SDK is 17.1.0.

Best regards,

Lurn.

  • No worries, Lurn,

    What you are writing makes sense to me! So we are back at having a UART bootloader without the possibility to use nrfutil, if I understand correctly.

    However, you could still use nrfutil to generate the DFU images on a computer, and then somehow transfer that to the computer that will transfer the image to the nrf-device, right?

    In that case, you would only need the ARM device to run the part of nrfutil that does the transfer, which is only a small part of nrfutil.

    While we do not have a strip down version of nrfutil, the colleague that wrote the getting started with DFU guide also wrote a sample application that can run on another nRF device, and will update the target nRF device over UART. Click that link, and search for "DFU Master Code". 

    I believe it may be easier to analyze and reverse engineer the process from that sample than it is to interpret the nrfutil source code.

    Unfortunately, we don't have very much good documentation on nrfutil, but a couple of useful links are:

    A general description of the DFU procedure can be found here.

    The UART Serial protocol is described here.

    Just in case, the link to nrfutil source code. But I find it difficult to navigate to understand the protocol.

    Lastly, one additional hint could be to hook on a UART to computer sniffer/analyzer, and observe an update, to see if you can make sense of the packets, as described in the links above.

    Best of luck!

    Best regards,

    Edvin

  • Hi Edvin,

    I read the code about "DFU Master", I think in this code it use another nrf-device, and what I should do is make sure my nrf-device is in DFU mode, and just run the "DFU Mast code", am I understand currently?

    And a question about it, what is the format of image .hex/.bin or .zip?

    If it run a part of nrfutil that does the transfer, I think it should be a .zip which made by nrfutil, Am i right?

    Best regards,

    Lurn

  • The DFU master does what the computer running nrfutil does when transferring the image. 

    Lurn_Z said:

    what I should do is make sure my nrf-device is in DFU mode, and just run the "DFU Mast code", am I understand currently?

    Yes.

    I have not tested this, but I believe there is some description saying how to do the test. Check out the DFU_SPI_readme.docx (yes, it is written for the SPI variant, but it covers your questions).

    It explains how to transfer the DFU image (.zip file) to the flash of the DFU master by using JFlash. I played around with .bin files the other day. The thing with these is that they are not address mapped, like hex files are. But there is a tool that you can test (pip install bin2hex.py), and you can use this to convert .bin files to .hex files with an offset, so that you can program them using nrfjprog (for testing purposes).

    bin2hex.py --offset 0x12000000 bin_file.bin hex_file.hex
    nrfjprog --program hex_file.hex

    Lurn_Z said:
    And a question about it, what is the format of image .hex/.bin or .zip?

    Read the doc for the SPI sample, and you will see, but in short, it is the .bin and .dat inside the .zip that actually contains the data that is needed.

    BR,
    Edvin

  • I didn't find the file "nrf_serial_dfu.h"

    and also I did not have the pack.

    the download log is here.

    Cannot download file developer.nordicsemi.com/.../NordicSemiconductor.nRF_DeviceFamilyPack.8.15.0.pack: Object not found

  • Hi Edvin,

    I want to port this code to an example for my SDK such as \examples\peripheral\blinky

    but it have too much Compile Error, although I included the header file still got many undefined errors.

    can you give me a code base SDK 17.1.0 ? I want to test it.

    Best regards,

    Lurn

Related