PicoHSM Slot Behavior Inconsistency Between Ubuntu and Windows #74
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
When using PicoHSM on Ubuntu, I've encountered several inconsistencies compared to Windows behavior:
Slot Detection
Initialization and Login Issues
Login behavior:
Impact on OpenSSL Operations
The slot ID discrepancy (slot 4 vs slot 0) causes issues with subsequent OpenSSL operations, affecting the overall workflow.
Can you try with v5.2?
yes the same issue with v5.2
Which OpenSC version you use? I got different outputs. I'm using v0.26. Check it and upgrade it if needed.
I have successfully upgraded OpenSC to version 0.26 by compiling it manually. However, I am still facing the same issue. I

Is it possible to test PicoHSM functionalities with an ESP8266? If yes, how can I integrate the ESP8266 for such testing?
No, it's not. Only ESP32-S3 is supported.
Can you
opensc-tool -l?Same issue here
$ pkcs11-tool -L
$ opensc-tool -l
Seems a bug with CCID 1.5 and above. It looks through the different interfaces and try loading them if the descriptor is a Smart Card class. CCID and WebCCID are Smart Card descriptors, so both are loaded. However, since both belong to the same, only the last is opened and this is why you can communicate only with slot 4 (webCCID).
I pushed a tweak by changing maxSlot of WebCCID to a wrong value to cause a timeout in LibCCID and deactivate this interface, leaving only 1. This still works with WebUSB Commissioner since it does not check maxSlot value.
Can you try with the development branch? A nightly build will be available tomorrow if you don't want to build it.
Update:
my bad, i flashed the previous nightly build 5.0 version.
seems working now :) and all commands takes some more time to run
$ opensc-tool -l
$ pkcs11-tool --login --pin 648219 --test
You have to use v5.2 from the development nightly build.
i have tested v5.2 nightly build for a while, all function seems working fine, just need to wait more time for that timeout.
and why
pico-hsm-tool.py phy wcid disabledidn't disable WebCCID interface?I forgot to remove it from the tool. WebCCID is used by Pico Commissioner through WebUSB, so it cannot be disables anymore.
The thing is that this is a bug fron LibCCID that happens on newer versions. For instance, it doesn’t happen in macOS. So apparently the linux user has to decide between the slot timeout or Pico Commissioner.
I'm also facing the same problem, as multiple slots/cards are appearing.
I have downloaded the latest nightly (seems like it was built 12 hours ago) and flashed it, but instead of reducing to a single slot, another slot appeared:
opensc is version 0.21, on Debian 11. Let me know what other informatin is required.
It was corrected in the development nightly build. Are you using stable or development?
It says "nightly development", according to the link you posted above. Downloaded the UF2 a few times just to double-check. I'm using the
waveshare-rp2040-zerobuild.I’d need the log of pcscd.
sudo LIBCCID_ifdLogLevel=0x000F pcscd --foreground --debug --apdu --color | tee -i log.txtI've gathered the log from pcscd as requested. I kept the original PID/VID and added it to
/etc/libccid_Info.plistto get pcscd to recognize the device and use the generic driver.pcscd-log.txt
I pushed some changes in the development branch. Can you check them?
Looks like it's working now. It's down to 1 card only. Thanks!