Some terminals/Smart Card cannot accept data length = 256 bytes.
Please try to reduce your data length to test the max. data length of your
card reader and card.

Lawrence

----- Original Message -----
From: "Emmanuel Lagare" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, February 07, 2001 5:51 PM
Subject: [OCF] PC/SC Error 57


> Hi! Got a question. I'm having a problem when I try to write an APDU. I
get
> this exception:
> opencard.core.terminal.CardTerminalException: Pcsc10CardTerminal: PCSC
> Exception  in method SCardTransmit: error occurred with SCardTransmit
> return code = 00000057
>
>         at
> com.ibm.opencard.terminal.pcsc10.Pcsc10CardTerminal.translatePcscExce
> ption(Pcsc10CardTerminal.java:502)
>         at
> com.ibm.opencard.terminal.pcsc10.Pcsc10CardTerminal.internalSendAPDU(
> Pcsc10CardTerminal.java:439)
>         at
> opencard.core.terminal.CardTerminal.sendAPDU(CardTerminal.java:494)
>         at
opencard.core.terminal.SlotChannel.sendAPDU(SlotChannel.java:115)
>         at opencard.core.service.CardChannel.sendCommandAPDU
> CardChannel.java:222)
>         at
>
opencard.opt.util.PassThruCardService.sendCommandAPDU(PassThruCardService.ja
> va:153)
>         at APDU.main(APDU.java:40)
>
> I read through the archive and saw a similar problem which was solved by
> "proper formatting of the APDU". What does this mean?
>
> I setup my APDU this way:
>    CommandAPDU cmd = new CommandAPDU(32);
>    cmd.setLength(0);
>     cmd.append((byte) 0x00);
>    cmd.append((byte) 0x48);
>    cmd.append((byte) 0x00);
>    cmd.append((byte) 0x00);
>    cmd.append((byte) 0x00);
>    cmd.append((byte) 0x00);
>    cmd.append((byte) 0x01);
>    cmd.append((byte) 0x00);
>    cmd.append((byte) 0x40);
>    cmd.append((byte) 0xe2);
>     cmd.append((byte) 0x00);
>    cmd.append((byte) 0x00);
>    cmd.append((byte) 0x00);
>    cmd.append((byte) 0x00);
>
> Am I doing something wrong in the setup of the APDU?]
>
> Thanks!
>
>
>
> ---
> > 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.

Reply via email to