You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
insert a card (SIM card if possible) within 10s
connecting to ACS ACR122U PICC Interface 00 00
> A0 A4 00 00 02 7F 10
Traceback (most recent call last):
File "ct4.py", line 56, in <module>
response, sw1, sw2 = cardservice.connection.transmit(apdu)
File "/usr/local/lib/python2.7/dist-packages/pyscard-1.9.2-py2.7-linux-x86_64.egg/smartcard/CardConnectionDecorator.py", line 82, in transmit
return self.component.transmit(bytes, protocol)
File "/usr/local/lib/python2.7/dist-packages/pyscard-1.9.2-py2.7-linux-x86_64.egg/smartcard/CardConnection.py", line 146, in transmit
data, sw1, sw2 = self.doTransmit(bytes, protocol)
File "/usr/local/lib/python2.7/dist-packages/pyscard-1.9.2-py2.7-linux-x86_64.egg/smartcard/pcsc/PCSCCardConnection.py", line 207, in doTransmit
sw1 = (response[-2] + 256) % 256
IndexError: list index out of range
disconnecting from ACS ACR122U PICC Interface 00 00
disconnecting from ACS ACR122U PICC Interface 00 00
when i get down to it with pudb, response is just [] in there, so of course it's out of range. First tried with python-pysdcard from ubuntu repository, then i built/installed from source (this repository). I'm having a look into scard.i, and SCardTransmit, but i have no experience with swig, so i'm not positive i'll find the cause on my own, so any idea welcome :). If i start gscriptor and run a script like FFCA000000, i do get an answer, so i guess pcscd is working correctly.
Sending: A0 A4 00 00 02 7F 10
Received:
wrong SW size for:
Script was executed without error...
not much apparently…
Thanks for fast answer :)
edit: this made me understand (quite new to rfid, sorry) that what i want mainly, getting tag ID was simpler than i though, i was sending SELECT + FFCA000000 for that, when i only needed the latter part, and in this case, answer is immediate, so for now i'm settled, but if think there is a real bug to solve in pyscard for the DF_TELECOM (if it should work with any tag/reader), i can help debugging this further, it might be useful in the future.
I've read a bit more about DF_TELECOM, which i was only trying because it was the example, it seems only about SIM cards, maybe it's normal that i don't get an answer for it with my simple rfid/nfc tags?
The reader firmware is bogus.
It returns 80 00 00 00 00 00 0F 00 FE 00
bStatus = 0x00 indicating No Error
bError = 0xFE indicating ICC_MUTE, CCID timed out while talking to the ICC
The reader should report an error in bStatus so that the driver knows something failed and returned an error so that the upper layers, in this case pyscard, do not try to parse the empty result.
Sure, here it is, thanks for looking into it and explaining, i've been told this reader was quite common, so though it would have good support, but maybe it's limited by a bad firmware, support is good enough for what i want for now anyway :), i guess i should have started with the support list.
gabriel@desk-dev-1:/t/ccid-1.4.22> sudo ./src/parse
Parsing USB bus/device: 8087:8000 (bus 2, device 2)
idVendor: 0x8087 Can't get iManufacturer string
idProduct: 0x8000 Can't get iProduct string
NOT a CCID/ICCD device
Parsing USB bus/device: 1D6B:0002 (bus 2, device 1)
idVendor: 0x1D6B iManufacturer: Linux 3.13.0-32-generic ehci_hcd
idProduct: 0x0002 iProduct: EHCI Host Controller
NOT a CCID/ICCD device
Parsing USB bus/device: 8087:8008 (bus 1, device 2)
idVendor: 0x8087 Can't get iManufacturer string
idProduct: 0x8008 Can't get iProduct string
NOT a CCID/ICCD device
Parsing USB bus/device: 1D6B:0002 (bus 1, device 1)
idVendor: 0x1D6B iManufacturer: Linux 3.13.0-32-generic ehci_hcd
idProduct: 0x0002 iProduct: EHCI Host Controller
NOT a CCID/ICCD device
Parsing USB bus/device: 1D6B:0003 (bus 4, device 1)
idVendor: 0x1D6B iManufacturer: Linux 3.13.0-32-generic xhci_hcd
idProduct: 0x0003 iProduct: xHCI Host Controller
NOT a CCID/ICCD device
Parsing USB bus/device: 072F:2200 (bus 3, device 17)
idVendor: 0x072F iManufacturer: ACS
idProduct: 0x2200 iProduct: ACR122U PICC Interface
Found a CCID/ICCD device at interface 0
idVendor: 0x072F
iManufacturer: ACS
idProduct: 0x2200
iProduct: ACR122U PICC Interface
bcdDevice: 2.14 (firmware release?)
bLength: 9
bDescriptorType: 4
bInterfaceNumber: 0
bAlternateSetting: 0
bNumEndpoints: 3
bulk-IN, bulk-OUT and Interrupt-IN
bInterfaceClass: 0x0B [Chip Card Interface Device Class (CCID)]
bInterfaceSubClass: 0
bInterfaceProtocol: 0
bulk transfer, optional interrupt-IN (CCID)
Can't get iInterface string
CCID Class Descriptor
bLength: 0x36
bDescriptorType: 0x21
bcdCCID: 1.00
bMaxSlotIndex: 0x00
bVoltageSupport: 0x07
5.0V
3.0V
1.8V
dwProtocols: 0x0000 0x0002
T=1
dwDefaultClock: 4.000 MHz
dwMaximumClock: 4.000 MHz
bNumClockSupported: 0 (will use whatever is returned)
Support 116448256 kHz
Support -30720 kHz
Support 29498092 kHz
Support 1048682 kHz
Support 394379 kHz
Support 29897911 kHz
Support 29897910 kHz
Support 580 kHz
Support 1024 kHz
Support 1 kHz
Support 465547 kHz
Support 512 kHz
Support 29897911 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 1048682 kHz
Support 727691 kHz
Support 1 kHz
Support 29897911 kHz
Support -235801870 kHz
Support -3856 kHz
Support 0 kHz
Support 1048682 kHz
Support 0 kHz
Support 1048682 kHz
Support 0 kHz
Support 1048682 kHz
Support 465547 kHz
Support 1048577 kHz
Support 29897911 kHz
Support 404232216 kHz
Support -59368 kHz
Support 0 kHz
Support 1048682 kHz
Support 661387 kHz
Support -59389 kHz
Support 29895532 kHz
Support 29897911 kHz
Support 0 kHz
Support 29361135 kHz
Support 655361 kHz
Support 4 kHz
Support 655361 kHz
Support -1249324344 kHz
Support 989323 kHz
Support 458755 kHz
Support 29883818 kHz
Support 29897911 kHz
Support 0 kHz
Support 29361135 kHz
Support 655391 kHz
Support 11 kHz
Support 655391 kHz
Support 38732360 kHz
Support 12845256 kHz
Support 38731907 kHz
Support 7798977 kHz
Support 13107396 kHz
Support 140 kHz
Support 465547 kHz
Support 131585 kHz
Support 29897911 kHz
Support -1044281722 kHz
Support -17991 kHz
Support 720927 kHz
Support 65602 kHz
Support 465547 kHz
Support 29360129 kHz
Support 29897911 kHz
Support -656877352 kHz
Support -10024 kHz
Support 65633 kHz
Support 786438 kHz
Support 458814 kHz
Support 29897910 kHz
Support 29498092 kHz
Support 29360174 kHz
Support 0 kHz
Support 66846930 kHz
Support 1048682 kHz
Support 133003 kHz
Support 29897911 kHz
Support 144438 kHz
Support 29897910 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 1 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
Support 0 kHz
dwDataRate: 10752 bps
dwMaxDataRate: 250000 bps
bNumDataRatesSupported: 0 (will use whatever is returned)
Support 116448256 bps
Support -30720 bps
Support 29498092 bps
Support 1048682 bps
Support 394379 bps
Support 29897911 bps
Support 29897910 bps
Support 580 bps
Support 1024 bps
Support 1 bps
Support 465547 bps
Support 512 bps
Support 29897911 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 1048682 bps
Support 727691 bps
Support 1 bps
Support 29897911 bps
Support -235801870 bps
Support -3856 bps
Support 0 bps
Support 1048682 bps
Support 0 bps
Support 1048682 bps
Support 0 bps
Support 1048682 bps
Support 465547 bps
Support 1048577 bps
Support 29897911 bps
Support 404232216 bps
Support -59368 bps
Support 0 bps
Support 1048682 bps
Support 661387 bps
Support -59389 bps
Support 29895532 bps
Support 29897911 bps
Support 0 bps
Support 29361135 bps
Support 655361 bps
Support 4 bps
Support 655361 bps
Support -1249324344 bps
Support 989323 bps
Support 458755 bps
Support 29883818 bps
Support 29897911 bps
Support 0 bps
Support 29361135 bps
Support 655391 bps
Support 11 bps
Support 655391 bps
Support 38732360 bps
Support 12845256 bps
Support 38731907 bps
Support 7798977 bps
Support 13107396 bps
Support 140 bps
Support 465547 bps
Support 131585 bps
Support 29897911 bps
Support -1044281722 bps
Support -17991 bps
Support 720927 bps
Support 65602 bps
Support 465547 bps
Support 29360129 bps
Support 29897911 bps
Support -656877352 bps
Support -10024 bps
Support 65633 bps
Support 786438 bps
Support 458814 bps
Support 29897910 bps
Support 29498092 bps
Support 29360174 bps
Support 0 bps
Support 66846930 bps
Support 1048682 bps
Support 133003 bps
Support 29897911 bps
Support 144438 bps
Support 29897910 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 1 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
Support 0 bps
dwMaxIFSD: 256
dwSynchProtocols: 0x00000000
dwMechanical: 0x00000000
No special characteristics
dwFeatures: 0x00020040
....40 Automatic parameters negotiation made by the CCID
02.... Short APDU level exchange
dwMaxCCIDMessageLength: 271 bytes
bClassGetResponse: 0x00
bClassEnvelope: 0x00
wLcdLayout: 0x0000
bPINSupport: 0x00
bMaxCCIDBusySlots: 1
Parsing USB bus/device: 046D:C03E (bus 3, device 4)
idVendor: 0x046D iManufacturer: Logitech
idProduct: 0xC03E iProduct: USB-PS/2 Optical Mouse
NOT a CCID/ICCD device
Parsing USB bus/device: 1E54:2030 (bus 3, device 7)
idVendor: 0x1E54 iManufacturer: TypeMatrix.com
idProduct: 0x2030 iProduct: USB Keyboard
NOT a CCID/ICCD device
Parsing USB bus/device: 0A12:0001 (bus 3, device 11)
idVendor: 0x0A12 Can't get iManufacturer string
idProduct: 0x0001 Can't get iProduct string
NOT a CCID/ICCD device
Parsing USB bus/device: 1D6B:0002 (bus 3, device 1)
idVendor: 0x1D6B iManufacturer: Linux 3.13.0-32-generic xhci_hcd
idProduct: 0x0002 iProduct: xHCI Host Controller
NOT a CCID/ICCD device
Activity
tshirtman commentedon Feb 22, 2016
result of pcsc_scan in case it helps
LudovicRousseau commentedon Feb 23, 2016
What happens with gscriptor if you send the APDU "A0 A4 00 00 02 7F 10"?
tshirtman commentedon Feb 23, 2016
not much apparently…
Thanks for fast answer :)
edit: this made me understand (quite new to rfid, sorry) that what i want mainly, getting tag ID was simpler than i though, i was sending SELECT + FFCA000000 for that, when i only needed the latter part, and in this case, answer is immediate, so for now i'm settled, but if think there is a real bug to solve in pyscard for the DF_TELECOM (if it should work with any tag/reader), i can help debugging this further, it might be useful in the future.
LudovicRousseau commentedon Feb 23, 2016
Can you generate pcscd logs as described in https://pcsclite.alioth.debian.org/ccid.html#support and send the problematic APDU A0 A4 00 00 02 7F 10 using gscriptor ?
tshirtman commentedon Feb 23, 2016
tshirtman commentedon Feb 23, 2016
I've read a bit more about
DF_TELECOM, which i was only trying because it was the example, it seems only about SIM cards, maybe it's normal that i don't get an answer for it with my simple rfid/nfc tags?LudovicRousseau commentedon Feb 23, 2016
Please attach a complete pcscd log.
tshirtman commentedon Feb 23, 2016
Sorry, i though keeping only the communication part would be more useful
LudovicRousseau commentedon Feb 23, 2016
The reader firmware is bogus.
It returns
80 00 00 00 00 00 0F 00 FE 00bStatus = 0x00 indicating No Error
bError = 0xFE indicating ICC_MUTE, CCID timed out while talking to the ICC
The reader should report an error in bStatus so that the driver knows something failed and returned an error so that the upper layers, in this case pyscard, do not try to parse the empty result.
LudovicRousseau commentedon Feb 23, 2016
Can you follow https://pcsclite.alioth.debian.org/ccid.html#CCID_compliant please?
Your reader is already in the "unsupported" list but I want to know what firmware version you are using
https://pcsclite.alioth.debian.org/ccid/unsupported.html#0x072F0x2200
tshirtman commentedon Feb 23, 2016
Sure, here it is, thanks for looking into it and explaining, i've been told this reader was quite common, so though it would have good support, but maybe it's limited by a bad firmware, support is good enough for what i want for now anyway :), i guess i should have started with the support list.
LudovicRousseau commentedon Feb 23, 2016
You are using a "recent" firmware
bcdDevice: 2.14.I added a note to https://pcsclite.alioth.debian.org/ccid/unsupported.html#0x072F0x2200
It is not a bug in pyscard.
Thanks for your help.