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

DFU over BLE using nRF52840-Dongle fails with error code 8

Hello!

I'm trying to perform DFU over BLE using a nRF52840-Dongle (PCA10059) devkit. I'm getting the following error:

nrfutil dfu ble -ic NRF52 -pkg '/Users/user/Downloads/package.zip' -p /dev/tty.usbmodem -a 12:34:56:78:99:00

Traceback (most recent call last):

  File "/Library/Frameworks/Python.framework/Versions/3.8/bin/nrfutil", line 33, in <module>

    sys.exit(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 127, in dfu_send_images

    self._dfu_send_image(self.manifest.application)

  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 474, in open

    self.target_device_name, self.target_device_addr = self.dfu_adapter.connect(

  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/nordicsemi/dfu/dfu_transport_ble.py", line 153, in connect

    self.verify_stable_connection()

  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/nordicsemi/dfu/dfu_transport_ble.py", line 262, in verify_stable_connection

    self.adapter.driver.ble_gap_scan_stop()

  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 ble_gap_scan_stop. Error code: NRF_ERROR_INVALID_STATE

I've tried to add '-cd 5' and '-f' options, but error still happens. 

I've seen a similar question, but there is no solution.

Parents Reply
  • Nrfutil 6.1.0, nRFconnect 3.5.0, bluetooth low energy 2.4.0.

    It works correctly with nRF connect. 

    I tried firmware that suggests bluetooth low energy app, I tried to add -f option to nrfutil dfu ble command, no changes.

    One more detail: I have a custom application with pc-ble-driver 4.1.2. I'm using it to scan devices, select one and run nrfutil. Before running nrfutil I deinitialize dongle with the following commands:

    sd_rpc_conn_reset(adapter, SOFT_RESET);
    sd_rpc_close(adapter);

Children
Related