[Pcsclite-muscle] Problems with Alcor Micro AU9540 or AU9560 (was: Re: problems with rocketec reader)

Gregor Zattler telegraph at gmx.net
Thu Dec 28 17:13:56 PST 2017


Hi Ludovic,

I have a problem with a smartcard reader which is builtin a Lenovo Thinkpad x240
under debian/stretch (v9.3, packages are up-to-date).

    libccid             1.4.26-1
    libpcsclite1:amd64  1.8.20-1
    pcsc-tools          1.4.27-1
    pcscd               1.8.20-1

    $ /usr/sbin/pcscd --version
    pcsc-lite version 1.8.20.
    Copyright (C) 1999-2002 by David Corcoran <corcoran at musclecard.com>.
    Copyright (C) 2001-2015 by Ludovic Rousseau <ludovic.rousseau at free.Freitag>.
    Copyright (C) 2003-2004 by Damien Sauveron <sauveron at labri.Freitag>.
    Report bugs to <pcsclite-muscle at lists.alioth.debian.org>.
    Enabled features: Linux x86_64-pc-linux-gnu serial usb libudev usbdropdir=/usr/lib/pcsc/drivers ipcdir=/var/run/pcscd configdir=/etc/reader.conf.d

The reader is reported via lsusb as Alcor Micro Corp. AU9540:

    $ lsusb
    Bus 003 Device 003: ID 058f:9540 Alcor Micro Corp. AU9540 Smartcard Reader
    [... Details below ...]

but as Alcor Micro AU9560 via pcsc_scan:

    $ pcsc_scan
    PC/SC device scanner
    V 1.4.27 (c) 2001-2011, Ludovic Rousseau <ludovic.rousseau at free.Freitag>
    Compiled with PC/SC lite version: 1.8.17
    Using reader plug'n play mechanism
    Scanning present readers...
    0: Alcor Micro AU9560 00 00
    
    Fri Dec 29 01:02:29 2017
    Reader 0: Alcor Micro AU9560 00 00
    Card state: Card removed,
    
    Fri Dec 29 01:02:40 2017
    Reader 0: Alcor Micro AU9560 00 00
    Card state: Card inserted, Unresponsive card,


The cards in question are an OpenPGP card v2.1  The problem is the same
with both cards.  I accessed the cards successfully via gpg --card-status
some months ago.  But I do not remember the details.  Most probably I did
so with this very reader (because the only other model is a reiner cyber
jack which is not supported).

Please find attached the log.txt produced via
udo LIBCCID_ifdLogLevel=0x000F pcscd --foreground --debug --apdu --color | tee log.txt.


I do report this problem as a reply to your answer to a two year old problem
report (see far below) because this was an AU940 also.  But the interesting part
is that the reporter found two platforms/software versions which worked with
her/his reader. I did not understand why judged that s/he would have to buy
another reader.



Thanks for the development of ccid and pcscd and your attention.

Regards, gregor

$ lsusb -vvvvv
Bus 003 Device 003: ID 058f:9540 Alcor Micro Corp. AU9540 Smartcard Reader
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.01
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         8
  idVendor           0x058f Alcor Micro Corp.
  idProduct          0x9540 AU9540 Smartcard Reader
  bcdDevice            1.20
  iManufacturer           1 Generic
  iProduct                2 EMV Smartcard Reader
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           93
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower               50mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass        11 Chip/SmartCard
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              0 
      ChipCard Interface Descriptor:
        bLength                54
        bDescriptorType        33
        bcdCCID              1.10  (Warning: Only accurate for version 1.0)
        nMaxSlotIndex           0
        bVoltageSupport         7  5.0V 3.0V 1.8V 
        dwProtocols             3  T=0 T=1
        dwDefaultClock       3700
        dwMaxiumumClock     12000
        bNumClockSupported      3
        dwDataRate           9946 bps
        dwMaxDataRate      688172 bps
        bNumDataRatesSupp.    138
        dwMaxIFSD             254
        dwSyncProtocols  00000007  2-wire 3-wire I2C
        dwMechanical     00000000 
        dwFeatures       000404BE
          Auto configuration based on ATR
          Auto activation on insert
          Auto voltage selection
          Auto clock change
          Auto baud rate change
          Auto PPS made by CCID
          Auto IFSD exchange
          Short and extended APDU level exchange
        dwMaxCCIDMsgLen       272
        bClassGetResponse    echo
        bClassEnvelope       echo
        wlcdLayout           none
        bPINSupport             0 
        bMaxCCIDBusySlots       1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0004  1x 4 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0010  1x 16 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0010  1x 16 bytes
        bInterval               0
