Dear Forum,
I have the following issue (my System: Ubuntu 20.04):
I created the secure bootloader with Softdevice S140 (v.7.2.0) for 52833 chipset, I use a 52833 Development Kit (DK) and a 52833 evaluation board (EB).
Keys were applied:
nrfutil keys generate private.pem
nrfutil keys display --key pk --format code private.pem --out_file dfu_public_key.c
Copied dfu_public_key.c to secure_bootloader, then build.
As first step, I connect the DK board via USB and it's Debug out to the Evaluation board (which is powered via USB, too). I can then upload firmware and S140 either via SES or (using mergehex) via nrfjprog to the evaluation board.
I then can use the nrfutil tool (version version 6.1.3) to generate the app.zip:
nrfutil pkg generate --hw-version 52 --sd-req 0x100 --application-version 4 --application ./ble_app_pca10056e_s140.hex --key-file private.pem app_dfu_package.zip
Prove that all steps worked:
If I copy the app_dfu_package.zip to my smartphone, open nrfToolbox/DFU, I can select device: DfuTarg
Then I select file app_dfu_package.zip
I choose then scope "Application only" and everything works, the app gets installed on the EB.
Now I want to use nrfutil instead of the smartphone for the last step (OTA update via BLE), of course I check that the bootloader is active on EB as before smartphone DFU.
So I unplug the debug bridge between DK and EB, clear the DK (to be sure, I used the nrfProgrammer "Erase all" from nRF Connect for Desktop).
I then issue:
nrfutil dfu ble -f -ic NRF52 -pkg ./app_dfu_package.zip -p /dev/ttyACM1 -n "DfuTarg"
This responds the following error:
Flashing connectivity firmware...
Connectivity firmware flashed.
Traceback (most recent call last):
File "/usr/local/bin/nrfutil", line 33, in <module>
sys.exit(load_entry_point('nrfutil==6.1.3', 'console_scripts', 'nrfutil')())
File "/usr/lib/python3/dist-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/usr/lib/python3/dist-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/usr/lib/python3/dist-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/lib/python3/dist-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/lib/python3/dist-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/lib/python3/dist-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/nrfutil-6.1.3-py3.8.egg/nordicsemi/__main__.py", line 1205, in ble
dfu.dfu_send_images()
File "/usr/local/lib/python3.8/dist-packages/nrfutil-6.1.3-py3.8.egg/nordicsemi/dfu/dfu.py", line 127, in dfu_send_images
self._dfu_send_image(self.manifest.application)
File "/usr/local/lib/python3.8/dist-packages/nrfutil-6.1.3-py3.8.egg/nordicsemi/dfu/dfu.py", line 95, in _dfu_send_image
self.dfu_transport.send_init_packet(data)
File "/usr/local/lib/python3.8/dist-packages/nrfutil-6.1.3-py3.8.egg/nordicsemi/dfu/dfu_transport_ble.py", line 525, in send_init_packet
self.__stream_data(data=init_packet)
File "/usr/local/lib/python3.8/dist-packages/nrfutil-6.1.3-py3.8.egg/nordicsemi/dfu/dfu_transport_ble.py", line 643, in __stream_data
self.dfu_adapter.write_data_point(list(to_transmit))
File "/usr/local/lib/python3.8/dist-packages/nrfutil-6.1.3-py3.8.egg/nordicsemi/dfu/dfu_transport_ble.py", line 351, in write_data_point
self.adapter.write_cmd(self.conn_handle, DFUAdapter.DP_UUID, data)
File "/usr/local/lib/python3.8/dist-packages/pc_ble_driver_py-0.16.2-py3.8-linux-x86_64.egg/pc_ble_driver_py/ble_adapter.py", line 567, in write_cmd
raise e
File "/usr/local/lib/python3.8/dist-packages/pc_ble_driver_py-0.16.2-py3.8-linux-x86_64.egg/pc_ble_driver_py/ble_adapter.py", line 553, in write_cmd
response = self.driver.ble_gattc_write(conn_handle, write_params)
File "/usr/local/lib/python3.8/dist-packages/pc_ble_driver_py-0.16.2-py3.8-linux-x86_64.egg/pc_ble_driver_py/ble_driver.py", line 106, in wrapper
raise NordicSemiException(
pc_ble_driver_py.exceptions.NordicSemiException: Failed to ble_gattc_write. Error code: NRF_ERROR_SD_RPC_NO_RESPONSE
If I check with nrfProgrammer "Read", it reports for the connectivity software installed on the DK:
SoftDevice detected, id 0xA5 (S132 v5.1.0)
I suspect, that there might be an issue with the used connectivity firmware with softdevice 5.1.0 and the bootloader/softdevice version 7.2.0, but found no way how to update the connectivity firmware.
Maybe there is some other reason, I'd be glad for any hint at that point.
Additional info: I use python 3.8.10
Best regards,
Richard