Hello Smita,

Smita Ayyadevara wrote:
> I used the new PC/SC CardTerminal version that you have sent,
> it does not give SCardTransmit error. But it gives error saying 'Did
> not recognize the APDU command'.
> [...]
> In this case the execution thread do not even reach to the 
> SCardTransmit method call.
> 
> In file Pcsc10CardTerminal.java the values of variables 'lenbuf' (85
> d) and 'le' (128 d), makes the execution thread to skip all if/else
> cases, which decide the caseAPDU, and take to last 'else' which
> executes this statement: throw new CardTerminalException("Did not
> recognize the APDU command");

So in fact here the code in "Pcsc10CardTerminal" sets the 'le'
local variable to apduCommand[4] and then tries to identify in 
which ISO case we are. If it's case 4, this variable does not
indeed contain Le but Lc :-(, the 'le' variable is then redefined
to apduCommand[apduCommand.length - 1]. What does that mean? It means
that you are (or an application) trying to send an APDU to the card
that is a Case 4 but do not seem to fulfill the ISO requirements
(i.e., you should have 4 bytes, then Lc, then data, and at the end,
Le and -the most important- Lc should be the total length of the
buffer (85?)-5-1=79 which does not seem to be the case..).

I'm not a good specialist in T=0 but I believe the code is right..
Could you send us the APDU you are trying to send to the card ?
(in hexa) by using the trace facility (settings in the
opencard.properties file) ? That would help. And if I don't see
I will get back to the T=0 experts I know (thanks Thierry! :-).

In an other mail you wrote:
> If I choose to use Gemplus smart card reader, then along with the
> card reader what all components I need to have?

If you are using any type of serial reader, you can use the pure
java driver and have no more need for PC/SC ;-), you will find the
pure java CardTerminal at:

http://www.gemplus.fr/developers/technologies/opencard/cardterminals/download.html

and if you are using GPK, you will find the relevant CardServices at:

http://www.gemplus.fr/developers/technologies/opencard/cardservices/download.html

Hope it'll help.

Cheers,
Christophe.

 = "Knowledge is the only fountain both of love and the principles =
 =  of human liberty."       -- Daniel Webster, 1843               =
--
-------------------------------------------------------------
[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.

Reply via email to