LudovicRousseau / pcsc-tools

Some tools to be used with smart cards and PC/SC
https://pcsc-tools.apdu.fr/
GNU General Public License v2.0
190 stars 62 forks source link

Card is unpowered #9

Closed flroux closed 6 years ago

flroux commented 6 years ago

When I try to use scriptor I have an error "Can't allocate Chipcard::PCSC::Card object: Card is unpowered."

The card is recognized by my reader and it works with nfc-pcsc

pcsc_scan output:

PC/SC device scanner
V 1.5.2 (c) 2001-2017, Ludovic Rousseau <ludovic.rousseau@free.fr>
Using reader plug'n play mechanism
Scanning present readers...
0: OMNIKEY CardMan (076B:5121) 5121 (OKCM0022509131612005524582011459) 00 00
1: OMNIKEY CardMan (076B:5121) 5121 (OKCM0022509131612005524582011459) 00 01

Thu Oct 19 11:27:39 2017
 Reader 0: OMNIKEY CardMan (076B:5121) 5121 (OKCM0022509131612005524582011459) 00 00
  Card state: Card inserted, Unresponsive card,
 Reader 1: OMNIKEY CardMan (076B:5121) 5121 (OKCM0022509131612005524582011459) 00 01
  Card state: Card inserted,
  ATR: 3B 8F 80 01 80 4F 0C A0 00 00 03 06 03 00 01 00 00 00 00 6A

ATR: 3B 8F 80 01 80 4F 0C A0 00 00 03 06 03 00 01 00 00 00 00 6A
+ TS = 3B --> Direct Convention
+ T0 = 8F, Y(1): 1000, K: 15 (historical bytes)
  TD(1) = 80 --> Y(i+1) = 1000, Protocol T = 0
-----
  TD(2) = 01 --> Y(i+1) = 0000, Protocol T = 1
-----
+ Historical bytes: 80 4F 0C A0 00 00 03 06 03 00 01 00 00 00 00
  Category indicator byte: 80 (compact TLV data object)
    Tag: 4, len: F (initial access data)
      Initial access data: 0C A0 00 00 03 06 03 00 01 00 00 00 00
+ TCK = 6A (correct checksum)

Possibly identified card (using /usr/share/pcsc/smartcard_list.txt):
3B 8F 80 01 80 4F 0C A0 00 00 03 06 03 00 01 00 00 00 00 6A
3B 8F 80 01 80 4F 0C A0 00 00 03 06 .. 00 01 00 00 00 00 ..
        Mifare Standard 1K (as per PCSC std part3)
3B 8F 80 01 80 4F 0C A0 00 00 03 06 03 00 01 00 00 00 00 6A
3B 8F 80 01 80 4F 0C A0 00 00 03 06 03 .. .. 00 00 00 00 ..
        RFID - ISO 14443 Type A Part 3 (as per PCSC std part3)
3B 8F 80 01 80 4F 0C A0 00 00 03 06 03 00 01 00 00 00 00 6A
        Philips MIFARE Standard (1 Kbytes EEPROM)
        http://www.nxp.com/#/pip/pip=[pfp=41863]|pp=[t=pfp,i=41863]
        RFID - ISO 14443 Type A - Transport for London Oyster
        ACOS5/1k Mirfare
        RFID - ISO 14443 Type A - NXP Mifare card with 1k EEPROM
        vivotech ViVOcard Contactless Test Card
        Bangkok BTS Sky SmartPass
        Mifare Classic 1K (block 0 re-writeable)
flroux commented 6 years ago

When I try tu use the card with node-pcsclite or nfc-pcsc, I have no error "Card is unpowered" but the card return an error 0x6986 I don't know if the two problem are linked

LudovicRousseau commented 6 years ago

Please provide the complete output of scriptor.

flroux commented 6 years ago

scriptor output:

No reader given: using OMNIKEY CardMan 5x21 (OKCM0021212161306074695909938966) 00 00
Can't allocate Chipcard::PCSC::Card object: Card is unpowered.
LudovicRousseau commented 6 years ago

Your 5121 reader has 2 interfaces. The card is present in reader "OMNIKEY CardMan (076B:5121) 5121 (OKCM0022509131612005524582011459) 00 01" but you are using reader "OMNIKEY CardMan (076B:5121) 5121 (OKCM0022509131612005524582011459) 00 00" in scriptor (first reader found).

Use scriptor -r "OMNIKEY CardMan (076B:5121) 5121 (OKCM0022509131612005524582011459) 00 01"

dcruveiller commented 4 years ago

Hey pcsc_scan says the unresponsive card but i have only one interface how i make it power my card ? Here is the pcsc_scan output:

PC/SC device scanner
V 1.5.2 (c) 2001-2017, Ludovic Rousseau <ludovic.rousseau@free.fr>
Using reader plug'n play mechanism
Scanning present readers...
0: Alcor Micro AU9560 00 00

Sat Feb 22 15:10:52 2020
 Reader 0: Alcor Micro AU9560 00 00
  Card state: Card inserted, Unresponsive card
LudovicRousseau commented 4 years ago

You are using a different reader now. Are you sure your Alcor Micro AU9560 reader can read your RFID card?

dcruveiller commented 4 years ago

my card is SLE4442 and Alcor Micro AU9560 chip is compatible with SLE4442.

dcruveiller commented 4 years ago

@florianleroux hi what is your exact reader name ?