Fail to DFU OTA by using nrfutil with nRF52840 dongle

Hi,

I am trying to DFU OTA by using nrfutil with nRF52840 dongle.

I have already write nRF connect desktop Bluetooth into dongle, but when I use nrfutil to do DFU OTA it shows below message.

C:\Users\22111253\Desktop\DFU OTA>nrfutil dfu ble -ic NRF52 -pkg ota_B_04_0.064.zip -p COM13 -a DE063B974CD8 -f
Flashing connectivity firmware...
Traceback (most recent call last):
File "nordicsemi\__main__.py", line 1545, in <module>
File "click\core.py", line 1137, in __call__
File "click\core.py", line 1062, in main
File "click\core.py", line 1668, in invoke
File "click\core.py", line 1668, in invoke
File "click\core.py", line 1404, in invoke
File "click\core.py", line 763, in invoke
File "nordicsemi\__main__.py", line 1187, in ble
File "nordicsemi\dfu\dfu.py", line 69, in __init__
File "nordicsemi\dfu\package.py", line 629, in unpack_package
nordicsemi.dfu.package.PackageException: Package C:\Users\22111253\AppData\Local\Temp\_MEI1442\pc_ble_driver_py\hex\sd_api_v5\connectivity_4.1.2_usb_with_s132_5.1.0_dfu_pkg.zip not found.
[40156] Failed to execute script '__main__' due to unhandled exception!

I want to know which step I did wrong, thank you.

  • Hi,

    The error is because you are using "-f" but for some reason the connectivity firmware is not found. That should be located where you have your python packages (on my computer it is under "C:\Users\eith\AppData\Local\Programs\Python\Python38\Lib\site-packages\pc_ble_driver_py\hex\sd_api_v5"). I also notice a strange version number, as the latest is 4.1.4. Perhaps you can try updating pc-ble-driver-py using "pip install -U pc-ble-driver-py" and see if that resolves the issue?

    If not, it should also work to simply download 3034.connectivity_4.1.4_usb_with_s132_5.1.0.hex and program the dongle with it using nRF Connect Programmer. Then you do not need the -f for the nrfutil command as the dongle already has the correct firmware.

  • Hi,

    It seems work when I delete -f at the end, and dongle connect to my DUT, but still can't do DFU.

    Here is the message

    C:\Users\22111253\Desktop\DFU OTA>nrfutil dfu ble -ic NRF52 -pkg ota_B_04_0.064.zip -p COM13 -a DE063B974CD8
    [------------------------------------] 0%
    Traceback (most recent call last):
    File "pc_ble_driver_py\ble_adapter.py", line 220, in att_mtu_exchange
    File "pc_ble_driver_py\ble_driver.py", line 106, in wrapper
    pc_ble_driver_py.exceptions.NordicSemiException: Failed to ble_gattc_exchange_mtu_req. Error code: NRF_ERROR_INVALID_PARAM

    The above exception was the direct cause of the following exception:

    Traceback (most recent call last):
    File "nordicsemi\__main__.py", line 1545, in <module>
    File "click\core.py", line 1137, in __call__
    File "click\core.py", line 1062, in main
    File "click\core.py", line 1668, in invoke
    File "click\core.py", line 1668, in invoke
    File "click\core.py", line 1404, in invoke
    File "click\core.py", line 763, in invoke
    File "nordicsemi\__main__.py", line 1205, in ble
    File "nordicsemi\dfu\dfu.py", line 127, in dfu_send_images
    File "nordicsemi\dfu\dfu.py", line 88, in _dfu_send_image
    File "nordicsemi\dfu\dfu_transport_ble.py", line 475, in open
    File "nordicsemi\dfu\dfu_transport_ble.py", line 173, in connect
    File "pc_ble_driver_py\ble_adapter.py", line 222, in att_mtu_exchange
    pc_ble_driver_py.exceptions.NordicSemiException: MTU exchange request failed. Common causes are: missing att_mtu setting in ble_cfg_set, different config tags used in ble_cfg_set and connect.
    [7268] Failed to execute script '__main__' due to unhandled exception!

    Should I need to remove nrfutil and reinstall it ? I am still using python2.7,thank you.

  • Hi,

    The latest nrfutil is tested wtih Pytnon 3.8, so I recommend you use that (you can normally  have parallell installs of python2 and python3, so you can still keep python2 if you need that for some old stuff). 

Related