[Pcsclite-muscle] Gemalto IDBridge K30 (480A1473), Not enough data received: 0 bytes
Wolfgang Pichler
wpichler
Sat Feb 18 07:17:27 PST 2017
Hi all,
we have a very interessting problem using a Gemalto IDBridge K30 with pcscd - libccid.
I do have serveral of these devices - they are nearly identically - the only difference i found is that bNumDataRatesSupp is 50 and on the other devices it is 53.
For the problem
- all tokens do work on my old development machine with libccid 1.4.22 from ubuntu (x64)
- on the destination system - a raspberry pi 3b (also tested pi 2b) only the tokens with bNumDataRatesSupp=50 do work - the one with bNumDataRatesSupp=53 will fail with:
00007876 ccid.c:78:ccid_open_hack_pre() ZLP fixup
00000038 ccid_usb.c:1101:InterruptRead() before (0)
00000025 ccid_usb.c:1102:InterruptRead() timeout (1000 ms) <- I?ve inserted this statement - and tried to increase timeout from 100ms to 1000ms - did not help
01000190 ccid_usb.c:1144:InterruptRead() after (0) (2)
00000307 -> 000000 65 00 00 00 00 00 00 00 00 00
00001742 <- 000000 81 00 00 00 00 00 00 00 00 00
00001119 -> 000000 65 00 00 00 00 00 01 00 00 00
00000487 <- 000000
00000029 commands.c:1110:CmdGetSlotStatus() Not enough data received: 0 bytes
As you can see here - i have already tried a version with the ZLP fixup - but it did not help.
I?ve already tried versions
1.4.22 (as this version does work on my development machine)
1.4.11 (for the ZLP Fix)
1.4.26 (the latest)
Here some more logs
00000028 ifdhandler.c:1822:IFDHICCPresence() Card present
00000231 ifdhandler.c:359:IFDHGetCapabilities() tag: 0xFAE, usb:08e6/3438:libudev:0:/dev/bus/usb/001/005 (lun: 0)
00000032 ifdhandler.c:447:IFDHGetCapabilities() Reader supports 1 slot(s)
00000072 ifdhandler.c:1704:IFDHICCPresence() usb:08e6/3438:libudev:0:/dev/bus/usb/001/005 (lun: 0)
00000666 hotplug_libudev.c:294:get_driver() Looking for a driver for VID: 0x0424, PID: 0x9514, path: /dev/bus/usb/001/002
00000209 readerfactory.c:1420:RFWaitForReaderInit() Waiting init for reader: Gemalto IDBridge K30 (480A1473) 00 00
00000460 -> 000000 65 00 00 00 00 00 05 00 00 00
00000429 <- 000000
00000029 commands.c:1110:CmdGetSlotStatus() Not enough data received: 0 bytes
00000036 ifdwrapper.c:369:IFDStatusICC() Card not transacted: 612
00000030 ifdhandler.c:1704:IFDHICCPresence() usb:08e6/3438:libudev:0:/dev/bus/usb/001/005 (lun: 0)
00000291 -> 000000 65 00 00 00 00 00 06 00 00 00
00001738 <- 000000 81 00 00 00 00 00 06 00 00 00
00000028 ifdhandler.c:1822:IFDHICCPresence() Card present
00000030 ifdhandler.c:1704:IFDHICCPresence() usb:08e6/3438:libudev:0:/dev/bus/usb/001/005 (lun: 0)
00001107 -> 000000 65 00 00 00 00 00 07 00 00 00
00000448 <- 000000
00000027 commands.c:1110:CmdGetSlotStatus() Not enough data received: 0 bytes
00000027 ifdwrapper.c:369:IFDStatusICC() Card not transacted: 612
00000026 eventhandler.c:409:EHStatusHandlerThread() powerState: POWER_STATE_UNPOWERED
00000026 eventhandler.c:420:EHStatusHandlerThread() Card inserted into Gemalto IDBridge K30 (480A1473) 00 00
00000026 eventhandler.c:436:EHStatusHandlerThread() Error powering up card.
The ?extra? datarates which the token provides are:
00000024 ccid_usb.c:1171:get_data_rates() declared: 12500 bps
00000023 ccid_usb.c:1171:get_data_rates() declared: 10323 bps
00000023 ccid_usb.c:1171:get_data_rates() declared: 12403 bps
when i try to access the card - then i do get this on the token which does work:
00000028 winscard.c:349:SCardConnect() powerState: POWER_STATE_INUSE
00000023 prothandler.c:108:PHSetProtocol() Attempting PTS to T=1
00000027 ifdhandler.c:692:IFDHSetProtocolParameters() protocol T=1, usb:08e6/3438:libudev:0:/dev/bus/usb/001/009 (lun: 0)
00000047 ifdhandler.c:2098:extra_egt() Extra EGT patch applied
00024371 winscard.c:428:SCardConnect() Active Protocol: T=1
00000042 winscard.c:453:SCardConnect() hCard Identity: 4cc6e952
and this on the token which does not work
00000026 winscard.c:349:SCardConnect() powerState: POWER_STATE_INUSE
00000027 prothandler.c:108:PHSetProtocol() Attempting PTS to T=1
00000030 ifdhandler.c:692:IFDHSetProtocolParameters() protocol T=1, usb:08e6/3438:libudev:0:/dev/bus/usb/001/008 (lun: 0)
00000043 ifdhandler.c:2098:extra_egt() Extra EGT patch applied
00012539 commands.c:2271:SetParameters() Not enough data received: 0 bytes
00000038 prothandler.c:124:PHSetProtocol() PTS failed (612), using T=1
As you can see - after the EGT patch - the good one is showing Protocol T=1 - the bad one failed because it could not read the data.
I also already try to update libusb - also without any effect.
The card in the reader is not the problem - i?ve already switched the cards - the problem is specific to the reader.
Also a college did tried it on his raspberry - the same result with other gemalto reader - it did not work for him - he also does has 53 data rates?
So the problem must be somehow related to the dataRates - maybe i do try to exclude the extra datarates in the source - maybe it then just works ;-)
Any guess about this would be great !
br,
Wolfgang
More information about the pcsclite-muscle
mailing list