What about trying this:
Set P3 to 0x00 and you should get something like 6C 80, 80 being the length
of data to receive. Then you can retrieve the card response by using the
same CLS INS ids.
----- Original Message -----
From: "Smita Ayyadevara" <[EMAIL PROTECTED]>
To: "Christophe Muller" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, January 04, 2001 2:55 PM
Subject: RE: [OCF] Signing data using Schlumberger Cyberflex Access Smart
Cards
> Hello,
>
> I tried sending below APDU (InternalAuth) with the command length 128. It
> worked.
> But when I use new PCSC Card terminal driver, and make the lenbuf and le
to
> satisfy case 4 then I get SCardTransmit error 00000057.
>
> The APDU I am sending (which works) is
> 00 88 C8 00 06 48 65 6C 6C 6F 21
>
> Whereas the APDU which gets generated in PCSC Card terminal is
> 00 88 C8 00 80 48 65 6C 6C 6F 21
>
> Comparing above two APDU's, the 5th byte is different, that is for P3,
> length of the block processed.
> With P3 = 0x06 the APDU command (without using PCSC driver) is executed
> successfully, and with p3 = 0x80, the error is generated 'Did not
recognize
> the APDU command'.
>
>
> Thank you,
>
> Smita
>
> -----Original Message-----
> From: Christophe Muller [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 04, 2001 10:26 AM
> To: Smita Ayyadevara
> Cc: [EMAIL PROTECTED]
> Subject: Re: [OCF] Signing data using Schlumberger Cyberflex Access
> Smart Cards
>
>
> Hello,
>
> Smita Ayyadevara wrote:
> > Following is the list of APDU commands sent to the card
> > [...]
> > [DEBUG ] opencard.core.service.CardChannel.sendCommandAPDU
> > --- message opencard.core.terminal.CommandAPDU@b06322b3
> > 0000: 00 88 C8 02 80 48 65 6C 6C 6F 21 00 00 00 00 00 .....Hello!.....
> > 0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
> > 0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
> > 0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
> > 0040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
> > 0050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
>
> As we can see here, the buffer length is equal or less than
> 6*16=96 (you were talking about 85 in a previous mail, it is
> possible that the trace tool is feeding 00). Anyway, it is
> less than 128, what is specified in position 4 or the array,
> so it seems normal that the CardTerminal does not recognize
> the APDU.. What would be the original byte array that is
> sent ? (this way we would be sure of the length) and is it
> intended to be a case 2, case 3, case 4 ? If it's supposed
> to be a case 4, then first the specified length of command
> does not seem right, but also there lacks a number at the
> end of the APDU (Le).
>
> If this seems regular ISO for other people, please explain
> us (I'm not pretending to be a T=0 expert in any way !).
>
> Cheers,
> Christophe.
>
> = Anyone willing and capable to get themselves elected =
> = President by no means should be allowed to do the job =
> = -- Douglas Adams =
> --
> -------------------------------------------------------------
> [EMAIL PROTECTED] - Gemplus Research Lab
> Phone: +33 4-42-36-57-83 | Disclaimer: I don't speak for Gemplus
> Gemplus doesn't speak for me... it is better that way!
> -------------------------------------------------------------
>
>
> ---
> > Visit the OpenCard web site at http://www.opencard.org/ for more
> > information on OpenCard---binaries, source code, documents.
> > This list is being archived at http://www.opencard.org/archive/opencard/
>
> ! To unsubscribe from the [EMAIL PROTECTED] mailing list send an email
> ! to
> ! [EMAIL PROTECTED]
> ! containing the word
> ! unsubscribe
> ! in the body.
>
>
> ---
> > Visit the OpenCard web site at http://www.opencard.org/ for more
> > information on OpenCard---binaries, source code, documents.
> > This list is being archived at http://www.opencard.org/archive/opencard/
>
> ! To unsubscribe from the [EMAIL PROTECTED] mailing list send an email
> ! to
> ! [EMAIL PROTECTED]
> ! containing the word
> ! unsubscribe
> ! in the body.
>
---
> Visit the OpenCard web site at http://www.opencard.org/ for more
> information on OpenCard---binaries, source code, documents.
> This list is being archived at http://www.opencard.org/archive/opencard/
! To unsubscribe from the [EMAIL PROTECTED] mailing list send an email
! to
! [EMAIL PROTECTED]
! containing the word
! unsubscribe
! in the body.