you were right! i was giving one less byte that i should! however that doesnt change the result. Here is the output:
00000007 ifdhandler.c:1065:IFDHSetProtocolParameters() Communication timeout: 250949 ms 00000011 commands.c:2046:SetParameters() length: 5 bytes 00000017 -> 000000 61 05 00 00 00 00 0E 00 00 00 18 00 00 0A 00 00003923 <- 000000 82 05 00 00 00 00 0E 00 00 00 18 00 00 0A 00 00000012 winscard.c:424:SCardConnect() Active Protocol: T=0 00000008 winscard.c:444:SCardConnect() hCard Identity: 15add 00000008 winscard_svc.c:447:ContextThread() CONNECT rv=0x0 for client 10 00000113 winscard_svc.c:309:ContextThread() Received command: TRANSMIT from client 10 00000018 winscard.c:1648:SCardTransmit() Send Protocol: T=0 00000012 APDU: 00 E0 00 00 0A 62 08 82 02 3F FF 83 02 3F 00 00000006 ifdhandler.c:1288:IFDHTransmitToICC() usb:058f/9520:libhal:/org/freedesktop/Hal/devices/usb_device_58f_9520_noserial_if0 (lun: 0) 00000012 commands.c:1543:CmdXfrBlockTPDU_T0() T=0: 15 bytes 00000010 -> 000000 6F 0F 00 00 00 00 0F 00 00 00 00 E0 00 00 0A 62 08 82 02 3F FF 83 02 3F 00 01009628 <- 000000 80 00 00 00 00 00 0F 41 FE 00 00000040 commands.c:1317:CCID_Receive Card absent or mute 00000017 SW: 00000016 ifdwrapper.c:746:IFDTransmit() Card not transacted: 612 00000016 winscard.c:1673:SCardTransmit() Card not transacted: 0x80100016 00000017 winscard_svc.c:640:ContextThread() TRANSMIT rv=0x80100016 for client 10 00000162 winscard_svc.c:309:ContextThread() Received command: TRANSMIT from client 10 00000052 winscard.c:1648:SCardTransmit() Send Protocol: T=0 00000021 APDU: 00 A4 00 00 02 41 05 00000017 ifdhandler.c:1288:IFDHTransmitToICC() usb:058f/9520:libhal:/org/freedesktop/Hal/devices/usb_device_58f_9520_noserial_if0 (lun: 0) 00000017 commands.c:1543:CmdXfrBlockTPDU_T0() T=0: 7 bytes 00000027 -> 000000 6F 07 00 00 00 00 10 00 00 00 00 A4 00 00 02 41 05 00005085 ccid_usb.c:652:ReadUSB() read failed (6/7): -99 Invalid argument 00000019 SW: 00000014 ifdwrapper.c:746:IFDTransmit() Card not transacted: 612 00000015 winscard.c:1673:SCardTransmit() Card not transacted: 0x80100016 00000016 winscard_svc.c:640:ContextThread() TRANSMIT rv=0x80100016 for client 10 00000105 winscard_svc.c:309:ContextThread() Received command: TRANSMIT from client 10 00000041 winscard.c:1648:SCardTransmit() Send Protocol: T=0 00000020 APDU: 00 E4 00 00 00 41 05 00000015 ifdhandler.c:1288:IFDHTransmitToICC() usb:058f/9520:libhal:/org/freedesktop/Hal/devices/usb_device_58f_9520_noserial_if0 (lun: 0) 00000017 commands.c:1543:CmdXfrBlockTPDU_T0() T=0: 7 bytes 00000025 -> 000000 6F 07 00 00 00 00 11 00 00 00 00 E4 00 00 00 41 05 00003926 ccid_usb.c:652:ReadUSB() read failed (6/7): -99 Invalid argument 00000022 SW: 00000015 ifdwrapper.c:746:IFDTransmit() Card not transacted: 612 00000015 winscard.c:1673:SCardTransmit() Card not transacted: 0x80100016 00000015 winscard_svc.c:640:ContextThread() TRANSMIT rv=0x80100016 for client 10 00000103 winscard_svc.c:309:ContextThread() Received command: TRANSMIT from client 10 00000037 winscard.c:1648:SCardTransmit() Send Protocol: T=0 00000018 APDU: 00 A4 00 00 00 00000016 ifdhandler.c:1288:IFDHTransmitToICC() usb:058f/9520:libhal:/org/freedesktop/Hal/devices/usb_device_58f_9520_noserial_if0 (lun: 0) 00000016 commands.c:1543:CmdXfrBlockTPDU_T0() T=0: 5 bytes 00000024 -> 000000 6F 05 00 00 00 00 12 00 00 00 00 A4 00 00 00 00003752 ccid_usb.c:652:ReadUSB() read failed (6/7): -99 Invalid argument 00000021 SW: 00000014 ifdwrapper.c:746:IFDTransmit() Card not transacted: 612 00000015 winscard.c:1673:SCardTransmit() Card not transacted: 0x80100016 00000016 winscard_svc.c:640:ContextThread() TRANSMIT rv=0x80100016 for client 10 00000113 winscard_svc.c:309:ContextThread() Received command: TRANSMIT from client 10 00000035 winscard.c:1648:SCardTransmit() Send Protocol: T=0 00000035 APDU: 00 E0 00 00 1C 62 1A 80 02 00 30 82 01 01 83 02 41 05 88 01 00 8A 01 01 8C 07 00 00 00 00 00 00 00 00000018 ifdhandler.c:1288:IFDHTransmitToICC() usb:058f/9520:libhal:/org/freedesktop/Hal/devices/usb_device_58f_9520_noserial_if0 (lun: 0) 00000016 commands.c:1543:CmdXfrBlockTPDU_T0() T=0: 33 bytes 00000040 -> 000000 6F 21 00 00 00 00 13 00 00 00 00 E0 00 00 1C 62 1A 80 02 00 30 82 01 01 83 02 41 05 88 01 00 8A 01 01 8C 07 00 00 00 00 00 00 00 00004467 ccid_usb.c:652:ReadUSB() read failed (6/7): -99 Invalid argument 00000021 SW: 00000014 ifdwrapper.c:746:IFDTransmit() Card not transacted: 612 00000015 winscard.c:1673:SCardTransmit() Card not transacted: 0x80100016 00000016 winscard_svc.c:640:ContextThread() TRANSMIT rv=0x80100016 for client 10 00000096 winscard_svc.c:309:ContextThread() Received command: TRANSMIT from client 10 00000049 winscard.c:1648:SCardTransmit() Send Protocol: T=0 00000019 APDU: 00 B0 00 00 10 00000016 ifdhandler.c:1288:IFDHTransmitToICC() usb:058f/9520:libhal:/org/freedesktop/Hal/devices/usb_device_58f_9520_noserial_if0 (lun: 0) 00000016 commands.c:1543:CmdXfrBlockTPDU_T0() T=0: 5 bytes 00000024 -> 000000 6F 05 00 00 00 00 14 00 00 00 00 B0 00 00 10 00003839 ccid_usb.c:652:ReadUSB() read failed (6/7): -99 Invalid argument 00000023 SW: 00000014 ifdwrapper.c:746:IFDTransmit() Card not transacted: 612 00000016 winscard.c:1673:SCardTransmit() Card not transacted: 0x80100016 00000016 winscard_svc.c:640:ContextThread() TRANSMIT rv=0x80100016 for client 10 00003032 winscard_svc.c:301:ContextThread() Client die: 10 00000039 winscard.c:229:SCardReleaseContext() Releasing Context: 0x10394AD 00000020 winscard.c:850:SCardDisconnect() Active Contexts: 1 00000019 winscard_svc.c:952:MSGCleanupClient() Thread is stopping: dwClientID=10, threadContext @89E1870 thanks for the help again > From: [email protected] > Date: Mon, 30 Aug 2010 09:32:44 +0200 > Subject: Re: FW: [Muscle] AU9520 usb reader not working with SCardTransmit > (using ACOS5 card) > To: [email protected] > > 2010/8/29 Marcel Mancini <[email protected]>: > > 00000036 APDU: 00 E0 00 00 1C 62 1A 80 02 00 30 82 01 01 83 02 41 05 88 01 > > 00 8A 01 01 8C 07 00 00 00 00 00 00 > > You indicates a number of 0x1C bytes of data but only give 0x1B bytes. > It looks like the APDU is badly formatted. > > > 00000018 ifdhandler.c:1288:IFDHTransmitToICC() > > usb:058f/9520:libhal:/org/freedesktop/Hal/devices/usb_device_58f_9520_noserial_if0 > > (lun: 0) > > 00000017 commands.c:1543:CmdXfrBlockTPDU_T0() T=0: 32 bytes > > 00000041 -> 000000 6F 20 00 00 00 00 0B 00 00 00 00 E0 00 00 1C 62 1A 80 02 > > 00 30 82 01 01 83 02 41 05 88 01 00 8A 01 01 8C 07 00 00 00 00 00 00 > > 00003638 ccid_usb.c:652:ReadUSB() read failed (6/3): -99 Invalid argument > > 00000021 SW: > > And the reader do not like badly formatted APDU. > > I would say the bug is in your program. > > Bye > > -- > Dr. Ludovic Rousseau > > _______________________________________________ > Muscle mailing list > [email protected] > http://lists.drizzle.com/mailman/listinfo/muscle
_______________________________________________ Muscle mailing list [email protected] http://lists.drizzle.com/mailman/listinfo/muscle
