Unable to run nitropy in Windows 10

It’s not clear to me how to install nitropy completely in Windows 10 for my Nitrokey Start. I have installed pynitrokey-0.4.1-amd64.msi according to https://github.com/Nitrokey/pynitrokey.
There is said:

Support for Nitrokey Start under Windows 10 is not working without installing libusb libraries (to be described).

Googling for „windows installing libusb libraries“ I’ve found https://github.com/libusb/libusb/wiki/Windows . There is said:

Recommended: Use the most recent version of Zadig

-> have installed zadig-2.5.exe. Trying nitropy I get:

C:\Program Files\pynitrokey>nitropy.exe ls
*** ←[31;01mNitrokey tool for Nitrokey FIDO2 & Nitrokey Start←[39;49;00m
:: 'Nitrokey FIDO2' keys
:: 'Nitrokey Start' keys:
Warning: no backend was found to use for communication. Please refer to documentation how to install additional libraries.

C:\Program Files\pynitrokey>

I have tried downloading libusb open source library libusb-1.0.23.7z and copying the three files from MS64\dll to nitropy program directory. Then I get

C:\Program Files\pynitrokey>nitropy ls
*** ←[31;01mNitrokey tool for Nitrokey FIDO2 & Nitrokey Start←[39;49;00m
:: 'Nitrokey FIDO2' keys
:: 'Nitrokey Start' keys:
Traceback (most recent call last):
  File "D:\tools\common\portable_python3_64bit\python-3.7.0b3.amd64\lib\site-packages\cx_Freeze\initscripts\__startup__.py", line 40, in run
  File "D:\tools\common\portable_python3_64bit\python-3.7.0b3.amd64\lib\site-packages\cx_Freeze\initscripts\Console.py", line 37, in run
  File "nitropy.py", line 3, in <module>
  File "D:\tools\common\portable_python3_64bit\python-3.7.0b3.amd64\lib\site-packages\click\core.py", line 829, in __call__
  File "D:\tools\common\portable_python3_64bit\python-3.7.0b3.amd64\lib\site-packages\click\core.py", line 782, in main
  File "D:\tools\common\portable_python3_64bit\python-3.7.0b3.amd64\lib\site-packages\click\core.py", line 1259, in invoke
  File "D:\tools\common\portable_python3_64bit\python-3.7.0b3.amd64\lib\site-packages\click\core.py", line 1066, in invoke
  File "D:\tools\common\portable_python3_64bit\python-3.7.0b3.amd64\lib\site-packages\click\core.py", line 610, in invoke
  File "D:\tools\common\portable_python3_64bit\tmp\pynitrokey-master\pynitrokey\cli\__init__.py", line 60, in ls
  File "D:\tools\common\portable_python3_64bit\tmp\pynitrokey-master\pynitrokey\cli\start.py", line 43, in list
  File "D:\tools\common\portable_python3_64bit\tmp\pynitrokey-master\pynitrokey\start\usb_strings.py", line 46, in get_devices
  File "D:\tools\common\portable_python3_64bit\tmp\pynitrokey-master\pynitrokey\start\gnuk_token.py", line 646, in gnuk_devices_by_vidpid
  File "D:\tools\common\portable_python3_64bit\python-3.7.0b3.amd64\lib\site-packages\usb\legacy.py", line 354, in <genexpr>
  File "D:\tools\common\portable_python3_64bit\python-3.7.0b3.amd64\lib\site-packages\usb\legacy.py", line 349, in __init__
  File "D:\tools\common\portable_python3_64bit\python-3.7.0b3.amd64\lib\site-packages\usb\legacy.py", line 349, in <listcomp>
  File "D:\tools\common\portable_python3_64bit\python-3.7.0b3.amd64\lib\site-packages\usb\legacy.py", line 335, in __init__
  File "D:\tools\common\portable_python3_64bit\python-3.7.0b3.amd64\lib\site-packages\usb\legacy.py", line 335, in <listcomp>
  File "D:\tools\common\portable_python3_64bit\python-3.7.0b3.amd64\lib\site-packages\usb\core.py", line 1128, in __iter__
  File "D:\tools\common\portable_python3_64bit\python-3.7.0b3.amd64\lib\site-packages\usb\core.py", line 605, in __init__
  File "D:\tools\common\portable_python3_64bit\python-3.7.0b3.amd64\lib\site-packages\usb\backend\libusb1.py", line 775, in get_configuration_descriptor
  File "D:\tools\common\portable_python3_64bit\python-3.7.0b3.amd64\lib\site-packages\usb\backend\libusb1.py", line 604, in _check
usb.core.USBError: [Errno 2] Entity not found

C:\Program Files\pynitrokey>

Cmd-Window has admin rights.
What is wrong? How is the complete installation guide?
Thank you.

Hi @Alexus9!

The missing libraries were meant to be packaged with the installer. I have asked my colleague to look into it. Ticket:

I understand that you have installed libusbX (the archive name is the same) - could you confirm? If so, I have no new ideas at the moment unfortunately.

Tried a similar setup and I was able to detect the key using Zadig, after reinstalling the drivers.

However I could not update because of the following error:

[Errno None] b'libusb0-dll:err [_usb_reap_async] timeout error\n'

The full log snapshot if available here.

1 Like

Thanks for your answers.

szszszsz:

The missing libraries were meant to be packaged with the installer.

My misunderstanding was that additional drivers had to be installed. That was the only reason for me to install Zadig WinUSB and to download libusb-1.0.23.7z.

Now I have stripped down, without any success:

I removed the three libusb-1 files from nitropy program directory, removed Zadig WinUSB driver, uninstalled pnitrokey, rebootet and installed pnitrokey again. Now I get

C:\Program Files\OpenSC Project\OpenSC\tools>nitropy ls

*** ←[31;01mNitrokey tool for Nitrokey FIDO2 & Nitrokey Start←[39;49;00m

:: 'Nitrokey FIDO2' keys

:: 'Nitrokey Start' keys:

Warning: no backend was found to use for communication. Please refer to documentation how to install additional libraries.

What to do now?

I think it would be best to wait for the next release planned for this week:

The configuration you had was probably right, but there is something missing in the Python USB handling implementation withing the pynitrokey. With the new installer I hope the libraries will be packed correctly, without a need for the additional tinkering.