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
  • Something not right with that pre-release:

    # pip install /home/david.fernandez/Downloads/Nordic/pc_ble_driver_py-0.11.4a0.tar.gz 
    WARNING: Running pip install with root privileges is generally not a good idea. Try `pip install --user` instead.
    Processing /home/david.fernandez/Downloads/Nordic/pc_ble_driver_py-0.11.4a0.tar.gz
    Requirement already satisfied: enum34 in /usr/lib/python2.7/site-packages (from pc-ble-driver-py==0.11.4a0)
    Requirement already satisfied: wrapt in /usr/lib/python2.7/site-packages (from pc-ble-driver-py==0.11.4a0)
    Requirement already satisfied: future in /usr/lib/python2.7/site-packages (from pc-ble-driver-py==0.11.4a0)
    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.4a0
    

    But:

    $ nrfutil -vvvv dfu ble -f -p /dev/ttyACM0 -ic NRF52 -pkg /home/david.fernandez/src_mgt/rowesolutions/Doorlock/_build/DoorlockFull_dfu.zip 
    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 802, in ble
        ble_driver_init(conn_ic_id)
      File "/usr/lib/python2.7/site-packages/nordicsemi/__main__.py", line 65, in ble_driver_init
        from pc_ble_driver_py.ble_driver    import BLEDriver, Flasher
      File "/usr/lib/python2.7/site-packages/pc_ble_driver_py/ble_driver.py", line 101, in <module>
        raise RuntimeError('Failed to locate the pc_ble_driver shared library: {}.'.format(shlib_path))
    RuntimeError: Failed to locate the pc_ble_driver shared library: /usr/lib/python2.7/site-packages/pc_ble_driver_py/lib/linux/x86_64/libpc_ble_driver_shared_sd_api_v3.so.
    

Reply
  • Something not right with that pre-release:

    # pip install /home/david.fernandez/Downloads/Nordic/pc_ble_driver_py-0.11.4a0.tar.gz 
    WARNING: Running pip install with root privileges is generally not a good idea. Try `pip install --user` instead.
    Processing /home/david.fernandez/Downloads/Nordic/pc_ble_driver_py-0.11.4a0.tar.gz
    Requirement already satisfied: enum34 in /usr/lib/python2.7/site-packages (from pc-ble-driver-py==0.11.4a0)
    Requirement already satisfied: wrapt in /usr/lib/python2.7/site-packages (from pc-ble-driver-py==0.11.4a0)
    Requirement already satisfied: future in /usr/lib/python2.7/site-packages (from pc-ble-driver-py==0.11.4a0)
    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.4a0
    

    But:

    $ nrfutil -vvvv dfu ble -f -p /dev/ttyACM0 -ic NRF52 -pkg /home/david.fernandez/src_mgt/rowesolutions/Doorlock/_build/DoorlockFull_dfu.zip 
    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 802, in ble
        ble_driver_init(conn_ic_id)
      File "/usr/lib/python2.7/site-packages/nordicsemi/__main__.py", line 65, in ble_driver_init
        from pc_ble_driver_py.ble_driver    import BLEDriver, Flasher
      File "/usr/lib/python2.7/site-packages/pc_ble_driver_py/ble_driver.py", line 101, in <module>
        raise RuntimeError('Failed to locate the pc_ble_driver shared library: {}.'.format(shlib_path))
    RuntimeError: Failed to locate the pc_ble_driver shared library: /usr/lib/python2.7/site-packages/pc_ble_driver_py/lib/linux/x86_64/libpc_ble_driver_shared_sd_api_v3.so.
    

Children
No Data
Related