Hi Robert,

because i mainly use T=0 cards, i write my APDU as TPDU ... or may be the 
opposite ?!

if i well understood your suggest you transmit only Lc -1 bytes because the 
last byte is supposed to be the length of expected reply (and so this 
should signify that the transmitted CommandAPDU is structured for T=1);

if it's correct, and because JCWDE simulatyes a T=0 terminal, the 
correction should be (in internalSendAPDU(...)):

         int Lc = data.length - 6;
         if (Lc > 0){
                 byte[] dataField = new byte[Lc];
                 System.arraycopy(data, 5, dataField, 0, Lc);
                 protocolAPDU.setDataIn(dataField);
         }

furthermore, the Le parameter read from the incoming CommandAPDU can be 
compare with the value returned by protocolAPDU.getLe() to (if i still well 
understand) return only a part of the reply if transmitted apdu.Le is less 
than received tpdu.Le.

if you, someone, can confirm that point this will help me to understang how 
the CardTerminal instance is not protocol dependant when exposed through a 
Slot- or CardChannel but of cause take care about used protocol for 
internal process (i'm a little bit puzzled because, with using T=0 card and 
when sending a case-4 command, the terminal seems to never send itself the 
Get Response command (the 
Java_com_ibm_opencard_terminal_pcsc10_OCFPCSC1_SCardTransmit function does 
not do that, does it is performed by the PC/SC library ?)).

btw, i see that all native methods for Win32 provided by IBM use Jni naming 
convention, meaning that the loadLibrary call will fail with MS-SDK < 3.2, 
am i right ?

thank for your second correction, obviously it's better to set all 
available information in CardID instance.

regards,
Sylvain.

At 09:01 09/03/00 +0100, Robert Panzer wrote:
>[...]
>
>In JCRECardTerminal.open(...):
>
>cardID = new CardID(this,0,socketConnect());
>                     ^^^^^^^



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