Dear DevZone,
I'm trying to perform a BLE OTA DFU with two nRF52840 Dev Kits.
I followed the step by step guide from Nordic provided at the following link: devzone.nordicsemi.com/.../getting-started-with-nordics-secure-dfu-bootloader
In particular:
- I generated public and private keys
- I compiled the uECC lubrary
- I built the bootloader having substituted the public_key of reference
- I generated the DFU .zip packet with example blinky using the following nrfutil command: nrfutil pkg generate --hw-version 52 --application-version 0X00 --application C:\...\blinky_pca10056_mbr.hex --sd-req 0xB6 --key-file C:\...\private.key app_dfu_package.zip
- I flashed firstly the softdevice, then the bootloader (examples\dfu\bootloader_secure_ble) on the target device (the one I want to update with OTA DFU)
Here, I verified through nRFConnect that the program start advertising the presence of the devkit as DfuTarg (I connected the other devkit to the PC as master, without code on it). Contrarily to what written in the guide, led 1 and 2 light up instead of led 3, but looking at this ticket, the state I experience should be the correct one for the entrance in DFU mode.
Now, the problem occurs when I try to perform the OTA DFU. To do this, I use nrfutil and the command:
nrfutil dfu ble -ic NRF52 -f -pkg C:\..\app_dfu_package.zip
In fact, it shows the following error:
Traceback (most recent call last):
File "c:\users\gimilani\appdata\local\programs\python\python38-32\lib\site-packages\pc_ble_driver_py\ble_driver.py", line 2787, in call_cmd
return subprocess.check_output(
File "c:\users\gimilani\appdata\local\programs\python\python38-32\lib\subprocess.py", line 411, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "c:\users\gimilani\appdata\local\programs\python\python38-32\lib\subprocess.py", line 512, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['nrfjprog', '--snr', '683098617', '--memrd', '327680', '--w', '8', '--n', '24', '--family', 'NRF52']' returned non-zero exit status 18.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\users\gimilani\appdata\local\programs\python\python38-32\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\users\gimilani\appdata\local\programs\python\python38-32\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\gimilani\AppData\Local\Programs\Python\Python38-32\Scripts\nrfutil.exe\__main__.py", line 7, in <module>
File "c:\users\gimilani\appdata\local\programs\python\python38-32\lib\site-packages\click\core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "c:\users\gimilani\appdata\local\programs\python\python38-32\lib\site-packages\click\core.py", line 782, in main
rv = self.invoke(ctx)
File "c:\users\gimilani\appdata\local\programs\python\python38-32\lib\site-packages\click\core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "c:\users\gimilani\appdata\local\programs\python\python38-32\lib\site-packages\click\core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "c:\users\gimilani\appdata\local\programs\python\python38-32\lib\site-packages\click\core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "c:\users\gimilani\appdata\local\programs\python\python38-32\lib\site-packages\click\core.py", line 610, in invoke
return callback(*args, **kwargs)
File "c:\users\gimilani\appdata\local\programs\python\python38-32\lib\site-packages\nordicsemi\__main__.py", line 1160, in ble
if flasher.fw_check():
File "c:\users\gimilani\appdata\local\programs\python\python38-32\lib\site-packages\pc_ble_driver_py\ble_driver.py", line 2741, in fw_check
fw_struct = Flasher.parse_fw_struct(self.read_fw_struct())
File "c:\users\gimilani\appdata\local\programs\python\python38-32\lib\site-packages\pc_ble_driver_py\ble_driver.py", line 2764, in read_fw_struct
data = self.call_cmd(args)
File "c:\users\gimilani\appdata\local\programs\python\python38-32\lib\site-packages\wrapt\wrappers.py", line 605, in __call__
return self._self_wrapper(self.__wrapped__, self._self_instance,
File "c:\users\gimilani\appdata\local\programs\python\python38-32\lib\site-packages\wrapt\decorators.py", line 445, in _synchronized
return wrapped(*args, **kwargs)
File "c:\users\gimilani\appdata\local\programs\python\python38-32\lib\site-packages\pc_ble_driver_py\ble_driver.py", line 2792, in call_cmd
raise RuntimeError("Invalid Connectivity IC ID: {}".format(self.family))
RuntimeError: Invalid Connectivity IC ID: NRF52
Do you have any suggestions on this?
I also tried to perform the DFU through nRF Connect from mobile app-PC, but I cannot find the way to add the .zip packet in order to be sent(below the screenshot).
Thank you very much in advance,
best regards,
Gianluca