>> Ludovic Rousseau <[email protected]> wrote: > 2012/8/2 Marcin Cieslak <[email protected]>: >> Hello, > > Hello, > >> I tried to use SIM explorer >> (http://ludovic.rousseau.free.fr/softwares/SIM-3.0.tar.gz) >> to dump the addressbook of a brand new German T-Mobile SIM card. >> I have a working setup of OpenCT/pcscd/OpenSC and even OCF bridge. >> >> It looks like pcsc-perl 1.4.12 has some trouble getting response to this >> command: >> >> (from SIM.pl -D output) >> => A0 C0 00 00 0F >> <= 00 00 1A F4 6F 3A 04 00 11 00 22 01 >> SW: 22 01 (Error not defined by ISO 7816) >> Get Response: ERROR: expected 90 00 and got 22 01 >> >> pcscd -adf log says: >> >> 00000014 winscard_svc.c:604:ContextThread() TRANSMIT rv=0x0 for client 6 >> 00000206 winscard_svc.c:315:ContextThread() Received command: TRANSMIT from >> client 6 >> 00000018 winscard.c:1539:SCardTransmit() Send Protocol: T=0 >> 00000006 APDU: A0 C0 00 00 0F >> 00099850 SW: 00 00 1A F4 6F 3A 04 00 11 00 22 01 > > The response from the reader and/or driver is bogus here I would say.
Yes, it looks truncated... I just tried to use pyscard instead of pssc-perl and I get the same (truncated answer). Also when requesting file contents it truncates... >> 00000007 APDU: A0 C0 00 00 0F >> 00201138 SW: 00 00 1A F4 6F 3A 04 00 11 00 22 01 02 01 1E 90 00 >> ^^^^^^ > Try with another reader NOT using OpenCT, a USB CCID reader for example [1]. Well, I don't have any ... This one is CCID but not USB and I have one more non-CCID USB reader (Omnikey 2030) which I never got working under something else as Windows. What wonders me - why opensc-explorer going the same route VIA pcscd gets it right (i.e. full-length response)? I have made two more attempts: - starting pcscd, starting "opensc-explorer -m '' -c default" and issuing apdu commands by hand: http://saper.info/files/debug/pcsc/opensc-explorer.txt - starting pcscd, running "scriptor getaddrbook" with A0 A4 00 00 02 7F 10 A0 A4 00 00 02 6F 3A A0 C0 00 00 0F A0 B2 03 04 1E http://saper.info/files/debug/pcsc/pcsc-perl.txt After removing timestamps, I get interesting diff between those logs http://saper.info/files/debug/pcsc/diff.txt -Lines in opensc-explorer +Lines in scriptor only >From the differences - adding 00 C0 00 00 00 command and BeginTransaction does not seem to help... Is it winscard_svc.c:648:ContextThread() CONTROL rv=0x80100004 for client 6 or something else? //Marcin _______________________________________________ Muscle mailing list [email protected] http://lists.drizzle.com/mailman/listinfo/muscle
