LudovicRousseau / PCSC

pcsc-lite: PC/SC implementation
https://pcsclite.apdu.fr/
Other
254 stars 107 forks source link

Alcor AU9540: Invalid ATR first byte #210

Closed Derkades closed 1 week ago

Derkades commented 1 week ago

Versions

pcsc-lite version 2.0.3.
Copyright (C) 1999-2002 by David Corcoran <corcoran@musclecard.com>.
Copyright (C) 2001-2022 by Ludovic Rousseau <ludovic.rousseau@free.fr>.
Copyright (C) 2003-2004 by Damien Sauveron <sauveron@labri.fr>.
Report bugs to <pcsclite-muscle@lists.infradead.org>.
Enabled features: Linux x86_64-redhat-linux-gnu libsystemd serial usb libudev polkit usbdropdir=/usr/lib64/pcsc/drivers ipcdir=/run/pcscd filter configdir=/etc/reader.conf.d
MAX_READERNAME: 128, PCSCLITE_MAX_READERS_CONTEXTS: 16

Platform

Using Fedora 40, PCSC installed using distribution packages

Smart card is a Ziggo Pay TV card, but I don't know how to find out which one exactly. Probably one of these already in smartcard_list.txt:

$ grep -C 1 Ziggo smartcard_list.txt
3B 8F 81 11 FC 49 52 44 45 54 4F 20 41 43 53 20 56 35 2E 33 CD
        Ziggo Irdeto (Pay TV)

--
3B 9E 95 80 1F C7 80 31 E0 73 FE 21 1B 66 D0 02 17 F6 11 00 F1
        Ziggo SmartCard Television Subscription (Pay TV)

--
3F FF 95 00 FF 91 81 71 FE 47 00 44 4E 41 53 50 31 41 30 20 4D 65 72 53 32 33 6D
        Ziggo (Pay TV)

Issue

I am trying to read a card using the AU9540 card reader. The card fails to power up. I read that this card reader is unsupported and has several issues, but this issue seems unrelated.

02698901 [140065130940096] ccid_usb.c:1618:InterruptRead() after (0) (0)
00000058 [140065130940096] NotifySlotChange: 50 03 
00000010 [140065130940096] ifdhandler.c:1941:IFDHICCPresence() usb:058f/9540:libudev:0:/dev/bus/usb/001/019 (lun: 0)
00000009 [140065130940096] -> 000000 65 00 00 00 00 00 05 00 00 00 
00010297 [140065130940096] <- 000000 81 00 00 00 00 00 05 01 00 01 
00000017 [140065130940096] ifdhandler.c:2067:IFDHICCPresence() Card present
00000008 [140065130940096] ifdhandler.c:1941:IFDHICCPresence() usb:058f/9540:libudev:0:/dev/bus/usb/001/019 (lun: 0)
00000010 [140065130940096] -> 000000 65 00 00 00 00 00 06 00 00 00 
00000741 [140065130940096] <- 000000 81 00 00 00 00 00 06 01 00 01 
00000011 [140065130940096] ifdhandler.c:2067:IFDHICCPresence() Card present
00000007 [140065130940096] ifdhandler.c:1232:IFDHPowerICC() action: PowerUp, usb:058f/9540:libudev:0:/dev/bus/usb/001/019 (lun: 0)
00000011 [140065130940096] -> 000000 62 00 00 00 00 00 07 00 00 00 
00282251 [140065130940096] <- 000000 80 00 00 00 00 00 07 41 F8 00 
00000020 [140065130940096] commands.c:249:CmdPowerOn Invalid ATR first byte
00000007 [140065130940096] ifdhandler.c:1303:IFDHPowerICC() PowerUp failed
00000009 [140065130940096] eventhandler.c:412:EHStatusHandlerThread() powerState: POWER_STATE_UNPOWERED
00000007 [140065130940096] eventhandler.c:423:EHStatusHandlerThread() Card inserted into Alcor Micro AU9540 00 00
00000006 [140065130940096] eventhandler.c:439:EHStatusHandlerThread() Error powering up card.

As this card reader is unsupported, I don't expect your help but I am trying anyway just in case it is an issue that is easy to solve.

Log

log.txt

LudovicRousseau commented 1 week ago

The error 0xF8 comes from the reader: Invalid ATR first byte My driver can't do anything.

I am not really surprised. PayTV cards are often non-standard so you can't use them in normal readers. You can try to use a different reader model.

Derkades commented 1 week ago

Ok, thank you for the response. I will try to find models of card readers people have successfully used with this card