pico-hsm-tool initialization fails with timeout #119

Open
opened 2025-12-23 12:20:28 +08:00 by sejal3008 · 4 comments

Environment:
OS: [Windows]
Python version: 3.12

Currently facing this issue while initialization of pico hsm :

Command Used:
python tools/pico-hsm-tool.py --pin 648219 initialize --so-pin 57621880

Error Encountered
python tools/pico-hsm-tool.py --pin 648219 initialize --so-pin 57621880
Pico HSM Tool v2.4
Author: Pol Henarejos
Report bugs to https://github.com/polhenarejos/pico-hsm/issues
Traceback (most recent call last):
File "C:\Users\sets\AppData\Local\Programs\Python\Python312\Lib\site-packages\picohsm\PicoHSM.py", line 222, in init
self.__card = cardrequest.waitforcard().connection
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\sets\AppData\Local\Programs\Python\Python312\Lib\site-packages\smartcard\CardRequest.py", line 74, in waitforcard
return self.pcsccardrequest.waitforcard()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\sets\AppData\Local\Programs\Python\Python312\Lib\site-packages\smartcard\pcsc\PCSCCardRequest.py", line 250, in waitforcard
raise CardRequestTimeoutException(hresult=hresult)
smartcard.Exceptions.CardRequestTimeoutException: Time-out during card request: The user-specified timeout value has expired. (0x8010000A)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\test\AppData\Local\Programs\Python\Python312\Lib\site-packages\picohsm\PicoHSM.py", line 229, in init
self.__card = RescuePicoKey()
^^^^^^^^^^^^^^^
File "C:\Users\test\AppData\Local\Programs\Python\Python312\Lib\site-packages\picohsm\RescuePicoKey.py", line 40, in init
devs = usb.core.find(find_all=True, custom_match=find_class(0x0B))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\test\AppData\Local\Programs\Python\Python312\Lib\site-packages\usb\core.py", line 1321, in find
raise NoBackendError('No backend available')
usb.core.NoBackendError: No backend available

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "E:\test\pico-hsm\tools\pico-hsm-tool.py", line 642, in
run()
File "E:\test\pico-hsm\tools\pico-hsm-tool.py", line 639, in run
main(args)
File "E:\test\pico-hsm\tools\pico-hsm-tool.py", line 607, in main
picohsm = PicoHSM(args.pin, slot=args.slot)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\test\AppData\Local\Programs\Python\Python312\Lib\site-packages\picohsm\PicoHSM.py", line 231, in init
raise Exception('time-out: no card inserted')
Exception: time-out: no card inserted

What Happened:
I attempted to initialize the Pico HSM using the pico-hsm-tool.py with the command above.
The tool fails to detect the device, leading to a timeout error.
The following errors are thrown in sequence:
CardRequestTimeoutException - Timeout when attempting to detect the smart card.
NoBackendError - USB backend is unavailable, causing the tool to fail when trying to find the device.
No Card Inserted - The tool raises an exception stating no card is inserted, even though the Pico HSM is physically connected.

Steps Taken to Troubleshoot:
Checked physical connection: Ensured the Pico HSM was properly connected to the USB port.
Tried different USB ports: No change in behavior.
Rebooted the system: Restarted the computer to rule out any OS-level issues.
Checked USB drivers: Verified that the necessary USB drivers were installed.
Checked again flashing the dongle for initiation itself showing this error.
Running as Administrator: Tried running the command as Administrator on Windows.

