Hello,

Max Kliche <[EMAIL PROTECTED]> schrieb am 12.11.02 11:00:48:
> Hallo
> 
> I got an BasicCard Enhanced ZC3.9 which supports the T=1 Protocol.
> 
> I Installed the Calculater example Programm on the card, which give
> me the command 0x20 0x01 (stands for calculator).

CLA = 0x20 and INS = 0x01
right?

> 
> Is this the right way to send an T=1 command to the card with OCF:
> 
>                   System.out.println("Funktion");                    
>                     byte Command[];
>                     Command=new byte[10];
>                     Command[0]=(byte)0x00;
>                     Command[1]=(byte)0x00;
>                     Command[2]=(byte)0x06;
>                     Command[3]=(byte)0x20; // calculator
>                     Command[4]=(byte)0x01;
>                     Command[5]=(byte)0x00;
>                     Command[6]=(byte)'9';
>                     Command[7]=(byte)'+';      
>                     Command[8]=(byte)'5';
>                     Command[9]=(byte)0xA2;

According to ISO 7816-4 the structure of a T=1 command APDU is:
CLA  INS  P1  P2  [Lc]  [Data]  [Le]
(optional Lc, Data, and Le fields)
So why are you sending the first two 0x00 bytes and the 0x06 byte to the card? And if 
you send some data, you must specify the data length in the Lc field.

>                     
>                     CommandAPDU apdu=new CommandAPDU(Command);
>                     
>                     ResponseAPDU rapdu = sch.sendAPDU(apdu); 
>                     System.out.println("Ergebnis2:");
>                     System.out.println(rapdu.toString()); 
>                     System.out.println(rapdu.sw1());
>                     System.out.println(rapdu.sw2());
>                     System.out.println(rapdu.sw());
>                     System.out.println(rapdu.data());
>                     System.out.println("finish");
> 
> 
> The ATR of the Card is:
> Info for slot ID: 0
> card present: yes
> ATR: 3B EF 00 FF 81 31 20 75 42 61 73 69 63 43 61 72 64 20 5A 43 33 2E 39 86
> 
> If I send the command above to the card I got:
> Funktion
> Ergebnis2:
> opencard.core.terminal.ResponseAPDU@f9f9d8
> 0000:  6E 00                                            n.              
> 
> 110
> 0
> 28160
> null
> 
> 
> The Result 6E 00 stands for Class not supported.
> 
> I don't know, what im doing wrong.
> 
> best regards
> 
> Max Kliche
> 

 -- Katharina
________________________________________________________________
Viren? Wir wissen nicht was Ihr Arzt empfiehlt. Wir empfehlen den
Virencheck f�r Dateianh�nge! http://freemail.web.de/features/?mc=021159



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