I also encounter a similar situation, as described above. However, I did not have any key on the device yet. Since I first tried to change the default PIN, but always enterd 123456 for the admin PIN until I got blocked. Now my “gpg --card-status” shows PIN retry counter: 0 0 0
I also installed the recommended packages in this post.
sudo apt-get install pcscd pcsc-tools
By the way, I am using a NK3 Mini and unfortuantely, the method "gpg --card-edit” → “admin” → “factory-reset” fails with the following error:
Continue? (y/N) y
Really do a factory reset? (enter "yes") yes
sending card command SELECT AID failed: Bad secret key
Please assist me or let me know how to proceed. Thanks in advance and enjoy the rest of your weekend!
It is possible to factory reset the smartcard with the right commands (opensc-tool -s 00:A4:04:00:06:D2:76:00:01:24:01:00 -s 00:E6:00:00 -s 00:44:00:00) even when the state is corrupted.
However, it is not possible to do so with GPG, because GPG tries to run GET DATA on some DOs and doesn’t accept faiiure.
I had the same problem as you. With me the concern came from the fact that libccid was not updated, and therefore did not support the NK3. I followed the documentation, and manually changed the /etc/libccid_info.plist file: