Hello,
I am trying to do a DFU over BLE using my computer, just like I do it with a phone.
If I'm not wrong, the only way to do this is by using nrfutil and a DevKit.
I am using nRF 5 SDK 17.
I tried doing a DFU with nrfutil version 6 and a nRF52840 DevKit on my custom device (based on nRF52820).
First i stumbled on a problem where the tracker wasn't found midway through the process (probably due to the fact that I change the devices MAC address)
I fixed it by changing this on dfu_transport_ble.py file
+++ b/nordicsemi/dfu/dfu_transport_ble.py @@ -219,7 +219,7 @@ class DFUAdapter(BLEDriverObserver, BLEAdapterObserver): # Reconnect - self.target_device_name = None + self.target_device_name = 'DfuTarg'
But the real problem is that once the device is on DFU mode, i faced another problem:
Traceback (most recent call last): File "/home/user/projects/desktop/pc-nrfutil/./main.py", line 74, in <module> dfu.dfu_send_images() File "/home/user/projects/desktop/pc-nrfutil/nordicsemi/dfu/dfu.py", line 115, in dfu_send_images self._dfu_send_image(self.manifest.softdevice_bootloader) File "/home/user/projects/desktop/pc-nrfutil/nordicsemi/dfu/dfu.py", line 88, in _dfu_send_image self.dfu_transport.open() File "/home/user/projects/desktop/pc-nrfutil/nordicsemi/dfu/dfu_transport_ble.py", line 474, in open self.dfu_adapter.open() File "/home/user/projects/desktop/pc-nrfutil/nordicsemi/dfu/dfu_transport_ble.py", line 103, in open self.adapter.driver.open() File "/home/user/.local/lib/python3.10/site-packages/pc_ble_driver_py/ble_driver.py", line 106, in wrapper raise NordicSemiException( pc_ble_driver_py.exceptions.NordicSemiException: Failed to open. Error code: NRF_ERROR_SD_RPC_H5_TRANSPORT_STATE
I tried using nrfutil v6, nrfutil v7 with nrf5sdk-tools, the Bluetooth Low Energy app from nrfConnect Desktop app but nothing seems to work.
I don't think the problem comes from my custom device since the DFU works when done from a mobile phone.