Getting Started with the Nitrokey HSM 2

Hello,
i’ve bought 2 Nitrokey HSM 2 for testing purposes of storing keypairs and signing data with it. I have followed the official Getting Started guide from Nitrokey. But unfortunately I was only able the initialize 1 out of 2 HSM with the command sc-hsm-tool --initialize --so-pin 3537363231383830 --pin 648219 and I am only able to unreliably create keys via the CLI using pkcs11-tool.exe and show the created items with pkcs15-tool -D. My goal was to integrate the HSM with a pythonscript using the PyKCS11Lib but unfortunately I failed doing so. Also sometimes i get error messages like CKR_GENERAL_ERROR or when using pkcs15: binding failed: Transmit failed. Or for example when using the command pkcs11-tool --module “C:\P.rogram Files\OpenSC Project\OpenSC\pkcs11\opensc-pkcs11.dll” -T “No slots available”.

I have installed OpenSC for the required tools and dll under windows. I also tried it on a Linux platform but faced the same problems. Did anybody face to same problem or has a solution for this kind of problems?

Hello,

could you please give me the output of this command under Linux:

sc-hsm-tool

do it several time