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

Parents
  • 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

Reply
  • 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

Children
No Data
Related