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

nrfutil dfu ble seems to fail suddenly.

It was working a few times, then suddenly I started to get these errors, which I only got previously when not running as root (perhaps because it did not have permission to open the serial port), but now it happens all the time.

I have rebooted, and still the same.

I have tried to open the serial port with minicom and it works, seems to be sending the same few bytes every half a second.

I have installed the nrfutil with:

# pip install intelhex
# pip install nrfutil

Never a problem, and did not change anything...

So no idea why... Help would be greatly appreciatted as it is urgent to get that working again.

# nrfutil dfu ble -p /dev/ttyACM0 -ic NRF52 -pkg /home/david.fernandez/src_mgt/rowesolutions/Doorlock/_build/DoorlockFull_dfu.zip
No target selected. Default device name: DfuTarg is used.
  [------------------------------------]    0%
Traceback (most recent call last):
  File "/usr/bin/nrfutil", line 11, in <module>
    load_entry_point('nrfutil==3.5.1', 'console_scripts', 'nrfutil')()
  File "/usr/lib/python2.7/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python2.7/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python2.7/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/nordicsemi/__main__.py", line 838, in ble
    dfu.dfu_send_images()
  File "/usr/lib/python2.7/site-packages/nordicsemi/dfu/dfu.py", line 117, in dfu_send_images
    self._dfu_send_image(self.manifest.softdevice_bootloader)
  File "/usr/lib/python2.7/site-packages/nordicsemi/dfu/dfu.py", line 90, in _dfu_send_image
    self.dfu_transport.open()
  File "/usr/lib/python2.7/site-packages/nordicsemi/dfu/dfu_transport_ble.py", line 450, in open
    self.dfu_adapter.open()
  File "/usr/lib/python2.7/site-packages/nordicsemi/dfu/dfu_transport_ble.py", line 106, in open
    self.adapter.driver.open()
  File "/usr/lib/python2.7/site-packages/wrapt/wrappers.py", line 562, in __call__
    args, kwargs)
  File "/usr/lib/python2.7/site-packages/pc_ble_driver_py/ble_driver.py", line 126, in wrapper
    raise NordicSemiException('Failed to {}. Error code: {}'.format(wrapped.__name__, err_code))
pc_ble_driver_py.exceptions.NordicSemiException: Failed to open. Error code: 13

Parents
  • Give that there were library files missing, I attempted to:

    1. Install nrfutil
    2. Save the folders /usr/lib/python2.7/site-packages/pc_ble_driver_py/lib/linux/x86_{64,32}
    3. Uninstall the pc_ble_driver_py
    4. Install your tar.gz pc_ble_driver_py
    5. Copy back the /usr/lib/python2.7/site-packages/pc_ble_driver_py/lib/linux//x86_{64,32} folders

    But I get the same problem:

    nrfutil dfu ble -f -ic NRF52 -pkg _build/Doorlock_59Full_dfu.zip
    No target selected. Default device name: DfuTarg is used.
    Please select connectivity serial port:
            0 : /dev/ttyACM0 - 000682668605
    Enter your choice: : 0
    Flashing connectivity firmware...
    Connectivity firmware flashed.
      [------------------------------------]    0%
    Traceback (most recent call last):
      File "/usr/bin/nrfutil", line 11, in <module>
        load_entry_point('nrfutil==3.5.1', 'console_scripts', 'nrfutil')()
      File "/usr/lib/python2.7/site-packages/click/core.py", line 722, in __call__
        return self.main(*args, **kwargs)
      File "/usr/lib/python2.7/site-packages/click/core.py", line 697, in main
        rv = self.invoke(ctx)
      File "/usr/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
        return _process_result(sub_ctx.command.invoke(sub_ctx))
      File "/usr/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
        return _process_result(sub_ctx.command.invoke(sub_ctx))
      File "/usr/lib/python2.7/site-packages/click/core.py", line 895, in invoke
        return ctx.invoke(self.callback, **ctx.params)
      File "/usr/lib/python2.7/site-packages/click/core.py", line 535, in invoke
        return callback(*args, **kwargs)
      File "/usr/lib/python2.7/site-packages/nordicsemi/__main__.py", line 838, in ble
        dfu.dfu_send_images()
      File "/usr/lib/python2.7/site-packages/nordicsemi/dfu/dfu.py", line 117, in dfu_send_images
        self._dfu_send_image(self.manifest.softdevice_bootloader)
      File "/usr/lib/python2.7/site-packages/nordicsemi/dfu/dfu.py", line 90, in _dfu_send_image
        self.dfu_transport.open()
      File "/usr/lib/python2.7/site-packages/nordicsemi/dfu/dfu_transport_ble.py", line 450, in open
        self.dfu_adapter.open()
      File "/usr/lib/python2.7/site-packages/nordicsemi/dfu/dfu_transport_ble.py", line 106, in open
        self.adapter.driver.open()
      File "/usr/lib/python2.7/site-packages/wrapt/wrappers.py", line 562, in __call__
        args, kwargs)
      File "/usr/lib/python2.7/site-packages/pc_ble_driver_py/ble_driver.py", line 127, in wrapper
        raise NordicSemiException('Failed to {}. Error code: {}'.format(wrapped.__name__, err_code))
    pc_ble_driver_py.exceptions.NordicSemiException: Failed to open. Error code: 13
    

