Giter VIP home page Giter VIP logo

nitrokey-update-tool's Introduction

Nitrokey Update Tool

Nitrokey Update Tool is an application aiming to ease Nitrokey Storage firmware update process under Windows and macOS.

Installation and downloads

Ready to use packages and install instructions are available releases' page: https://github.com/Nitrokey/nitrokey-update-tool/releases/

Usage

To flash the Nitrokey Storage device please prepare:

  • a .hex file with target firmware
  • Windows or macOS PC
  • Nitrokey Storage device with enabled update mode

Steps

After running the tool please:

  1. Select the firmware file location with Select firmware file button
  2. Check whether device has been detected by observing Device in update mode connected
  3. If both conditions are fulfilled, Update firmware button should be active
  4. After pressing Update firmware the procedure would start.

Important

Updating process should not be interrupted, otherwise the device might not work correctly or not power up at all. Please make sure your PC is connected to stable power supply.

Compilation

Requirements:

  • libusb 1.0
  • C++11 compatible compiler
  • CMake 3 (for building underlying dfu-programmer lib)
  • Qt 5

Getting the sources

Please make sure you have downloaded the code with the submodules, eg.:

git clone https://github.com/Nitrokey/nitrokey-update-tool.git --recursive

Compiling on Ubuntu Linux 18.04

Packages list

Prerequisites for building on Ubuntu 17.10:

  • build-essential - for building applications
  • cmake - for compiling libnitrokey
  • qt5-default - QT5 library
  • libusb-1.0-0-dev - library to communicate with USB devices

dfu-programmer library compilation

Before the actual Tool building, a dfu-programmer library needs to be built. To do so, please execute (while being in the main directory):

mkdir -p 3rdparty/dfu-programmer/build
pushd 3rdparty/dfu-programmer/build
cmake ..
make
popd

This should result in a static object.

Tool compilation

To compile the tool, please execute (while being in the main directory):

mkdir -p build && cd build
qmake .. && make 

Compiling on macOS 10.12

Similarly to Ubuntu instructions. libusb library could be provided with brew.sh.

Cross-compiling

Cross-compiling works similarly as with Nitrokey App (via MXE). See its README file for details.

nitrokey-update-tool's People

Contributors

szszszsz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

nitrokey-update-tool's Issues

usb_setup.exe crash

Windows 8.1 x64, run with admin privileges, app crash with error on line 36 c >=-1 && c<=255.
After crash message
nitrokey_error
User able to press continue and then successfully flash device.
dufu log attached
dfu-programmer.log

Notification if not started in admin mode

On Windows the Update Tool has to be started as administrator. If started without administrator rights, the tool should inform the user to restart it in administrator mode and quit.

Provide AppImage binary

Provide AppImage binary for running under Ubuntu and potentially other Linux distributions.

Inform about enabling the update mode on the device

Show this message on tool's start:

This tool allows to update Nitrokey Storage's firmware. Please select
<I>Configure -> Enable Firmware Update</I> in the Nitrokey App [2] and
download the .hex file of the latest firmware version[1].

[1] https://github.com/Nitrokey/nitrokey-storage-firmware/releases/latest
[2] https://www.nitrokey.com/download

Misleading message after successful flashing

After successful updating the firmware the tool identifies the flashed device and displays the following message: "Nitrokey Storage detected in Production mode. Please enable Firmware Update mode in Nitrokey App first (Configure -> Enable Firmware Update)."

However, in this case the user usually doesn't want to flash again so the message is misleading. Ideally the message shouldn't be displayed after successful flashing. However the message makes sense when starting the tool (prior to flashing). Could this be changed accordingly?

Enable update modus

Currently, a user needs to enable the update modus via Nitrokey App themselves. I understand that doing this in the update-tool automatically would make libnitrokey necessary as dependency, but would be much more easy for users.

Is this doable?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.