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

Error while doing USB DFU

Hello,

I am trying to do USB DFU on (NRF52840 with SDK 15.2) but when i run the nrfutil command it gives an error:

command: nrfutil dfu usb_serial -pkg ble_hrs_combo.zip -p /dev/ttyACM0 -b 115200

Output:
NordicSemiException: Unexpected Executed OP_CODE.
Expected: 0x02 Received: 0x41

I have uploaded the open bootloader hex file from examples/dfu/open_bootloader. and created the zip package using the following command:

nrfutil pkg generate --debug-mode --hw-version 52 --sd-req 0x008F --application ble_hrs_combo.hex ble_hrs_combo.zip

The ble_hrs_combo.hex was generated by merging the examples/ble_app_hrs and softdevice S140 (s140_nrf52_6.1.0).

What can be the problem?

  [------------------------------------]    0%
Traceback (most recent call last):
  File "/usr/local/bin/nrfutil", line 11, in <module>
    load_entry_point('nrfutil==4.0.0', 'console_scripts', 'nrfutil')()
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/nordicsemi/__main__.py", line 827, in usb_serial
    do_serial(package, port, connect_delay, flow_control, packet_receipt_notification, baud_rate, False)
  File "/usr/local/lib/python2.7/dist-packages/nordicsemi/__main__.py", line 793, in do_serial
    dfu.dfu_send_images()
  File "/usr/local/lib/python2.7/dist-packages/nordicsemi/dfu/dfu.py", line 129, in dfu_send_images
    self._dfu_send_image(self.manifest.application)
  File "/usr/local/lib/python2.7/dist-packages/nordicsemi/dfu/dfu.py", line 90, in _dfu_send_image
    self.dfu_transport.open()
  File "/usr/local/lib/python2.7/dist-packages/nordicsemi/dfu/dfu_transport_serial.py", line 213, in open
    self.__set_prn()
  File "/usr/local/lib/python2.7/dist-packages/nordicsemi/dfu/dfu_transport_serial.py", line 309, in __set_prn
    self.__get_response(DfuTransportSerial.OP_CODE['SetPRN'])
  File "/usr/local/lib/python2.7/dist-packages/nordicsemi/dfu/dfu_transport_serial.py", line 441, in __get_response
    + 'Expected: 0x{:02X} Received: 0x{:02X}'.format(operation, resp[1]))
pc_ble_driver_py.exceptions.NordicSemiException: Unexpected Executed OP_CODE.
Expected: 0x02 Received: 0x41

Parents Reply Children
Related