Guy,

The PC/SC CardTerminal doesn't manage automatically ISO 7816-4 Case 4 APDU commands 
(APDU commands with input and
output data) whereas the Gemplus CardTerminal does manage automatic the sending of the 
GetResponse APDU command.

That's why your application is running with Gemplus CardTerminal and not with PC/SC 
CardTerminal.

To fix the problem, you need to send your APDU command with input data and send 
manually a GetResponse APDU
command afterwards.

Hope this helps.

Patrick.

Guy Tsobgni wrote:

> Hello all,
>
> I try a sample <<GetSmartCard.java>> provided with OCF1.2.
>
> With the Comm Api all things are OK.
>
> With PC/SC the sample work with IBM smart card going with a book <<Smart
> Card Application Development Using Jave>> and
> not work with Gemplus GPK8000.
>
> My opencard.properties is:
> OpenCard.services =
> com.gemplus.opencard.service.gpk.factory.GPKCardServiceFactory
> OpenCard.terminals =
> com.ibm.opencard.terminal.pcsc10.Pcsc10CardTerminalFactory
> OpenCard.trace = opencard:6 com.gemplus:6
>
> I have the following error messages:
> Starting demo...
> ------------------------------------------------------------
> start use case: get a SmartCard object
>
> card removed
> card inserted
> opencard.core.terminal.CardTerminalException: Pcsc10CardTerminal: PCSC
> Exception in method SCardTransmit: error occurred
>  with SCardTransmit
> return code = 00000057
>
>         at
> 
>com.ibm.opencard.terminal.pcsc10.Pcsc10CardTerminal.translatePcscException(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
> 
>com.gemplus.opencard.service.gpk.factory.GPKCardServiceFactory.setupSmartCard(GPKCardServiceFactory.java:165)
>
>         at
> 
>opencard.core.service.CardServiceRegistry.allocateCardServiceScheduler(CardServiceRegistry.java,
> Compiled Code)
>         at
> opencard.core.service.CardServiceRegistry.getSmartCard(CardServiceRegistry.java:322)
>
>         at
> opencard.core.service.SmartCard.getSmartCard(SmartCard.java:388)
>         at
> opencard.core.service.SmartCard.getSmartCard(SmartCard.java:357)
>         at
> demos.samples.GetSmartCard.cardInserted(GetSmartCard.java:128)
>         at
> opencard.core.event.EventGenerator.updateCards(EventGenerator.java,
> Compiled Code)
>         at
> 
>opencard.core.terminal.CardTerminalRegistry.cardInserted(CardTerminalRegistry.java:281)
>
>         at
> opencard.core.terminal.CardTerminal.cardInserted(CardTerminal.java:577)
>         at
> com.ibm.opencard.terminal.pcsc10.Pcsc10CardTerminal.poll(Pcsc10CardTerminal.java:479)
>
>         at opencard.core.event.EventGenerator.run(EventGenerator.java,
> Compiled Code)
>         at java.lang.Thread.run(Unknown Source)
>  card not null
>
> finished use case: get a SmartCard object
> ------------------------------------------------------------
> ending demo...
>
> Anyone have any ideas?
>
> Thanks,
>
> Blaise
>
> ---
> > 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.

--
Patrick Biget
Bantry Technologies
Embassy House, Ballsbridge
Dublin 4, Ireland
Tel: +353  1 663 2030 ext 202
Fax: +353  1 663 2050
Mob: +353 86 859 7692
Web: www.bantry-technologies.com




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