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

Can we perform DFU on NCP?

Hi team,

We are using Raytech nrf52840 dongles as NCP connected through USB to RaspPi compute module. We would like to upgrade the NCP application in the field using DFU.

We thought of doing this through Rasp Pi using nrfutil commands but we were unable to do so due to support not available for arm.

Is there a way to upgrade the application on NCP in the filed? If yes, kindly share the details.

Thanks

NM

  • Hi,

    If you are thinking about doing serial DFU, this should be possible with nrfutil on the Raspberry Pi. I have just tested it and it seems to work just fine. The lack of ARM support is just relevant for the use of nrfjprog, which depends on Segger J-Link libraries.

    These are the commands I used for testing DFU on a nRF52840 Dongle connected to a Raspberry Pi running our OpenThread Border Router image. The dongle was flashed with the NCP image, but I manually set the dongle in Bootloader mode by pressing the button.

    ## Install pip for Python 2.7:
    wget https://bootstrap.pypa.io/get-pip.py
    sudo python get-pip.py
    
    ## Get nrfutil with Python 2.7 support (if you have installed Python 3, you should be able to use latest):
    wget https://github.com/NordicSemiconductor/pc-nrfutil/archive/v5.2.0.zip
    mkdir pc-nrfutil-v5.2.0
    cd pc-nrfutil-v5.2.0
    unzip ../v5.2.0.zip
    
    ## Install requirements:
    sudo python -m pip -r requirements.txt
    
    ## Get a "dummy" DFU image to test with:
    cd ..
    wget https://github.com/NordicSemiconductor/pc-ble-driver/releases/download/v4.1.1/nrf-ble-driver-4.1.1-linux_x86_64.tar.gz
    tar -xf nrf-ble-driver-4.1.1-linux_x86_64.tar.gz nrf-ble-driver-4.1.1-linux_x86_64
    cp nrf-ble-driver-4.1.1-linux_x86_64/share/nrf-ble-driver/hex/sd_api_v6/connectivity_4.1.1_usb_with_s140_6.1.1_dfu_pkg.zip pc-nrfutil-v5.2.0/
    
    ## Perform serial DFU:
    cd pc-nrfutil-v5.2.0
    sudo python nordicsemi/__main__.py dfu serial -pkg connectivity_4.1.1_usb_with_s140_6.1.1_dfu_pkg.zip -p /dev/ttyACM0

    (Note that I had to manually rewrite the commands, as the BR is on a separate network. There can be some spelling mistakes or syntax errors in there).

    Best regards,
    Jørgen

  • Hi Jorgen,

    I am unable to enter the Bootloader mode. Now I am trying with the nrf52840 dongle.

    I have programmed "thread_ncp_ftd_usb_pca10056.hex" on our NCP dongles. As I press and hold the RESET button, the RED led is not blinking.

    How should I proceed now?

    Thanks

    NM

  • You should not need to hold the reset button, it is sufficient to press and release it. Have you flashed the dongle through the SWD interface in the past? If you have then you most likely have erased the bootloader. Please see the nRF52840 Dongle Programming Tutorial for more details on how to recover from this.

  • Thank you. We could update the NCP firmware. Kindly close this ticket.

  • Hi Jorgen,

    To upgrade the image on NCP using serial DFU, as you had mentioned that the NCP needs to be in bootloader mode.

    We are trying to automate this whole process of NCP upgrade. basically we want to do an OTA DFU on NCP.

    The above steps you had mentioned using nrfutil can only be done if someone press and release the reset button.

    Is there any way to remove this manual button press and release?

    Thanks, NM

Related