Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs

Thread secure DFU

Hi,

I am working on nRF5 Thread 4.1.0 and I am trying to do Thread DFU

I am following https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.thread_zigbee.v2.0.0%2Fthread_example_dfu.html

on 6th point Use nrfutil to run the DFU:

i have run the command

nrfutil dfu thread -f -pkg app_dfu_package.zip -p COM3 --channel 11 --panid 43981 -r 4 -rs 5000 -a FF03::1

D:\nRF5xx\4.nRF5_SDK_for_Thread_and_Zigbee_v4.1.0_32ce5f8\examples\thread\dfu>nrfutil dfu thread -f -pkg app_dfu_package.zip -p COM5 --channel 11 --panid 43981 -r 4 -rs 5000 -a FF03::1
Using connectivity board at serial port: COM5
Traceback (most recent call last):
  File "C:\Python3\lib\site-packages\pc_ble_driver_py\ble_driver.py", line 3201, in call_cmd
    return subprocess.check_output(argstr, stderr=subprocess.STDOUT, shell=True)
  File "C:\Python3\lib\subprocess.py", line 424, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "C:\Python3\lib\subprocess.py", line 528, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command 'nrfjprog --snr 683959334 --verify C:\Python3\lib\site-packages\nordicsemi\thread\hex\ncp.hex --family NRF52' returned non-zero exit status 55.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Python3\Scripts\nrfutil-script.py", line 33, in <module>
    sys.exit(load_entry_point('nrfutil==6.1.3', 'console_scripts', 'nrfutil')())
  File "C:\Python3\lib\site-packages\click\core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "C:\Python3\lib\site-packages\click\core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "C:\Python3\lib\site-packages\click\core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "C:\Python3\lib\site-packages\click\core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "C:\Python3\lib\site-packages\click\core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "C:\Python3\lib\site-packages\click\core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "C:\Python3\lib\site-packages\nordicsemi\__main__.py", line 1403, in thread
    if flasher.fw_check():
  File "C:\Python3\lib\site-packages\nordicsemi\thread\ncp_flasher.py", line 56, in fw_check
    result = self.verify(self.__get_hex_path())
  File "C:\Python3\lib\site-packages\nordicsemi\thread\ncp_flasher.py", line 52, in verify
    return self.call_cmd(args)
  File "C:\Python3\lib\site-packages\wrapt\decorators.py", line 469, in _synchronized
    return wrapped(*args, **kwargs)
  File "C:\Python3\lib\site-packages\pc_ble_driver_py\ble_driver.py", line 3206, in call_cmd
    raise RuntimeError(f"{e.__str__()}\n{e.output}")
RuntimeError: Command 'nrfjprog --snr 683959334 --verify C:\Python3\lib\site-packages\nordicsemi\thread\hex\ncp.hex --family NRF52' returned non-zero exit status 55.
b'Verifying programming.\r\nERROR: Write verify failed.\r\nNOTE: For additional output, try running again with logging enabled (--log).\r\nNOTE: Any generated log error messages will be displayed.\r\n'

Parents Reply
  • Hi,

    I have python 3.9.8

    as you said  download ot_ncp_ftd_nRF52840DK.hex   to C:\Python3\Lib\site-packages\nordicsemi\thread\hex and change name to ncp.hex

    also i got the error

    D:\nRF5xx\4.nRF5_SDK_for_Thread_and_Zigbee_v4.1.0_32ce5f8\examples\thread\dfu>nrfutil dfu thread -f -pkg app_dfu_package.zip -p COM22 --channel 11 --panid 43981
    Address not specified. Using ff03::1 (all Thread nodes)
    Using connectivity board at serial port: COM22
    Flashing connectivity firmware...
    Connectivity firmware flashed.
    2021-12-17 00:04:00,840 Failed to set property PROP_IPv6_ICMP_PING_OFFLOAD
    Traceback (most recent call last):
      File "C:\Python3\lib\site-packages\nordicsemi\__main__.py", line 1438, in thread
        transport.open()
      File "C:\Python3\lib\site-packages\nordicsemi\thread\tncp.py", line 227, in open
        if (not self._attach_to_network()):
      File "C:\Python3\lib\site-packages\nordicsemi\thread\tncp.py", line 107, in _attach_to_network
        self._set_property(*props)
      File "C:\Python3\lib\site-packages\nordicsemi\thread\tncp.py", line 90, in _set_property
        raise Exception("Failed to set property {}".format(self.__class__._propid_to_str(propid)))
    Exception: Failed to set property PROP_IPv6_ICMP_PING_OFFLOAD
    Exception in thread Thread-2:
    Traceback (most recent call last):
      File "C:\Python3\lib\threading.py", line 973, in _bootstrap_inner

    even though I un Comment line 223 and 224

Children
Related