Reply
  • Give that there were library files missing, I attempted to:

    1. Install nrfutil
    2. Save the folders /usr/lib/python2.7/site-packages/pc_ble_driver_py/lib/linux/x86_{64,32}
    3. Uninstall the pc_ble_driver_py
    4. Install your tar.gz pc_ble_driver_py
    5. Copy back the /usr/lib/python2.7/site-packages/pc_ble_driver_py/lib/linux//x86_{64,32} folders

    But I get the same problem:

    nrfutil dfu ble -f -ic NRF52 -pkg _build/Doorlock_59Full_dfu.zip
    No target selected. Default device name: DfuTarg is used.
    Please select connectivity serial port:
            0 : /dev/ttyACM0 - 000682668605
    Enter your choice: : 0
    Flashing connectivity firmware...
    Connectivity firmware flashed.
      [------------------------------------]    0%
    Traceback (most recent call last):
      File "/usr/bin/nrfutil", line 11, in <module>
        load_entry_point('nrfutil==3.5.1', 'console_scripts', 'nrfutil')()
      File "/usr/lib/python2.7/site-packages/click/core.py", line 722, in __call__
        return self.main(*args, **kwargs)
      File "/usr/lib/python2.7/site-packages/click/core.py", line 697, in main
        rv = self.invoke(ctx)
      File "/usr/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
        return _process_result(sub_ctx.command.invoke(sub_ctx))
      File "/usr/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
        return _process_result(sub_ctx.command.invoke(sub_ctx))
      File "/usr/lib/python2.7/site-packages/click/core.py", line 895, in invoke
        return ctx.invoke(self.callback, **ctx.params)
      File "/usr/lib/python2.7/site-packages/click/core.py", line 535, in invoke
        return callback(*args, **kwargs)
      File "/usr/lib/python2.7/site-packages/nordicsemi/__main__.py", line 838, in ble
        dfu.dfu_send_images()
      File "/usr/lib/python2.7/site-packages/nordicsemi/dfu/dfu.py", line 117, in dfu_send_images
        self._dfu_send_image(self.manifest.softdevice_bootloader)
      File "/usr/lib/python2.7/site-packages/nordicsemi/dfu/dfu.py", line 90, in _dfu_send_image
        self.dfu_transport.open()
      File "/usr/lib/python2.7/site-packages/nordicsemi/dfu/dfu_transport_ble.py", line 450, in open
        self.dfu_adapter.open()
      File "/usr/lib/python2.7/site-packages/nordicsemi/dfu/dfu_transport_ble.py", line 106, in open
        self.adapter.driver.open()
      File "/usr/lib/python2.7/site-packages/wrapt/wrappers.py", line 562, in __call__
        args, kwargs)
      File "/usr/lib/python2.7/site-packages/pc_ble_driver_py/ble_driver.py", line 127, in wrapper
        raise NordicSemiException('Failed to {}. Error code: {}'.format(wrapped.__name__, err_code))
    pc_ble_driver_py.exceptions.NordicSemiException: Failed to open. Error code: 13
    

Children
No Data
Related