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

DFU don't start with nrfutil dfu ble

Hi, 

I face a problem when trying to perform a DFU firmware update via command line using nrfutil dfu ble. 

I'm using windows 10 and nrfutil.exe version 3.5.0

nrfutil dfu ble -ic NRF52 -pkg app_dfu_package.zip -p COM7 -n "DfuBoot_2018_07_18"
  [------------------------------------]    0%
Traceback (most recent call last):
  File "nordicsemi\__main__.py", line 983, in <module>
  File "site-packages\click\core.py", line 722, in __call__
  File "site-packages\click\core.py", line 697, in main
  File "site-packages\click\core.py", line 1066, in invoke
  File "site-packages\click\core.py", line 1066, in invoke
  File "site-packages\click\core.py", line 895, in invoke
  File "site-packages\click\core.py", line 535, in invoke
  File "nordicsemi\__main__.py", line 834, in ble
  File "nordicsemi\dfu\dfu.py", line 129, in dfu_send_images
  File "nordicsemi\dfu\dfu.py", line 90, in _dfu_send_image
  File "nordicsemi\dfu\dfu_transport_ble.py", line 450, in open
  File "nordicsemi\dfu\dfu_transport_ble.py", line 106, in open
  File "site-packages\pc_ble_driver_py\ble_driver.py", line 126, in wrapper
pc_ble_driver_py.exceptions.NordicSemiException: Failed to open. Error code: 13
Failed to execute script __main__

I am using for the PCA10040 EVB as connectivity device

The SoftDevice is: s132_nrf52_5.0.0_softdevice.hex

The SDK is: nRF5_SDK_14.2.0_17b948a

The comport is COM7, since this is the com that I see when using the "nRF Connect" PC application and also with the Device manager.

COM7     DEV

I am sure that I have the connectivity firmware on the connectivity device, since when I try it with option -f it give a feedback: "Board already flashed with connectivity firmware."

When I am using the  "nRF Connect" PC application, the secure DFU process is working, but I want to use the command line DFU since I have the nrfutil python source code and in this way I may try to change some timeouts for our development process.

Thanks,

Yosi.

Parents
  • Hello,

    Are you sure that the COM port / the nRF is not used by another application? 

    Try to power cycle the board before running the nrfutil command.

    I just tested this, with the -f command:

    nrfutil dfu ble -ic NRF52 -pkg application\app_dfu_package.zip -p COM20 -f -n "Nordic_Buttonless"

     

    I have the following versions of Python and nrfutil:

    >python --version
    Python 2.7.12
    
    >nrfutil version
    nrfutil version 3.5.1

    Can you try to update to nrfutil 3.5.1, and python 2.7.12, with the "-f" and try to close anything that may use the nRF connected to COM7.

     

    Best regards,

    Edvin

  • Hello,

    I have tried a lot of things to make it work, yet with no success.

    Regarding your suggestions:

    1) The com port is not used by another application. 

    2) I did power cycle of the board before running the nrfutil command.

    3) My python is 2.7.12 and I have tried several versions of nrfutil (including 3.5.1) on two different PC's .

    4) I did several tried with the "-f", always return with: "Board already flashed with connectivity firmware."

    Other experiments I have tried:

    5) Try with different evaluation boards with NRF51 and NRF52 as the connectivity board.

    6) Changing to other version of the nrfutil (3.5.1; 3.4.0; 3.5.0)

    7) Try with different PC with windows 7, with new installation of the "pip install nrfutil"

    I searched google on: "nrfutil dfu ble error code 13"  and I have found that it is repeated issue for many other users, yet there was no good answer for this problem. 

    ERROR 13

    Maybe it has to do with the fact that my target board is in DFU mode from the bootloader itself and not from "buttonless application"?

    Could it be that there is an issue with the "pc_ble_driver_py" ?

    Is there any importance to the order of the parameter given to "nrfutil dfu ble ..." command?

    for example:

    nrfutil dfu ble -ic NRF52 -n "DfuBoot_2018_08_16" -p COM45 -pkg Fake_app.zip
    nrfutil dfu ble -ic NRF52 -p COM45 -pkg Fake_app.zip -n "DfuBoot_2018_08_16"

    p.s. in the other PC the "Jlink CDC Uart port" was changed to COM45.

  • It seems to me it has to be one of two things:

    1) There is something wrong with your nrfutil application.

    2) There is something wrong with how you are generating your package.

    Have you tried this command with one of the example ZIP files provided with the SDK?  Also, what command are you using to generate the package?

Reply Children
No Data
Related