Skip to Main Content

Java Card

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

sun.security.smartcardio.PCSCException: Unknown error 0x8010002f

843851Aug 7 2008 — edited May 10 2011
Hi All

I am writing java application to talk with smart card

every thing is ok till i reach to this command:

private static byte[] COMMAND2 = {(byte) 0xEF, (byte) 0xFA, (byte) 0xCE, (byte) 0x00, (byte) 0xFF};
private static CommandAPDU COMMAND2_APDU = new CommandAPDU(COMMAND2);
connectWithCard();

sendAPDU1();

card.disconnect(true); //Reset must occur before 
try{
Thread.sleep(1000);
}
catch(InterruptedException e)
{
System.out.println("Exception for sleep : "+e.getMessage());
}

connectWithCard();

ra=ch.transmit(COMMAND2_APDU);//Exception occur here
System.out.println("Response due to COMMAND2_APDU : " + arrayToHex(ra.getBytes()));
JOptionPane.showMessageDialog(null,"Response due to COMMAND2_APDU : " + arrayToHex(ra.getBytes()), "Status", JOptionPane.ERROR_MESSAGE); 
//implementation for connectwithCard()
try {
card = c.connect("T=0");
// System.out.println("Terminal connected");
JOptionPane.showMessageDialog(null,"Terminal connected", "Status", JOptionPane.ERROR_MESSAGE); 
} catch (Exception e) {
//  System.out.println("Terminal NOT onnected: " + e.toString());
JOptionPane.showMessageDialog(null,"Terminal NOT onnected: " + e.toString(), "Status", JOptionPane.ERROR_MESSAGE); 
}

System.out.println("ATR: " + arrayToHex(((ATR) card.getATR()).getBytes()));
JOptionPane.showMessageDialog(null,"ATR: " + arrayToHex(((ATR) card.getATR()).getBytes()), "Status", JOptionPane.ERROR_MESSAGE); 
ch = card.getBasicChannel(); 
Exception is:

javax.smartcardio.CardException: sun.security.smartcardio.PCSCException: Unknown error 0x8010002f

What should i do ?

Thanks in Advance

Edited by: Nabil_ on Aug 7, 2008 3:23 AM

Edited by: Nabil_ on Aug 7, 2008 3:31 AM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 7 2011
Added on Aug 7 2008
9 comments
6,283 views