Page MenuHome GnuPG

gpg does not recognize my smartcard reader
Closed, ResolvedPublic

Description

I'm running pop_os 22.04 with gpg (GnuPG) 2.2.27

I have bought a HID OMNIKEY 3121 Smartcardreader.
When I run

gpg --card-status --expert

The output is:

gpg: selecting card failed: No such device
gpg: OpenPGP card not available: No such device

I tried to add disable-ccid in the ~/.gnupg/scdaemon.conf , but the problem persists.
With pcsc_scan the reader is recognized:

Using reader plug'n play mechanism
Scanning present readers...
0: HID Global OMNIKEY 3x21 Smart Card Reader [OMNIKEY 3x21 Smart Card Reader] 00 00

Mon Dec 18 18:11:34 2023
Reader 0: HID Global OMNIKEY 3x21 Smart Card Reader [OMNIKEY 3x21 Smart Card Reader] 00 00

Event number: 0
Card state: Card removed,

opensc also regognize the smartcard:

Detected readers (pcsc)
Nr. Card Features Name
0 No HID Global OMNIKEY 3x21 Smart Card Reader [OMNIKEY 3x21 Smart Card Reader] 00 00

The scdaemon log is as follows (debug-all):

2023-12-18 18:05:40 scdaemon[6550] listening on socket '/run/user/1000/gnupg/S.scdaemon'
2023-12-18 18:05:40 scdaemon[6550] handler for fd -1 started
2023-12-18 18:05:40 scdaemon[6550] DBG: chan_7 -> OK GNU Privacy Guard's Smartcard server ready
2023-12-18 18:05:40 scdaemon[6550] DBG: chan_7 <- GETINFO socket_name
2023-12-18 18:05:40 scdaemon[6550] DBG: chan_7 -> D /run/user/1000/gnupg/S.scdaemon
2023-12-18 18:05:40 scdaemon[6550] DBG: chan_7 -> OK
2023-12-18 18:05:40 scdaemon[6550] DBG: chan_7 <- OPTION event-signal=12
2023-12-18 18:05:40 scdaemon[6550] DBG: chan_7 -> OK
2023-12-18 18:05:40 scdaemon[6550] DBG: chan_7 <- GETINFO version
2023-12-18 18:05:40 scdaemon[6550] DBG: chan_7 -> D 2.2.27
2023-12-18 18:05:40 scdaemon[6550] DBG: chan_7 -> OK
2023-12-18 18:05:40 scdaemon[6550] DBG: chan_7 <- SERIALNO
2023-12-18 18:05:40 scdaemon[6550] DBG: enter: apdu_open_reader: portstr=(null)
2023-12-18 18:05:40 scdaemon[6550] detected reader 'HID Global OMNIKEY 3x21 Smart Card Reader [OMNIKEY 3x21 Smart Card Reader] 00 00'
2023-12-18 18:05:40 scdaemon[6550] reader slot 0: not connected
2023-12-18 18:05:40 scdaemon[6550] DBG: leave: apdu_open_reader => slot=0 [pc/sc]
2023-12-18 18:05:40 scdaemon[6550] DBG: enter: apdu_connect: slot=0
2023-12-18 18:05:40 scdaemon[6550] reader slot 0: not connected
2023-12-18 18:05:40 scdaemon[6550] DBG: leave: apdu_connect => sw=0x10008
2023-12-18 18:05:40 scdaemon[6550] DBG: enter: apdu_close_reader: slot=0
2023-12-18 18:05:40 scdaemon[6550] DBG: enter: apdu_disconnect: slot=0
2023-12-18 18:05:40 scdaemon[6550] DBG: leave: apdu_disconnect => sw=0x0
2023-12-18 18:05:40 scdaemon[6550] DBG: leave: apdu_close_reader => 0x0 (close_reader)
2023-12-18 18:05:40 scdaemon[6550] DBG: chan_7 -> ERR 100696144 No such device <SCD>
2023-12-18 18:05:40 scdaemon[6550] DBG: chan_7 <- RESTART
2023-12-18 18:05:40 scdaemon[6550] DBG: chan_7 -> OK

When I search for this problem I mostly found only solutions for the yubikey/nitrokey, where it is recommended to disable the ccid.

I tried it also on a ubuntu 23.10 live usb and another Pop os machine, with the same results.

Edit: I've build gnupg 2.4.3 from the sources and looked at the problem at https://dev.gnupg.org/T6871.

when I run

echo scd getinfo reader_list | gpg-connect-agent --decode

I only get the USB Descriptor:

D 076B:3031:X:0
OK

The content of scdaemon.conf:

debug-all
disable-ccid
log-file /home/pluscrafter/scdaemon.log

gpg.conf:

utf8-strings
keyserver hkps://keys.openpgp.org

Details

Version
2.2.27, 2.4.3

Event Timeline

Pluscrafter removed a project: Bug Report.
Pluscrafter changed Version from 2.2.27 to 2.2.27, 2.4.3.

Omnikey readers only work properly on Windows because the Windows driver uses proprietary extension to make it work. Better don't use them. In case you want to look at details, add

debug cardio

to scdaemon.conf

I made a clean install of the system and installed gnupg from sources. Now it works strangely.

werner claimed this task.

May be a still running daemon from another version or a a problem during the first install.