nrfutil dfu ble failure: pc_ble_driver_py.exceptions.NordicSemiException: Failed to open. Error code: NRF_ERROR_TIMEOUT

Hi,

I am trying to to perform a DFU update to my device using an ANNA-B112 evaluation kit connected to my Ubuntu machine. The device supports DFU update. Here's what I'm doing and the result:

> nrfutil dfu ble -pkg MyPackage.zip -ic NRF52 -p /dev/ttyACM1 -n "MyDevice" -f

Board already flashed with connectivity firmware.
  [------------------------------------]    0%
Traceback (most recent call last):
  File "nordicsemi/__main__.py", line 1555, 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 1215, 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 474, in open
  File "nordicsemi/dfu/dfu_transport_ble.py", line 103, in open
  File "pc_ble_driver_py/ble_driver.py", line 106, in wrapper
pc_ble_driver_py.exceptions.NordicSemiException: Failed to open. Error code: NRF_ERROR_TIMEOUT
[2665744] Failed to execute script '__main__' due to unhandled exception!

With this little information in the error message and the way nrfutil is distributed nowadays, it is pretty hard to start debugging this issue. What is actually failing here and any ideas to fix it?

Parents Reply Children
  • Version 7.7.1 and downloaded from the main page

  • Hi,

    It seems like nrfutil is not able to establish a connection with your device. Can you try to use nRF Command line tools and see if the device is listed if you run:

    nrfjprog --ids

    and then see if you're able to recover the device if you run:

    nrfjprog --recover

    Next double check that you're using the correct serial port by running 

    ls /dev/tty*

    regards

    Jared 

  • Thanks for the response! I feel like there is a misunderstanding here. When performing the BLE DFU using nrfutil, there are two devices involved:

    1. The development kit performing the DFU
    2. The target device to which DFU is performed

    It seems to me that there is no problem in establishing a connection to device 1, i.e., the ANNA-B112 evaluation kit. I am able to use all of the above nrfjprog commands you suggested and it is recognized by nrufil as it is able to flash the connectivity firmware and verify that it is indeed flashed to the device as can be seen in the logs I posted in the original post:

    Board already flashed with connectivity firmware.

    Or are you implying that nrfutil is not able to establish a connection to device 2, i.e., my target BLE device? That would make sense and would be a starting point in debugging this issue. However, if that is the case, I fail to see how could I use the nrfjprog and ls commands you suggested to verify this issue. The BLE device is not connected to the PC in any way. I can however see the target device when scanning for bluetooth devices.

  • Hi,

    I see. I honestly believed that the issue was the first case but thanks for clarifying. 

    1. Can you specify what SDK version you used on the target device? Is it BLE OTA from nRF5SDK or from nRF Connect SDK?
    2. When you scan for the device, do you see it advertise with the name "MyDevice" specifically? 

    Also, with nrfutil you can add --verbose option to make the logs more verbose. It would be great if you can do that and reshare the log again.

    regards

    Jared 

  • Hi,

    1. We are using nRF5SDK 17.1.0

    2. Yes

    We are able to do the DFU update from PC by customizing the deprecated nrfutil python package (without customizing it, it is not possible to do it from PC directly. A development kit is needed). The problem is with this new nrfutil that is not distributed as a python package. We cannot currently use the deprecated nrfutil python package, as installed with pip, because it does not support new Python versions.

    Additionally, DFU update is working from the Nordic DFU mobile application.

Related