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.

  • Lurn_Z said:
    I just modify the UART TX/RX pin number, the rx default config is nrf_gpio_cfg_input(p_config->pselrxd, NRF_GPIO_PIN_NOPULL).

    What did you change them to, and what are they connected to?

    Lurn_Z said:
    Is our DFU mode standard DFU? I mean I can see its name like ...DFU... on any device?

    The log that you posted now indicates that your bootloader is running, and that you are in DFU mode! 

    No, you will not. This is a UART bootloader. Where exactly did you want to see it? 

  • Or, let me rephrase the last question:

    How do you want to update the device? From where do you want to send your new application to the nRF?

  • What did you change them to, and what are they connected to?

    No, I didn't change it, I mixed the other ticket answer.

    How do you want to update the device? From where do you want to send your new application to the nRF?

    I want to update the device by UART, and I will send it to nrf through the UART of other board.

    Do I need to do anything on other boards? For example on PC I need to use nrfjprog to update.

  • I program the mbr and bootloader, after enter dfu I use this command to update

    nrfutil sfu serial -pkg dfu_img.zip -p COM3 -fc 0 -b 115200

    It don't work, logs are here.

    when change 115200 to 9600, I only get one line  >>  app:Received an error: 0x0000004!

    So, did I forget something? All command is here.

    nrfutil settings generate --family NRF52 --application app.hex --application-version 0 --bootloader-version 0 --bl-settings-version 2 settings.hex
    nrfutil pkg generate --application app.hex --application-version 2 --sd-req 0x00 --hw-version 52 --key-file private.key dfu_image.zip
    
    nrfjprog --eraseall -f NRF52
    nrfjprog --program mbr_nrf52_2.4.1_mbr.hex --verify -f NRF52
    nrfjprog --program bootloader.hex --verify -f NRF52
    nrfjprog --reset -f NRF52
    
    
    nrfutil dfu serial -pkg dfu_image.zip -p COM3 -fc 0 -b 115200

    Another questions:

    1.Now I can enter DFU because I didn't program my application, so when I also program application.hex and settings.hex, how should I enter the DFU mode?

    2.My application used UARTE, will it affect my use of uart in bootloader?

    BR,

    Lurn

  • Lurn_Z said:
    No, I didn't change it, I mixed the other ticket answer.

    In that case, I suggest we only focus on one ticket at the time. I suggest this one, and we can continue with the other when this one is solved.

    Lurn_Z said:
    when change 115200 to 9600, I only get one line  >>  app:Received an error: 0x0000004!

    That is because you are using the wrong baud rate. Change it back to 115200.

    I still think you would have saved yourself a lot of trouble by getting up and running on a DK before attempting to do this on a custom board, and you may still save time by doing so.

    So it fails to send the serial response. The only possible reason I can think of is that you have enabled hardware flow control (HWFC) in your bootloader project. Try to disable it by setting:

    #define NRF_DFU_SERIAL_UART_USES_HWFC 0

    in your sdk_config.h (It is set to 1 by default. Search for this define in your bootloader's sdk_config.h).

    Lurn_Z said:
    I want to update the device by UART, and I will send it to nrf through the UART of other board.

    In that case, you will not see it in your nRF Connect for Android/iOS, as you would if you were using the BLE bootloader, for obvious reasons.

    Lurn_Z said:
    Do I need to do anything on other boards? For example on PC I need to use nrfjprog to update.

    From the other board, you need to transfer the image. For how to do this, I am afraid we don't have a very good documentation. You can look into the DFU library. There are some useful links from here. Alternatively, you need to look at the implementation of nrfutil (on github)

    Lastly, we have an unofficial implementation of the DFU master, which you can find in this tutorial:

     Getting started with Nordic's Secure DFU bootloader, a step by step guide 

    (Search for DFU master code).

    Best regards,

    Edvin

Related