Environment: OS: [Windows] Python version: 3.12 Currently facing this issue while initialization of pico hsm : Command Used: python tools/pico-hsm-tool.py --pin 648219 initialize --so-pin 57621880 Error Encountered python tools/pico-hsm-tool.py --pin 648219 initialize --so-pin 57621880 Pico HSM Tool v2.4 Author: Pol Henarejos Report bugs to https://github.com/polhenarejos/pico-hsm/issues Traceback (most recent call last): File "C:\Users\sets\AppData\Local\Programs\Python\Python312\Lib\site-packages\picohsm\PicoHSM.py", line 222, in init self.__card = cardrequest.waitforcard().connection ^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\sets\AppData\Local\Programs\Python\Python312\Lib\site-packages\smartcard\CardRequest.py", line 74, in waitforcard return self.pcsccardrequest.waitforcard() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\sets\AppData\Local\Programs\Python\Python312\Lib\site-packages\smartcard\pcsc\PCSCCardRequest.py", line 250, in waitforcard raise CardRequestTimeoutException(hresult=hresult) smartcard.Exceptions.CardRequestTimeoutException: Time-out during card request: The user-specified timeout value has expired. (0x8010000A) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\test\AppData\Local\Programs\Python\Python312\Lib\site-packages\picohsm\PicoHSM.py", line 229, in init self.__card = RescuePicoKey() ^^^^^^^^^^^^^^^ File "C:\Users\test\AppData\Local\Programs\Python\Python312\Lib\site-packages\picohsm\RescuePicoKey.py", line 40, in init devs = usb.core.find(find_all=True, custom_match=find_class(0x0B)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\test\AppData\Local\Programs\Python\Python312\Lib\site-packages\usb\core.py", line 1321, in find raise NoBackendError('No backend available') usb.core.NoBackendError: No backend available During handling of the above exception, another exception occurred: Traceback (most recent call last): File "E:\test\pico-hsm\tools\pico-hsm-tool.py", line 642, in run() File "E:\test\pico-hsm\tools\pico-hsm-tool.py", line 639, in run main(args) File "E:\test\pico-hsm\tools\pico-hsm-tool.py", line 607, in main picohsm = PicoHSM(args.pin, slot=args.slot) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\test\AppData\Local\Programs\Python\Python312\Lib\site-packages\picohsm\PicoHSM.py", line 231, in init raise Exception('time-out: no card inserted') Exception: time-out: no card inserted What Happened: I attempted to initialize the Pico HSM using the pico-hsm-tool.py with the command above. The tool fails to detect the device, leading to a timeout error. The following errors are thrown in sequence: CardRequestTimeoutException - Timeout when attempting to detect the smart card. NoBackendError - USB backend is unavailable, causing the tool to fail when trying to find the device. No Card Inserted - The tool raises an exception stating no card is inserted, even though the Pico HSM is physically connected. Steps Taken to Troubleshoot: Checked physical connection: Ensured the Pico HSM was properly connected to the USB port. Tried different USB ports: No change in behavior. Rebooted the system: Restarted the computer to rule out any OS-level issues. Checked USB drivers: Verified that the necessary USB drivers were installed. Checked again flashing the dongle for initiation itself showing this error. Running as Administrator: Tried running the command as Administrator on Windows.

Currently facing this issue while initialization of pico hsm

I would consider it useful to also specify the exact commands that led to the error behavior.

> Currently facing this issue while initialization of pico hsm I would consider it useful to also specify the exact commands that led to the error behavior.

Currently facing this issue while initialization of pico hsm

I would consider it useful to also specify the exact commands that led to the error behavior.

i have mention the steps what I perform which it causes the error for the first command of initialization only I'm facing issue

> > Currently facing this issue while initialization of pico hsm > > I would consider it useful to also specify the exact commands that led to the error behavior. i have mention the steps what I perform which it causes the error for the first command of initialization only I'm facing issue

I would consider it useful to also specify the exact commands that led to the error behavior.

i have mention the steps what I perform which it causes the error for the first command of initialization only I'm facing issue

I think that looks much more reasonable now.

Unfortunately, it still doesn't mention which hardware version has been used.

In return for this favor, you can get me a pair of those flared trousers you're wearing, if they make them for men. I think they'd be perfect for gigs.

> > I would consider it useful to also specify the exact commands that led to the error behavior. > > i have mention the steps what I perform which it causes the error for the first command of initialization only I'm facing issue I think that looks much more reasonable now. Unfortunately, it still doesn't mention which hardware version has been used. In return for this favor, you can get me a pair of those flared trousers you're wearing, if they make them for men. I think they'd be perfect for gigs.

Pico HSM Tool has been replaced by PicoKey App.

Pico HSM Tool has been replaced by PicoKey App.
Sign in to join this conversation.