Can the standard bootloader in the nrf52840 dongle be used with the DFU Trigger library for USB firmware updates (nrfutil)?

I have the DFU Trigger code added to my application, and am using nrfutil to upload the package over USB.  If I press the reset/DFU button on the dongle the process works fine.  If I try to use the DFU Trigger, I get the following error:

2022-10-01 22:04:29,304 Serial: Device is either not in bootloader mode, or using an unsupported bootloader.
2022-10-01 22:04:29,321 Serial: Set Packet Receipt Notification 0
Traceback (most recent call last):
File "/usr/local/bin/nrfutil", line 8, in <module>
sys.exit(cli())
File "/usr/lib/python3/dist-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/usr/lib/python3/dist-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/usr/lib/python3/dist-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/lib/python3/dist-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/lib/python3/dist-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/lib/python3/dist-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.9/dist-packages/nordicsemi/__main__.py", line 1032, in usb_serial
do_serial(package, port, connect_delay, flow_control, packet_receipt_notification, baud_rate, serial_number, False,
File "/usr/local/lib/python3.9/dist-packages/nordicsemi/__main__.py", line 990, in do_serial
dfu.dfu_send_images()
File "/usr/local/lib/python3.9/dist-packages/nordicsemi/dfu/dfu.py", line 127, in dfu_send_images
self._dfu_send_image(self.manifest.application)
File "/usr/local/lib/python3.9/dist-packages/nordicsemi/dfu/dfu.py", line 88, in _dfu_send_image
self.dfu_transport.open()
File "/usr/local/lib/python3.9/dist-packages/nordicsemi/dfu/dfu_transport_serial.py", line 217, in open
self.__get_mtu()
File "/usr/local/lib/python3.9/dist-packages/nordicsemi/dfu/dfu_transport_serial.py", line 366, in __get_mtu
self.mtu = struct.unpack('<H', bytearray(response))[0]
TypeError: cannot convert 'NoneType' object to bytearray

I am using USB CDC for data transfer, but I do have the COMM and DATA interfaces have been set to 1 & 2.

Is the standard bootloader (the one that comes with the dongle) compatible with the DFU Trigger?  Or do I need to add a secure or open bootloader.

If I need to replace the bootloader, do I need a settings.hes, or just merge the newly built bootloader with the softdevice (s140)?

Thanks,

--jeff

Parents Reply Children
No Data
Related