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

nrfutil dfu ble timeout

I'm attempting to use nrfutil with a nRF52 DK to perform dfu over BLE. The command I'm using and the result I get is:

% nrfjprog --eraseall                                       
Erasing user available code and UICR flash areas.
Applying system reset.
% nrfutil dfu ble -ic NRF52 -pkg app_dfu_package_1_1.0.0.zip
No target selected. Default device name: DfuTarg is used.
Please select connectivity serial port:
	0 : /dev/tty.usbmodem0006821181671 - 000682118167
Enter your choice: : 0

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.8/bin/nrfutil", line 11, in <module>
    load_entry_point('nrfutil==6.1.0', 'console_scripts', 'nrfutil')()
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/nordicsemi/__main__.py", line 1197, in ble
    dfu.dfu_send_images()
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/nordicsemi/dfu/dfu.py", line 115, in dfu_send_images
    self._dfu_send_image(self.manifest.softdevice_bootloader)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/nordicsemi/dfu/dfu.py", line 88, in _dfu_send_image
    self.dfu_transport.open()
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/nordicsemi/dfu/dfu_transport_ble.py", line 473, in open
    self.dfu_adapter.open()
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/nordicsemi/dfu/dfu_transport_ble.py", line 103, in open
    self.adapter.driver.open()
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pc_ble_driver_py/ble_driver.py", line 103, in wrapper
    raise NordicSemiException(
pc_ble_driver_py.exceptions.NordicSemiException: Failed to open. Error code: NRF_ERROR_TIMEOUT

This is with the latest nrfutil 6.1.0, on windows or mac, the result is the same.

Parents
  • Hi, 

    Try to add -f into the command to flash the connectivity FW as

    nrfutil dfu ble -ic NRF52 -f -pkg app_dfu_package_1_1.0.0.zip

    -Amanda H.

  • Ok it would be good if the error suggested that.

    Now I have another error:

    % nrfutil dfu ble -ic NRF52 -f -pkg app_dfu_package_1_1.0.0.zip
    No target selected. Default device name: DfuTarg is used.
    Please select connectivity serial port:
    	0 : /dev/tty.usbmodem0006821181671 - 000682118167
    Enter your choice: : 0
    Traceback (most recent call last):
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pc_ble_driver_py/ble_driver.py", line 2851, in __init__
        snr = [d.serial_number for d in serial_ports if d.port == serial_port][0]
    IndexError: list index out of range
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/Library/Frameworks/Python.framework/Versions/3.8/bin/nrfutil", line 11, in <module>
        load_entry_point('nrfutil==6.1.0', 'console_scripts', 'nrfutil')()
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/click/core.py", line 829, in __call__
        return self.main(*args, **kwargs)
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/click/core.py", line 782, in main
        rv = self.invoke(ctx)
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
        return _process_result(sub_ctx.command.invoke(sub_ctx))
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
        return _process_result(sub_ctx.command.invoke(sub_ctx))
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
        return ctx.invoke(self.callback, **ctx.params)
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/click/core.py", line 610, in invoke
        return callback(*args, **kwargs)
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/nordicsemi/__main__.py", line 1159, in ble
        flasher = Flasher(serial_port=port, snr=jlink_snr)
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pc_ble_driver_py/ble_driver.py", line 2853, in __init__
        raise NordicSemiException("Board not found: {}".format(serial_port or snr))
    pc_ble_driver_py.exceptions.NordicSemiException: Board not found: /dev/tty.usbmodem0006821181671

    edit: this only occurs on macos, it worked on windows.

Reply
  • Ok it would be good if the error suggested that.

    Now I have another error:

    % nrfutil dfu ble -ic NRF52 -f -pkg app_dfu_package_1_1.0.0.zip
    No target selected. Default device name: DfuTarg is used.
    Please select connectivity serial port:
    	0 : /dev/tty.usbmodem0006821181671 - 000682118167
    Enter your choice: : 0
    Traceback (most recent call last):
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pc_ble_driver_py/ble_driver.py", line 2851, in __init__
        snr = [d.serial_number for d in serial_ports if d.port == serial_port][0]
    IndexError: list index out of range
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/Library/Frameworks/Python.framework/Versions/3.8/bin/nrfutil", line 11, in <module>
        load_entry_point('nrfutil==6.1.0', 'console_scripts', 'nrfutil')()
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/click/core.py", line 829, in __call__
        return self.main(*args, **kwargs)
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/click/core.py", line 782, in main
        rv = self.invoke(ctx)
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
        return _process_result(sub_ctx.command.invoke(sub_ctx))
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
        return _process_result(sub_ctx.command.invoke(sub_ctx))
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
        return ctx.invoke(self.callback, **ctx.params)
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/click/core.py", line 610, in invoke
        return callback(*args, **kwargs)
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/nordicsemi/__main__.py", line 1159, in ble
        flasher = Flasher(serial_port=port, snr=jlink_snr)
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pc_ble_driver_py/ble_driver.py", line 2853, in __init__
        raise NordicSemiException("Board not found: {}".format(serial_port or snr))
    pc_ble_driver_py.exceptions.NordicSemiException: Board not found: /dev/tty.usbmodem0006821181671

    edit: this only occurs on macos, it worked on windows.

Children
Related