Hi,

We have developed an applet for a javacard. It runs fine with the Sm@rt
Cafe Simulator from Giesecke & Devrient.
 
But when I try to use it with OCF 1.2 and an PCSC card terminal I have
problems.

The applet supports several functions (decoded with CLA & INS byte)
After selecting the applet, I can send case 1 and case 3 command APDUs
(no response data is expected) to the applet and then receive the SW1
and SW2 bytes (90 00). But when I try to send an case 2 APDU that is
demanding for additional data, I get an PCSC Exception after a few
seconds (looks like a timeout):

...
CardTerminalException:
Pcsc10CardTerminal: PCSC Exception in method SCardTransmit: error
occurred with
SCardTransmit
return code = 0000045d
...

(I also got the return code 00000057 with an ORGA PCSC Reader and
00000079 with a G&D-PCSC Reader. But I couldn't find these codes in
scarderr.h or anywhere else)

Here 's my code:
...
 // This one works fine
       final byte[] WRITE_EF=
           { (byte)0xB0, (byte)0x40, (byte)0x20, (byte)0x00,
             (byte)0x08, (byte)1, (byte)2, (byte)3, 
             (byte)4, (byte)5, (byte)6, (byte)7, (byte)8};

        sendAPDU.setLength(0);
        sendAPDU.append (WRITE_EF);
        response = cardService.sendCommandAPDU (sendAPDU);
        System.out.println(response);

 // This one DOES NOT WORK  ;-(
        final byte[] GET_CardType =
           {(byte)0xB0, (byte)0x10, (byte)0x00,(byte)0x00, (byte)0x01};

        sendAPDU.setLength(0);
        sendAPDU.append (GET_CardType);
        response = cardService.sendCommandAPDU (sendAPDU);
        System.out.println(response);



Thanks for any hints.

.. Helmut


---
> 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