[Pcsclite-muscle] ccid no longer recognizes Nitrokey 3: Found interface 0 but expecting 1

Marcin Cieslak saper at saper.info
Tue Oct 21 05:33:08 PDT 2025


Hello,

I was using Nitrokey 3 for a pretty long time with pcscd+ccid
for a quite a long time but one of the updates seems to break one
thing for me - it seems that libccid does not
want to talk to that smartcard.

This is FreeBSD 15 on amd64 (so no systemd)

pcsc-lite 2.3.3, polkit support disabled
libccid 1.6.2

/usr/local/sbin/pcscd -adf started by hand as root:

00000019 ../src/ifdhandler.c:2130:init_driver() Driver version: 1.6.2
00001055 ../src/ifdhandler.c:2152:init_driver() LogLevel: 0x0003
00000005 ../src/ifdhandler.c:2163:init_driver() DriverOptions: 0x0000
00000549 ../src/ifdhandler.c:93:CreateChannelByNameOrChannel() Lun: 0, device: usb:20a0/42b2:libusb-1.0:0:9:0
00000018 ../src/ccid_usb.c:331:OpenUSBByName() Using: /usr/local/lib/pcsc/drivers//ifd-ccid.bundle/Contents/Info.plist
00000977 ../src/ccid_usb.c:349:OpenUSBByName() ifdManufacturerString: Ludovic Rousseau (ludovic.rousseau at free.fr)
00000004 ../src/ccid_usb.c:350:OpenUSBByName() ifdProductString: Generic CCID driver
00000003 ../src/ccid_usb.c:351:OpenUSBByName() Copyright: This driver is protected by terms of the GNU Lesser General Public License version 2.1, or (at your option) any later version.
00000370 ../src/ccid_usb.c:748:OpenUSBByName() Found Vendor/Product: 20A0/42B2 (Nitrokey Nitrokey 3)
00000003 ../src/ccid_usb.c:750:OpenUSBByName() Using USB bus/device: 0/9
00000004 ../src/ccid_usb.c:814:OpenUSBByName() bNumDataRatesSupported is 0
00002181 ../src/ifdhandler.c:368:IFDHGetCapabilities() tag: 0xFB3, usb:20a0/42b2:libusb-1.0:0:9:0 (lun: 0)
00000004 ../src/readerfactory.c:386:RFAddReader() Using the pcscd polling thread
00000283 ../src/ifdhandler.c:368:IFDHGetCapabilities() tag: 0xFAE, usb:20a0/42b2:libusb-1.0:0:9:0 (lun: 0)
00000006 ../src/ifdhandler.c:449:IFDHGetCapabilities() Reader supports 1 slot(s)
00000007 ../src/hotplug_libusb.c:627:HPAddHotPluggable() Adding USB device: 0:9:1
00000551 ../src/ifdhandler.c:1209:IFDHPowerICC() action: PowerUp, usb:20a0/42b2:libusb-1.0:0:9:0 (lun: 0)
00000244 ../src/eventhandler.c:287:EHStatusHandlerThread() powerState: POWER_STATE_POWERED
00000003 ../src/ifdhandler.c:368:IFDHGetCapabilities() tag: 0xFAF, usb:20a0/42b2:libusb-1.0:0:9:0 (lun: 0)
00000006 Card ATR: 3B 8F 01 80 5D 4E 69 74 72 6F 6B 65 79 00 00 00 00 00 6A 
00000001 ../src/readerfactory.c:750:RFSetReaderName() Support 16 simultaneous readers
00000245 ../src/ifdhandler.c:368:IFDHGetCapabilities() tag: 0xFAD, usb:20a0/42b2:libusb-1.0:0:9:0 (lun: 0)
00000007 ../src/readerfactory.c:329:RFAddReader() Driver is thread safe
00000005 ../src/readerfactory.c:1104:RFInitializeReader() Attempting startup of Nitrokey Nitrokey 3 01 00 using /usr/local/lib/pcsc/drivers//ifd-ccid.bundle/Contents/FreeBSD/libccid.so
00000004 ../src/readerfactory.c:888:RFLoadReader() Reusing already loaded driver for /usr/local/lib/pcsc/drivers//ifd-ccid.bundle/Contents/FreeBSD/libccid.so
00000007 ../src/readerfactory.c:977:RFBindFunctions() Loading IFD Handler 3.0
00000016 ../src/ifdhandler.c:93:CreateChannelByNameOrChannel() Lun: 10000, device: usb:20a0/42b2:libusb-1.0:0:9:1
00000010 ../src/ccid_usb.c:331:OpenUSBByName() Using: /usr/local/lib/pcsc/drivers//ifd-ccid.bundle/Contents/Info.plist
00001033 ../src/ccid_usb.c:349:OpenUSBByName() ifdManufacturerString: Ludovic Rousseau (ludovic.rousseau at free.fr)
00000005 ../src/ccid_usb.c:350:OpenUSBByName() ifdProductString: Generic CCID driver
00000003 ../src/ccid_usb.c:351:OpenUSBByName() Copyright: This driver is protected by terms of the GNU Lesser General Public License version 2.1, or (at your option) any later version.
00000384 ../src/ccid_usb.c:725:OpenUSBByName() Found interface 0 but expecting 1
00000004 ../src/ccid_usb.c:727:OpenUSBByName() Wrong interface for USB device 0/9. Checking next one.
00000739 ../src/ccid_usb.c:892:OpenUSBByName() Device not found?
00000004 ../src/ifdhandler.c:134:CreateChannelByNameOrChannel() failed
00000003 ../src/readerfactory.c:1145:RFInitializeReader() Open Port 0x200001 Failed (usb:20a0/42b2:libusb-1.0:0:9:1)
00000002 ../src/readerfactory.c:371:RFAddReader() Nitrokey Nitrokey 3 init failed.
00000003 ../src/readerfactory.c:627:RFRemoveReader() UnrefReader() count was: 1
00000002 ../src/readerfactory.c:1158:RFUnInitializeReader() Attempting shutdown of Nitrokey Nitrokey 3 01 00.
00000022 ../src/hotplug_libusb.c:485:HPEstablishUSBNotifications() Driver libifd-cyberjack.bundle does not support IFD_GENERATE_HOTPLUG. Using active polling instead.
00000030 ../src/hotplug_libusb.c:494:HPEstablishUSBNotifications() Polling forced every 1 second(s)
00398078 ../src/ifdhandler.c:1209:IFDHPowerICC() action: PowerDown, usb:20a0/42b2:libusb-1.0:0:9:0 (lun: 0)
00000292 ../src/eventhandler.c:480:EHStatusHandlerThread() powerState: POWER_STATE_UNPOWERED

