I upgraded nitropy to 0.10.0 and then started the upgrade of the Nitrokey 3C NFC firmware to 1.8.2 (it had version 1.8.1 running). Here is the pre-upgrade status information:
$ nitropy nk3 status
Command line tool to interact with Nitrokey devices 0.10.0
UUID: 3BB276B2E1242350B88D83DACD13BB9F
Firmware version: v1.8.1
Init status: ok
Free blocks (int): 26
Free blocks (ext): 457
Variant: LPC55
$ nitropy nk3 list
Command line tool to interact with Nitrokey devices 0.10.0
:: 'NK3' keys
/dev/hidraw10: Nitrokey 3 3BB276B2E1242350B88D83DACD13BB9F
Iβm on Fedora 41 with Kernel 6.15.6. Then I ran an upgrade, which failed and the Nitrokey is now bricked:
$ nitropy nk3 update
Command line tool to interact with Nitrokey devices 0.10.0
Do you want to download the firmware version v1.8.2? [Y/n]:
Download v1.8.2: 100%|ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 1.04M/1.04M [00:00<00:00, 5.87MB/s]
Current firmware version: v1.8.1
Updated firmware version: v1.8.2
Please do not remove the Nitrokey 3 or insert any other Nitrokey 3 devices during the update. Doing so may damage the Nitrokey 3.
Do you want to perform the firmware update now? [y/N]: y
Please press the touch button to reboot the device into bootloader mode ...
Perform firmware update: 10%|βββββββββββββ | 54.0k/525k [00:07<01:08, 6.88kB/s]
Critical error:
Failed to perform firmware update
Exception encountered: SPSDKTimeoutError()
--------------------------------------------------------------------------------
Critical error occurred, exiting now
Unexpected? Is this a bug? Would you like to get support/help?
- You can report issues at: https://support.nitrokey.com/
- Writing an e-mail to support@nitrokey.com is also possible
- Please attach the log: '/tmp/nitropy-20250908T080344-cwu_13w2.log' with any support/help request!
- Please check if you have udev rules installed: https://docs.nitrokey.com/nitrokeys/nitrokey3/firmware-update#troubleshooting-linux
Iβve tried to unplug/plug the Nitrokey back in but it is not usable anymore. It is not listed:
$ nitropy nk3 status
Command line tool to interact with Nitrokey devices 0.10.0
Critical error:
No NK3 device found
--------------------------------------------------------------------------------
Critical error occurred, exiting now
Unexpected? Is this a bug? Would you like to get support/help?
- You can report issues at: https://support.nitrokey.com/
- Writing an e-mail to support@nitrokey.com is also possible
- Please attach the log: '/tmp/nitropy-20250908T080827-6s9efzp2.log' with any support/help request!
- Please check if you have udev rules installed: https://docs.nitrokey.com/nitrokeys/nitrokey3/firmware-update#troubleshooting-linux
dmesg shows at the time of upgrade:
[Mon Sep 8 08:03:48 2025] usb 1-4.4.4: USB disconnect, device number 37
[Mon Sep 8 08:03:48 2025] usb 1-4.4.4: new high-speed USB device number 51 using xhci_hcd
[Mon Sep 8 08:03:48 2025] usb 1-4.4.4: New USB device found, idVendor=20a0, idProduct=42dd, bcdDevice= 3.00
[Mon Sep 8 08:03:48 2025] usb 1-4.4.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[Mon Sep 8 08:03:48 2025] usb 1-4.4.4: Product: USB COMPOSITE DEVICE
[Mon Sep 8 08:03:48 2025] usb 1-4.4.4: Manufacturer: NXP SEMICONDUCTOR INC.
[Mon Sep 8 08:03:48 2025] hid-generic 0003:20A0:42DD.002E: hiddev103,hidraw11: USB HID v1.00 Device [NXP SEMICONDUCTOR INC. USB COMPOSITE DEVICE] on usb-0000:00:14.0-4.4.4/input0
[Mon Sep 8 08:08:02 2025] usb 1-4.4.4: USB disconnect, device number 51
The error logs: /tmp/nitropy-20250908T080344-cwu_13w2.log show ERROR nitrokey.trussed._bootloader.lpc55_upload.mboot.mcuboot RX: SPSDK: Invalid size of written bytes has been detected: -1 != 60
284 INFO pynitrokey.cli Timestamp: 2025-09-08 08:03:44.260152
284 INFO pynitrokey.cli OS: uname_result(system='Linux', node='aayla', release='6.15.6-100.fc41.x86_64', version='#1 SMP PREEMPT_DYNAMIC Thu Jul 10 14:21:01 UTC 2025', machine='x86_64')
284 INFO pynitrokey.cli Python version: 3.13.7
284 INFO pynitrokey.cli Cli arguments: ['nk3', 'update']
286 INFO pynitrokey.cli pynitrokey version: 0.10.0
286 INFO pynitrokey.cli cryptography version: 44.0.3
287 INFO pynitrokey.cli fido2 version: 2.0.0
287 INFO pynitrokey.cli pyusb version: 1.3.1
...
486 INFO nitrokey.trussed.updates Firmware version before update: v1.8.1
490 DEBUG urllib3.connectionpool Starting new HTTPS connection (1): api.github.com:443
679 DEBUG urllib3.connectionpool https://api.github.com:443 "GET /repos/Nitrokey/nitrokey-3-firmware/releases/latest HTTP/1.1" 200 2856
681 INFO nitrokey.trussed.updates Latest firmware version: v1.8.2
681 INFO nitrokey.trussed.updates Current firmware version: v1.8.1
682 INFO nitrokey.trussed.updates Updated firmware version: v1.8.2
2543 INFO nitrokey.trussed.updates Trying to download firmware update from URL: https://github.com/Nitrokey/nitrokey-3-firmware/releases/download/v1.8.2/firmware-nk3-v1.8.2.zip
2546 DEBUG urllib3.connectionpool Starting new HTTPS connection (1): github.com:443
2720 DEBUG urllib3.connectionpool https://github.com:443 "GET /Nitrokey/nitrokey-3-firmware/releases/download/v1.8.2/firmware-nk3-v1.8.2.zip HTTP/1.1" 302 0
2724 DEBUG urllib3.connectionpool Starting new HTTPS connection (1): release-assets.githubusercontent.com:443
2797 DEBUG urllib3.connectionpool https://release-assets.githubusercontent.com:443 "GET /github-production-release-asset/366410832/9fafcc2a-d0b4-4f9e-b06f-ba0f147b3aa6?sp=r&sv=2018-11-09&sr=b&spr=https&se=2025-09-08T13%3A03%3A30Z&rscd=attachment%3B+filename%3Dfirmware-nk3-v1.8.2.zip&rsct=application%2Foctet-stream&skoid=96c2d410-5711-43a1-aedd-ab1947aa7ab0&sktid=398a6654-997b-47e9-b12b-9515b896b4de&skt=2025-09-08T12%3A03%3A26Z&ske=2025-09-08T13%3A03%3A30Z&sks=b&skv=2018-11-09&sig=SIfBaBg9bLk2v1GVEUo4BDNZp1vU444Hp3u4DlDoXvg%3D&jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmVsZWFzZS1hc3NldHMuZ2l0aHVidXNlcmNvbnRlbnQuY29tIiwia2V5Ijoia2V5MSIsImV4cCI6MTc1NzMzMzMyNiwibmJmIjoxNzU3MzMzMDI2LCJwYXRoIjoicmVsZWFzZWFzc2V0cHJvZHVjdGlvbi5ibG9iLmNvcmUud2luZG93cy5uZXQifQ.C-JgkdW0SSmfxEAMrQZas5LQ-bpQfkEkQkT8yd9xezM&response-content-disposition=attachment%3B%20filename%3Dfirmware-nk3-v1.8.2.zip&response-content-type=application%2Foctet-stream HTTP/1.1" 200 1040831
2997 DEBUG root print: Current firmware version: v1.8.1
2997 DEBUG root print: Updated firmware version: v1.8.2
2997 DEBUG root print: Please do not remove the Nitrokey 3 or insert any other Nitrokey 3 devices during the update. Doing so may damage the Nitrokey 3.
14767 DEBUG root print: Please press the touch button to reboot the device into bootloader mode ...
18932 DEBUG nitrokey.trussed._device./dev/hidraw10 ignoring OSError after reboot
...
21428 DEBUG nitrokey.trussed._bootloader.lpc55_upload.mboot.protocol.bulk_protocol OUT[60]: 02, 00, 38, 00, C2, 82, A2, 0D, 2B, BE, 40, 32, FB, 82, D3, E1, 2D, 9B, 4C, BF, C2, D3, A3, F2, C1, 43, 5B, BC, 36, CB, 23, CD, 09, 27, 05, FE, 2B, 70, 96, CD, 2D, 82, FA, EC, DA, A1, C5, 0E, 0C, 02, 95, 29, 60, 0C, B2, 7E, 26, EC, D9, 0F
21429 DEBUG nitrokey.trussed._bootloader.lpc55_upload.mboot.protocol.bulk_protocol OUT[60]: 02, 00, 38, 00, C1, 07, AD, 4B, FE, A2, 42, 32, ED, 4B, A2, 0E, B4, 32, 59, 0A, A4, 09, 33, 8A, D5, 51, 33, 8E, 70, 42, 99, DC, 4E, D8, B2, C4, BA, 3E, A8, DE, 0B, B2, 0D, DB, D7, AC, FF, 04, 39, D8, FE, CA, 54, 03, 7F, C8, 7F, 30, F4, 37
21430 DEBUG nitrokey.trussed._bootloader.lpc55_upload.mboot.protocol.bulk_protocol OUT[60]: 02, 00, 38, 00, 58, 05, 24, F5, CF, 47, 93, F4, 4A, 42, 29, 99, 9D, EA, EF, 01, EE, 3F, F0, F1, DB, D4, 25, 0F, 1B, 47, 09, 22, D5, 01, B8, 9C, 00, B3, 24, 5C, 3B, 4C, 4B, 89, 45, 67, 95, D5, 21, 0E, 4C, A3, E4, 92, A2, B6, 3A, DB, C5, E0
26533 ERROR nitrokey.trussed._bootloader.lpc55_upload.mboot.mcuboot RX: SPSDK: Invalid size of written bytes has been detected: -1 != 60
28535 ERROR nitrokey.trussed._bootloader.lpc55_upload.utils.interfaces.device.usb_device Cannot read from HID device
28536 INFO nitrokey.trussed._bootloader.lpc55_upload.mboot.mcuboot Closing: identifier='usb', device=USB COMPOSITE DEVICE (0x20A0, 0x42DD)path=b'/dev/hidraw11'
28537 DEBUG nitrokey.trussed._bootloader.lpc55_upload.utils.interfaces.device.usb_device Closing the Interface: USB COMPOSITE DEVICE (0x20A0, 0x42DD)path=b'/dev/hidraw11'
28537 DEBUG root print: Critical error:
28537 DEBUG root print: Failed to perform firmware update
28538 ERROR root
Traceback (most recent call last):
File "/home/tkren/.local/share/pipx/venvs/pynitrokey/lib64/python3.13/site-packages/nitrokey/trussed/_bootloader/lpc55_upload/mboot/mcuboot.py", line 226, in _send_data
self._interface.write_data(data_chunk)
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
File "/home/tkren/.local/share/pipx/venvs/pynitrokey/lib64/python3.13/site-packages/nitrokey/trussed/_bootloader/lpc55_upload/mboot/protocol/bulk_protocol.py", line 66, in write_data
self.device.write(frame)
~~~~~~~~~~~~~~~~~^^^^^^^
File "/home/tkren/.local/share/pipx/venvs/pynitrokey/lib64/python3.13/site-packages/nitrokey/trussed/_bootloader/lpc55_upload/utils/interfaces/device/usb_device.py", line 137, in write
raise SPSDKConnectionError(
f"Invalid size of written bytes has been detected: {bytes_written} != {len(data)}"
)
nitrokey.trussed._bootloader.lpc55_upload.exceptions.SPSDKConnectionError: SPSDK: Invalid size of written bytes has been detected: -1 != 60
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/tkren/.local/share/pipx/venvs/pynitrokey/lib64/python3.13/site-packages/nitrokey/trussed/updates.py", line 566, in _perform_update
device.update(image, callback=callback)
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/tkren/.local/share/pipx/venvs/pynitrokey/lib64/python3.13/site-packages/nitrokey/trussed/_bootloader/lpc55.py", line 90, in update
success = self.device.receive_sb_file(
image,
progress_callback=callback,
check_errors=check_errors,
)
File "/home/tkren/.local/share/pipx/venvs/pynitrokey/lib64/python3.13/site-packages/nitrokey/trussed/_bootloader/lpc55_upload/mboot/mcuboot.py", line 736, in receive_sb_file
result = self._send_data(
CommandTag.RECEIVE_SB_FILE, data_chunks, progress_callback
)
File "/home/tkren/.local/share/pipx/venvs/pynitrokey/lib64/python3.13/site-packages/nitrokey/trussed/_bootloader/lpc55_upload/mboot/mcuboot.py", line 243, in _send_data
response = self._interface.read()
File "/home/tkren/.local/share/pipx/venvs/pynitrokey/lib64/python3.13/site-packages/nitrokey/trussed/_bootloader/lpc55_upload/mboot/protocol/bulk_protocol.py", line 86, in read
data = self.device.read(1024)
File "/home/tkren/.local/share/pipx/venvs/pynitrokey/lib64/python3.13/site-packages/nitrokey/trussed/_bootloader/lpc55_upload/utils/interfaces/device/usb_device.py", line 119, in read
raise SPSDKTimeoutError()
nitrokey.trussed._bootloader.lpc55_upload.utils.exceptions.SPSDKTimeoutError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/tkren/.local/share/pipx/venvs/pynitrokey/lib64/python3.13/site-packages/pynitrokey/cli/__init__.py", line 135, in main
nitropy()
~~~~~~~^^
File "/home/tkren/.local/share/pipx/venvs/pynitrokey/lib64/python3.13/site-packages/click/core.py", line 1442, in __call__
return self.main(*args, **kwargs)
~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/home/tkren/.local/share/pipx/venvs/pynitrokey/lib64/python3.13/site-packages/click/core.py", line 1363, in main
rv = self.invoke(ctx)
File "/home/tkren/.local/share/pipx/venvs/pynitrokey/lib64/python3.13/site-packages/click/core.py", line 1830, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "/home/tkren/.local/share/pipx/venvs/pynitrokey/lib64/python3.13/site-packages/click/core.py", line 1830, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "/home/tkren/.local/share/pipx/venvs/pynitrokey/lib64/python3.13/site-packages/click/core.py", line 1226, in invoke
return ctx.invoke(self.callback, **ctx.params)
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/tkren/.local/share/pipx/venvs/pynitrokey/lib64/python3.13/site-packages/click/core.py", line 794, in invoke
return callback(*args, **kwargs)
File "/home/tkren/.local/share/pipx/venvs/pynitrokey/lib64/python3.13/site-packages/click/decorators.py", line 46, in new_func
return f(get_current_context().obj, *args, **kwargs)
File "/home/tkren/.local/share/pipx/venvs/pynitrokey/lib64/python3.13/site-packages/pynitrokey/cli/nk3/__init__.py", line 130, in update
update_to_version, status = exec_update(
~~~~~~~~~~~^
ctx, image, version, ignore_pynitrokey_version, ignore_warnings, confirm
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/home/tkren/.local/share/pipx/venvs/pynitrokey/lib64/python3.13/site-packages/pynitrokey/cli/nk3/update.py", line 178, in update
return updater.update(device, image, version, ignore_pynitrokey_version)
~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/tkren/.local/share/pipx/venvs/pynitrokey/lib64/python3.13/site-packages/nitrokey/trussed/updates.py", line 356, in update
self._perform_update(bootloader, container)
~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
File "/home/tkren/.local/share/pipx/venvs/pynitrokey/lib64/python3.13/site-packages/nitrokey/trussed/updates.py", line 568, in _perform_update
raise self.ui.error("Failed to perform firmware update", e)
pynitrokey.cli.exceptions.CliException: Failed to perform firmware update
28552 DEBUG root listing all connected devices:
28604 DEBUG root :: 'Nitrokey FIDO2' keys
28604 DEBUG root :: 'Nitrokey Start' keys:
28659 DEBUG root :: 'NK3' keys
28668 DEBUG nitrokey.trussed._bootloader.nrf52 Skipping device 403:6001 with ports ['/dev/ttyUSB1']
28668 DEBUG nitrokey.trussed._bootloader.nrf52 Skipping device 403:6001 with ports ['/dev/ttyUSB0']
28719 INFO nitrokey.trussed._bootloader.lpc55_upload.mboot.mcuboot Connect: identifier='usb', device=USB COMPOSITE DEVICE (0x20A0, 0x42DD)path=b'/dev/hidraw11'
28719 DEBUG nitrokey.trussed._bootloader.lpc55_upload.utils.interfaces.device.usb_device Opening the Interface: USB COMPOSITE DEVICE (0x20A0, 0x42DD)path=b'/dev/hidraw11'
28769 INFO nitrokey.trussed._bootloader.lpc55_upload.mboot.mcuboot CMD: GetProperty(UniqueDeviceIdent, index=0)
28770 DEBUG nitrokey.trussed._bootloader.lpc55_upload.mboot.mcuboot TX-PACKET: Tag=GetProperty, Flags=0x00, P[0]=0x00000012, P[1]=0x00000000
28770 DEBUG nitrokey.trussed._bootloader.lpc55_upload.mboot.protocol.bulk_protocol OUT[16]: 01, 00, 0C, 00, 07, 00, 00, 02, 12, 00, 00, 00, 00, 00, 00, 00
34214 INFO nitrokey.trussed._bootloader.lpc55_upload.mboot.mcuboot Closing: identifier='usb', device=USB COMPOSITE DEVICE (0x20A0, 0x42DD)path=b'/dev/hidraw11'
34214 DEBUG nitrokey.trussed._bootloader.lpc55_upload.utils.interfaces.device.usb_device Closing the Interface: USB COMPOSITE DEVICE (0x20A0, 0x42DD)path=b'/dev/hidraw11'
34214 DEBUG root Unable to list devices. See log for the details.
34215 ERROR root Unable to list devices
Traceback (most recent call last):
File "/home/tkren/.local/share/pipx/venvs/pynitrokey/lib64/python3.13/site-packages/nitrokey/trussed/_bootloader/lpc55_upload/mboot/mcuboot.py", line 226, in _send_data
self._interface.write_data(data_chunk)
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
File "/home/tkren/.local/share/pipx/venvs/pynitrokey/lib64/python3.13/site-packages/nitrokey/trussed/_bootloader/lpc55_upload/mboot/protocol/bulk_protocol.py", line 66, in write_data
self.device.write(frame)
~~~~~~~~~~~~~~~~~^^^^^^^
File "/home/tkren/.local/share/pipx/venvs/pynitrokey/lib64/python3.13/site-packages/nitrokey/trussed/_bootloader/lpc55_upload/utils/interfaces/device/usb_device.py", line 137, in write
raise SPSDKConnectionError(
f"Invalid size of written bytes has been detected: {bytes_written} != {len(data)}"
)
nitrokey.trussed._bootloader.lpc55_upload.exceptions.SPSDKConnectionError: SPSDK: Invalid size of written bytes has been detected: -1 != 60
...
qnitrokey.trussed._bootloader.lpc55_upload.exceptions.SPSDKConnectionError: SPSDK: Invalid size of written bytes has been detected: -1 != 16
34229 DEBUG root print: --------------------------------------------------------------------------------
34230 DEBUG root print: Critical error occurred, exiting now
34230 DEBUG root print: Unexpected? Is this a bug? Would you like to get support/help?
34230 DEBUG root print: - You can report issues at: https://support.nitrokey.com/
34230 DEBUG root print: - Writing an e-mail to support@nitrokey.com is also possible
34230 DEBUG root print: - Please attach the log: '/tmp/nitropy-20250908T080344-cwu_13w2.log' with any support/help request!
34230 DEBUG root print: - Please check if you have udev rules installed: https://docs.nitrokey.com/nitrokeys/nitrokey3/firmware-update#troubleshooting-linux