Hi All,

I am using the Cyberflex access card with Schlumberger reader.
I am getting the following exception when I tried to execute the code.

opencard.core.terminal.CardTerminalException: Pcsc10CardTerminal: PCSC
Exception in method SCardConnect: PC/SC Er
ror SCardConnect
return code = 8010000b
        at
com.ibm.opencard.terminal.pcsc10.Pcsc10CardTerminal.translatePcscException(Pcsc10CardTerminal.java:502

)
        at
com.ibm.opencard.terminal.pcsc10.Pcsc10CardTerminal.cardConnect(Pcsc10CardTerminal.java:361)

        at
com.ibm.opencard.terminal.pcsc10.Pcsc10CardTerminal.internalOpenSlotChannel(Pcsc10CardTerminal.java:31

5)
        at
opencard.core.terminal.CardTerminal.openSlotChannel(CardTerminal.java:385)

        at
opencard.core.terminal.CardTerminal.openSlotChannel(CardTerminal.java:360)

        at Personalization.<init>(Personalization.java:85)
        at Personalization.main(Personalization.java:330)


The snippet of the code is,
--------------------------------------------------------------------------------------------------------------------

  SmartCard.start();

  // wait for a smartcard with file access support
  cr = new CardRequest( FileSystemCardService.class );
  sc = SmartCard.waitForCard( cr );
  System.out.println( "smartCard : " + sc );

  CardTerminal terminal = sc.getCardID().getSlot().getCardTerminal();
  System.out.println( "CardTerminal " + terminal );

  int slots = terminal.getSlots();
  System.out.println( "No. of slots " + slots );

  Slot[] slot = terminal.slots();
  System.out.println( "slot Length " + slot.length + " Slot 1 "  +
slot[0] );
  int slotID = slot[0].getSlotID();
  System.out.println( "SLOTID : " + slotID );

  boolean available = terminal.isSlotChannelAvailable( slotID );
  System.out.println( "SlotChannel available " + available );

  SlotChannel slotChannel = null;
  if( !available )
    slotChannel = terminal.openSlotChannel( slotID );

-------------------------------------------------------------------------------------------------------------------

isSlotChannelAvailable() method returns FALSE.
The exception is coming due to the openSlotChannel( slotID ) method
which returns the SlotChannel.

I want to use the sendAPDU method which requires SlotChannel and I am
not getting it.
Can somebody help me out of this situation?

regards,
Ashish



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