Hello, I've got ACR122U reader and noticed that when a CCID frame sent from the host to the token is larger than 64 bytes (APDU larger than 54 bytes), the sequence number (byte at +6 in the CCID frame) is one less than the sequence number of the sent frame. This results in libccid dropping the frame as duplicate, and trying to read the next one. This of course ends in timeout.
I must note that openpgp functionality works over this reader (maybe they never use APDUs bigger than 54 bytes?). The wrong sequence number in the response frame happens regardless of what NFC gadget lies on the reader. I am playing with Yubikey Neo, but it also happens with credit cards, blank tags etc. Does this happen to anybody else? I wrote to ACS but I don't have much hope. If this is a common problem with ACR122 reader, it should be possible to add a hack to libccid, that would allow off-by-one sequence number in the response when the reader is of this type and the size of the sent packet is bigger than 64 bytes. If I am the only one affected, I'll just do it for myself. Thanks, Eugene Good: 00000071 winscard.c:1580:SCardTransmit() Send Protocol: T=1 00000081 APDU: 00 01 38 00 30 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 16 00000057 ifdhandler.c:1292:IFDHTransmitToICC() usb:072f/2200:libudev:0:/dev/bus/usb/002/002 (lun: 0) 00000054 commands.c:1565:CmdXfrBlockTPDU_T0() T=0: 54 bytes 00000087 -> 000000 6F 36 00 00 00 00 0F 00 00 00 00 01 38 00 30 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 16 00059914 <- 000000 80 16 00 00 00 00 0F 00 81 00 77 3B F7 18 2E 17 CE 51 D0 AC 5E B6 4D 33 6D 17 70 C9 1D 64 90 00 00000028 SW: 77 3B F7 18 2E 17 CE 51 D0 AC 5E B6 4D 33 6D 17 70 C9 1D 64 90 00 Bad: 00000028 winscard.c:1580:SCardTransmit() Send Protocol: T=1 00000038 APDU: 00 01 38 00 31 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 00 16 00000028 ifdhandler.c:1292:IFDHTransmitToICC() usb:072f/2200:libudev:0:/dev/bus/usb/002/002 (lun: 0) 00000027 commands.c:1565:CmdXfrBlockTPDU_T0() T=0: 55 bytes 00000041 -> 000000 6F 37 00 00 00 00 0D 00 00 00 00 01 38 00 31 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 00 16 00060854 <- 000000 80 16 00 00 00 00 0C 00 81 00 20 D1 A1 6E 94 E9 13 EB AF E5 9C F5 F3 CB D8 31 A8 B3 DA 6F 90 00 00000043 ccid_usb.c:699:ReadUSB() Duplicate frame detected
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Muscle mailing list [email protected] http://lists.musclecard.com/mailman/listinfo/muscle_lists.musclecard.com
