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
  • Done:

    # pip install pc-ble-driver-py
    WARNING: Running pip install with root privileges is generally not a good idea. Try `pip install --user` instead.
    Collecting pc-ble-driver-py
      Downloading https://files.pythonhosted.org/packages/38/6f/0bd202ea117a2c944234992f4d9f8c8b68964470dacc34164f20111712a9/pc_ble_driver_py-0.11.4.tar.gz (8.0MB)
        100% |████████████████████████████████| 8.0MB 158kB/s 
    Requirement already satisfied: enum34 in /usr/lib/python2.7/site-packages (from pc-ble-driver-py)
    Requirement already satisfied: wrapt in /usr/lib/python2.7/site-packages (from pc-ble-driver-py)
    Requirement already satisfied: future in /usr/lib/python2.7/site-packages (from pc-ble-driver-py)
    Installing collected packages: pc-ble-driver-py
      Running setup.py install for pc-ble-driver-py ... done
    Successfully installed pc-ble-driver-py-0.11.4
    

    Still 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
    Board already flashed with connectivity firmware.
      [------------------------------------]    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
  • Done:

    # pip install pc-ble-driver-py
    WARNING: Running pip install with root privileges is generally not a good idea. Try `pip install --user` instead.
    Collecting pc-ble-driver-py
      Downloading https://files.pythonhosted.org/packages/38/6f/0bd202ea117a2c944234992f4d9f8c8b68964470dacc34164f20111712a9/pc_ble_driver_py-0.11.4.tar.gz (8.0MB)
        100% |████████████████████████████████| 8.0MB 158kB/s 
    Requirement already satisfied: enum34 in /usr/lib/python2.7/site-packages (from pc-ble-driver-py)
    Requirement already satisfied: wrapt in /usr/lib/python2.7/site-packages (from pc-ble-driver-py)
    Requirement already satisfied: future in /usr/lib/python2.7/site-packages (from pc-ble-driver-py)
    Installing collected packages: pc-ble-driver-py
      Running setup.py install for pc-ble-driver-py ... done
    Successfully installed pc-ble-driver-py-0.11.4
    

    Still 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
    Board already flashed with connectivity firmware.
      [------------------------------------]    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