Nitrokey Start bricked by nitropy

Even if it is an old thread. You may find it useful, or anyoune who search for a bricked Nitrokey.

If you forget the udev rules, try to flash the device and power cycle or unplug the Nitrokey, it can only be flashed via SWD (or on older devices maybe via DFU). I have gone the SWD way. For that you have to open the device to access the SWD ports and a ST-LINK/V2 in-circuit debugger/programmer. I had a STM32 Dev Board with ST-LINK laying around and a Pogo Pin Adapter. It is also possible to solder cables to the SWD port. There are some cheap options you can buy.

See the Flashing Instructions for Nitrokey Pro. Note: newer Nitrokey Starts share the same PCB for older devices see the README of the Nitrokey Start Hardware repoistory

What I had done:

  • Power via USB (there will be no device detected by Linux)
  • Connect SWD ports
  • Checked with stlink-gui
  • Unprotect the flash via opencd
    $ openocd -f interface/stlink.cfg -f target/stm32f1x.cfg \
              -c init -c "reset halt" -c "stm32f1x unlock 0" -c reset -c exit
    
  • Flash the extracted gnuk.hex.gz via stlink-gui (See the Nitrokey/nitrokey-start-firmware on GitHub, I can only add two Links)
    You could also use openocd to flash the device
  • Protect the device again
    $ openocd -f interface/stlink.cfg -f target/stm32f1x.cfg \
             -c init -c "reset halt" -c "stm32f1x lock 0" -c reset -c exit
    
1 Like