Binary Object Store Descriptor:
  bLength                 5
  bDescriptorType        15
  wTotalLength           12
  bNumDeviceCaps          1
  USB 2.0 Extension Device Capability:
    bLength                 7
    bDescriptorType        16
    bDevCapabilityType      2
    bmAttributes   0x00000002
      Link Power Management (LPM) Supported
Device Status:     0x0000
  (Bus Powered)

[...]




* Ludovic Rousseau <ludovic.rousseau> [31. Dez. 2015]:
> 2015-12-31 0:05 GMT+01:00 Marian Thieme <marian.thieme at gmail.com>:
> 
>> Hello !
>>
> 
> Hello,
> 
> 
>>
>> I have some trouble using Rocketek RT-SCR1 smartcard reader. It is
>> listed below the "shouldwork"-readers
>> (https://pcsclite.alioth.debian.org/ccid/shouldwork.html#0x14CD0x8166)
>>
> 
> Your logs are about the "Alcor Micro AU9540" reader.
> This reader is in the "unsupported" list at
> https://pcsclite.alioth.debian.org/ccid/unsupported.html#0x058F0x9540
> 
> I don't know why you think you are using a Rocketek RT-SCR1 reader.
> 
> And it seems there are reasons why it is not in the supported list.
>>
>> Attached there are 4 logs according to the following situation:
>>
>> 1.) freebsd 10_2 amd64: working !
>> pcsc-lite-1.8.14,2
>> ccid-1.4.20
>>
>> 2.) opensuse 12.3 i586: working !
>> pcsc-lite-1.8.8-2.1.1.i586
>> pcsc-ccid-1.4.9-2.1.1.i586
>>
>>
>> 3.) debian8 amd64: *not* working !
>> tested 2 different versions:
>>
>>   newest, compiled from source:
>>   pcsc-lite 1.8.14
>>   ccid-1.4.21
>>
>>   installed from debian8 repo:
>>   1.8.13-1
>>   1.4.18-1
>>
>> Problem according to log: DISCONNECT after first CONTROL Message was sent.
>>
> 
> 00000020 -> 000000 6F 05 00 00 00 00 08 00 00 00 00 CA 01 82 00
> 04808323 ccid_usb.c:786:ReadUSB() read failed (1/3): -7 LIBUSB_ERROR_TIMEOUT
> 
> USB issue on the first APDU sent to the reader.
> The reader failed to send an answer?
> 
> 
>>
>> 4.) opensuse 13.1: *not* working
>> pcsc-lite-1.8.8-4.1.2.x86_64
>> pcsc-ccid-1.4.12-2.1.1.x86_64
>>
>> Problem according to log: Error powering up card
>>
> 
> 00000016 -> 000000 62 00 00 00 00 00 0A 00 00 00
> 00068042 ccid_usb.c:771:ReadUSB() read failed (1/4): -99 Success
> 
> USB issue again.
> -99 is LIBUSB_ERROR_OTHER
> 
> Any advices ?
>>
> 
> Buy another reader?
> 
> Bye
> 
> -- 
>  Dr. Ludovic Rousseau
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://lists.alioth.debian.org/pipermail/pcsclite-muscle/attachments/20151231/7a5345f9/attachment.html>
> 
-------------- next part --------------
00000000 debuglog.c:289:DebugLogSetLevel() debug level=debug
00000056 debuglog.c:310:DebugLogSetCategory() Debug options: APDU
00000003 pcscdaemon.c:351:main() Force colored logs
00000015 utils.c:82:GetDaemonPid() Can't open /var/run/pcscd/pcscd.pid: No such file or directory
00000066 configfile.l:282:DBGetReaderListDir() Parsing conf directory: /etc/reader.conf.d
00000026 configfile.l:319:DBGetReaderListDir() Skipping non regular file: ..
00000003 configfile.l:358:DBGetReaderList() Parsing conf file: /etc/reader.conf.d/libccidtwin
00000214 configfile.l:319:DBGetReaderListDir() Skipping non regular file: .
00000007 pcscdaemon.c:655:main() pcsc-lite 1.8.20 daemon ready.
00004385 hotplug_libudev.c:294:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0002, path: /dev/bus/usb/002/001
00000123 hotplug_libudev.c:294:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0002, path: /dev/bus/usb/002/001
00000083 hotplug_libudev.c:294:get_driver() Looking for a driver for VID: 0x05E3, PID: 0x0610, path: /dev/bus/usb/002/002
00000064 hotplug_libudev.c:294:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0002, path: /dev/bus/usb/002/001
00000070 hotplug_libudev.c:294:get_driver() Looking for a driver for VID: 0x1199, PID: 0xA001, path: /dev/bus/usb/002/003
00000062 hotplug_libudev.c:294:get_driver() Looking for a driver for VID: 0x1199, PID: 0xA001, path: /dev/bus/usb/002/003
00000063 hotplug_libudev.c:294:get_driver() Looking for a driver for VID: 0x1199, PID: 0xA001, path: /dev/bus/usb/002/003
00000061 hotplug_libudev.c:294:get_driver() Looking for a driver for VID: 0x1199, PID: 0xA001, path: /dev/bus/usb/002/003
00000093 hotplug_libudev.c:294:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0003, path: /dev/bus/usb/003/001
00000058 hotplug_libudev.c:294:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0003, path: /dev/bus/usb/003/001
00000069 hotplug_libudev.c:294:get_driver() Looking for a driver for VID: 0x05E3, PID: 0x0616, path: /dev/bus/usb/003/002
00000096 hotplug_libudev.c:294:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0002, path: /dev/bus/usb/001/001
00000059 hotplug_libudev.c:294:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0002, path: /dev/bus/usb/001/001
00000067 hotplug_libudev.c:294:get_driver() Looking for a driver for VID: 0x8087, PID: 0x8000, path: /dev/bus/usb/001/002
00000071 hotplug_libudev.c:294:get_driver() Looking for a driver for VID: 0x058F, PID: 0x9540, path: /dev/bus/usb/001/003
00000005 hotplug_libudev.c:433:HPAddDevice() Adding USB device: Alcor Micro AU9560
00000027 readerfactory.c:1079:RFInitializeReader() Attempting startup of Alcor Micro AU9560 00 00 using /usr/lib/pcsc/drivers/ifd-ccid.bundle/Contents/Linux/libccid.so
00001037 readerfactory.c:954:RFBindFunctions() Loading IFD Handler 3.0
00000093 ifdhandler.c:1961:init_driver() Driver version: 1.4.26
00000463 ifdhandler.c:1978:init_driver() LogLevel: 0x0003
00000008 ifdhandler.c:1989:init_driver() DriverOptions: 0x0000
00000143 ifdhandler.c:2002:init_driver() LogLevel from LIBCCID_ifdLogLevel: 0x000F
00000003 ifdhandler.c:111:CreateChannelByNameOrChannel() Lun: 0, device: usb:058f/9540:libudev:0:/dev/bus/usb/001/003
00000002 ccid_usb.c:237:OpenUSBByName() Reader index: 0, Device: usb:058f/9540:libudev:0:/dev/bus/usb/001/003
00000012 ccid_usb.c:269:OpenUSBByName() interface_number: 0
00000002 ccid_usb.c:270:OpenUSBByName() usb bus/device: 1/3
00000002 ccid_usb.c:287:OpenUSBByName() Using: /usr/lib/pcsc/drivers/ifd-ccid.bundle/Contents/Info.plist
00000426 ccid_usb.c:305:OpenUSBByName() ifdManufacturerString: Ludovic Rousseau (ludovic.rousseau at free.fr)
00000003 ccid_usb.c:306:OpenUSBByName() ifdProductString: Generic CCID driver
00000002 ccid_usb.c:307: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.
00001590 ccid_usb.c:391:OpenUSBByName() Try device: 1/3
00000006 ccid_usb.c:401:OpenUSBByName() vid/pid : 058F/9540
00000002 ccid_usb.c:448:OpenUSBByName() Checking device: 1/3
00000001 ccid_usb.c:519:OpenUSBByName() Trying to open USB bus/device: 1/3
00135642 ccid_usb.c:621:OpenUSBByName() Found Vendor/Product: 058F/9540 (Alcor Micro AU9560)
00000009 ccid_usb.c:623:OpenUSBByName() Using USB bus/device: 1/3
00000004 ccid_usb.c:1191:ControlUSB() request: 0x03
03003643 ccid_usb.c:1204:ControlUSB() control failed (1/3): -7 LIBUSB_ERROR_TIMEOUT
00000013 ccid_usb.c:1135:get_data_rates() IFD does not support GET_DATA_RATES request: -7
00001538 ccid_usb.c:1244:InterruptRead() before (0)
00000675 ccid_usb.c:1290:InterruptRead() after (0) (0)
00000016 NotifySlotChange: 50 02 
00000009 -> 000000 65 00 00 00 00 00 00 00 00 00 
00000855 <- 000000 81 00 00 00 00 00 00 42 FE 01 
00000019 -> 000000 65 00 00 00 00 00 01 00 00 00 
00000983 <- 000000 81 00 00 00 00 00 01 42 FE 01 
00000022 ifdhandler.c:382:IFDHGetCapabilities() tag: 0xFB3, usb:058f/9540:libudev:0:/dev/bus/usb/001/003 (lun: 0)
00000006 readerfactory.c:395:RFAddReader() Using the reader polling thread
00000006 ifdhandler.c:1821:IFDHICCPresence() usb:058f/9540:libudev:0:/dev/bus/usb/001/003 (lun: 0)
00000006 -> 000000 65 00 00 00 00 00 02 00 00 00 
00000945 <- 000000 81 00 00 00 00 00 02 42 FE 01 
00000012 ifdhandler.c:1942:IFDHICCPresence() Card absent
00000077 ifdhandler.c:382:IFDHGetCapabilities() tag: 0xFAE, usb:058f/9540:libudev:0:/dev/bus/usb/001/003 (lun: 0)
00000006 ifdhandler.c:473:IFDHGetCapabilities() Reader supports 1 slot(s)
00000023 ifdhandler.c:1821:IFDHICCPresence() usb:058f/9540:libudev:0:/dev/bus/usb/001/003 (lun: 0)
00000037 -> 000000 65 00 00 00 00 00 03 00 00 00 
00000170 hotplug_libudev.c:294:get_driver() Looking for a driver for VID: 0x8087, PID: 0x8000, path: /dev/bus/usb/001/002
00000037 readerfactory.c:1420:RFWaitForReaderInit() Waiting init for reader: Alcor Micro AU9560 00 00
00000680 <- 000000 81 00 00 00 00 00 03 42 FE 01 
00000005 ifdhandler.c:1942:IFDHICCPresence() Card absent
00000003 ifdhandler.c:1821:IFDHICCPresence() usb:058f/9540:libudev:0:/dev/bus/usb/001/003 (lun: 0)
00000005 -> 000000 65 00 00 00 00 00 04 00 00 00 
00000838 <- 000000 81 00 00 00 00 00 04 42 FE 01 
00000004 ifdhandler.c:1942:IFDHICCPresence() Card absent
00000002 ifdhandler.c:311:IFDHPolling() usb:058f/9540:libudev:0:/dev/bus/usb/001/003 (lun: 0) 600000 ms
00000002 ccid_usb.c:1244:InterruptRead() before (0)
07421266 ccid_usb.c:1290:InterruptRead() after (0) (0)
00000013 NotifySlotChange: 50 03 
00000004 ifdhandler.c:1821:IFDHICCPresence() usb:058f/9540:libudev:0:/dev/bus/usb/001/003 (lun: 0)
00000004 -> 000000 65 00 00 00 00 00 05 00 00 00 
00010223 <- 000000 81 00 00 00 00 00 05 01 00 01 
00000012 ifdhandler.c:1942:IFDHICCPresence() Card present
00000003 ifdhandler.c:1821:IFDHICCPresence() usb:058f/9540:libudev:0:/dev/bus/usb/001/003 (lun: 0)
00000004 -> 000000 65 00 00 00 00 00 06 00 00 00 
00000861 <- 000000 81 00 00 00 00 00 06 01 00 01 
00000013 ifdhandler.c:1942:IFDHICCPresence() Card present
00000004 ifdhandler.c:1154:IFDHPowerICC() action: PowerUp, usb:058f/9540:libudev:0:/dev/bus/usb/001/003 (lun: 0)
00000005 -> 000000 62 00 00 00 00 00 07 00 00 00 
00303394 <- 000000 80 00 00 00 00 00 07 41 FE 00 
00000013 commands.c:249:CmdPowerOn Card absent or mute
00000015 ifdhandler.c:1221:IFDHPowerICC() PowerUp failed
00000002 eventhandler.c:409:EHStatusHandlerThread() powerState: POWER_STATE_UNPOWERED
00000002 eventhandler.c:420:EHStatusHandlerThread() Card inserted into Alcor Micro AU9560 00 00
00000001 eventhandler.c:436:EHStatusHandlerThread() Error powering up card.
00000003 ifdhandler.c:311:IFDHPolling() usb:058f/9540:libudev:0:/dev/bus/usb/001/003 (lun: 0) 600000 ms
00000002 ccid_usb.c:1244:InterruptRead() before (0)
24779872 winscard_msg_srv.c:251:ProcessEventsServer() Common channel packet arrival
00000018 winscard_msg_srv.c:263:ProcessEventsServer() ProcessCommonChannelRequest detects: 14
00000003 pcscdaemon.c:132:SVCServiceRunLoop() A new context thread creation is requested: 14
00000052 winscard_svc.c:337:ContextThread() Authorized PC/SC client
00000005 winscard_svc.c:341:ContextThread() Thread is started: dwClientID=14, threadContext @0x55b1433a4f40
00000007 winscard_svc.c:359:ContextThread() Received command: CMD_VERSION from client 14
00000003 winscard_svc.c:371:ContextThread() Client is protocol version 4:3
00000001 winscard_svc.c:391:ContextThread() CMD_VERSION rv=0x0 for client 14
00000023 winscard_svc.c:359:ContextThread() Received command: ESTABLISH_CONTEXT from client 14
00000008 winscard.c:215:SCardEstablishContext() Establishing Context: 0x6D02A7E
00000002 winscard_svc.c:455:ContextThread() ESTABLISH_CONTEXT rv=0x0 for client 14
00000018 winscard_svc.c:359:ContextThread() Received command: CMD_GET_READERS_STATE from client 14
00000027 winscard_svc.c:359:ContextThread() Received command: CMD_WAIT_READER_STATE_CHANGE from client 14
00000037 winscard_svc.c:359:ContextThread() Received command: CMD_STOP_WAITING_READER_STATE_CHANGE from client 14
00000006 winscard_svc.c:436:ContextThread() CMD_STOP_WAITING_READER_STATE_CHANGE rv=0x0 for client 14
00000017 winscard_svc.c:359:ContextThread() Received command: CMD_GET_READERS_STATE from client 14
00000029 winscard_svc.c:359:ContextThread() Received command: CMD_GET_READERS_STATE from client 14
00000019 winscard_svc.c:359:ContextThread() Received command: CMD_GET_READERS_STATE from client 14
00000023 winscard_svc.c:359:ContextThread() Received command: CMD_GET_READERS_STATE from client 14
00400300 winscard_svc.c:359:ContextThread() Received command: CMD_GET_READERS_STATE from client 14
00400235 winscard_svc.c:359:ContextThread() Received command: CMD_WAIT_READER_STATE_CHANGE from client 14


More information about the pcsclite-muscle mailing list