Interface descriptors:

ugen0.9: <Nitrokey 3A Mini/3A NFC/3C NFC Clay Logic> at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (100mA)


  Configuration index 0

     bLength = 0x0009
     bDescriptorType = 0x0002
     wTotalLength = 0x0076
     bNumInterfaces = 0x0002
     bConfigurationValue = 0x0001
     iConfiguration = 0x0000  <no string>
     bmAttributes = 0x0080
     bMaxPower = 0x0032

     Interface 0
       bLength = 0x0009
       bDescriptorType = 0x0004
       bInterfaceNumber = 0x0000
       bAlternateSetting = 0x0000
       bNumEndpoints = 0x0002
       bInterfaceClass = 0x000b  <Smart card>
       bInterfaceSubClass = 0x0000
       bInterfaceProtocol = 0x0000
       iInterface = 0x0004  <CCID/ICCD Interface>

       Additional Descriptor

       bLength = 0x36
       bDescriptorType = 0x21
       bDescriptorSubType = 0x10
        RAW dump:
        0x00 | 0x36, 0x21, 0x10, 0x01, 0x00, 0x01, 0x02, 0x00,
        0x08 | 0x00, 0x00, 0xfc, 0x0d, 0x00, 0x00, 0xfc, 0x0d,
        0x10 | 0x00, 0x00, 0x00, 0x80, 0x25, 0x00, 0x00, 0x80,
        0x18 | 0x25, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00,
        0x20 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
        0x28 | 0x40, 0x08, 0x04, 0x00, 0x00, 0x0c, 0x00, 0x00,
        0x30 | 0xff, 0xff, 0x00, 0x00, 0x00, 0x01


      Endpoint 0
         bLength = 0x0007
         bDescriptorType = 0x0005
         bEndpointAddress = 0x0081  <IN>
         bmAttributes = 0x0002  <BULK>
         wMaxPacketSize = 0x0040
         bInterval = 0x0000
         bRefresh = 0x0000
         bSynchAddress = 0x0000

      Endpoint 1
         bLength = 0x0007
         bDescriptorType = 0x0005
         bEndpointAddress = 0x0001  <OUT>
         bmAttributes = 0x0002  <BULK>
         wMaxPacketSize = 0x0040
         bInterval = 0x0000
         bRefresh = 0x0000
         bSynchAddress = 0x0000


     Interface 1
       bLength = 0x0009
       bDescriptorType = 0x0004
       bInterfaceNumber = 0x0001
       bAlternateSetting = 0x0000
       bNumEndpoints = 0x0002
       bInterfaceClass = 0x0003  <HID device>
       bInterfaceSubClass = 0x0000
       bInterfaceProtocol = 0x0000
       iInterface = 0x0000  <no string>

       Additional Descriptor

       bLength = 0x09
       bDescriptorType = 0x21
       bDescriptorSubType = 0x11
        RAW dump:
        0x00 | 0x09, 0x21, 0x11, 0x01, 0x00, 0x01, 0x22, 0x22,
        0x08 | 0x00

      Endpoint 0
         bLength = 0x0007
         bDescriptorType = 0x0005
         bEndpointAddress = 0x0002  <OUT>
         bmAttributes = 0x0003  <INTERRUPT>
         wMaxPacketSize = 0x0040
         bInterval = 0x0005
         bRefresh = 0x0000
         bSynchAddress = 0x0000

      Endpoint 1
         bLength = 0x0007
         bDescriptorType = 0x0005
         bEndpointAddress = 0x0082  <IN>
         bmAttributes = 0x0003  <INTERRUPT>
         wMaxPacketSize = 0x0040
         bInterval = 0x0005
         bRefresh = 0x0000
         bSynchAddress = 0x0000
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3706 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.infradead.org/pipermail/pcsclite-muscle/attachments/20251021/0e75ce95/attachment.p7s>


More information about the pcsclite-muscle mailing list