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!

Omnikey 5321 in combination with a "AT24C16" smart card won't work

843851Apr 8 2010 — edited Aug 24 2010
Hello all,

I have already searched for threads on that topic, but I wasn't able to find a solution. Maybe I'm just blind...

I tried to read the data on a simple memory card (AT24C16) using the PC/SC commands, but I always get the same error "Command incompatible with file structure" (6981). According to the manual of the reader the ReadBinary command is the right one. Here is an excerpt of the code:
CommandAPDU someApdu = new CommandAPDU(255, 176, 0, 0 );
	 ResponseAPDU r = channel.transmit(someApdu);
	 byte[] response = r.getBytes();
	 int SW1 = r.getSW1();
	 int SW2 = r.getSW2();
	 byte[] data = r.getData();
Could anyone of you help? Thanks!

P.S.: Yes I'm new to Java Card ;-)


*Edit: I finally found the right command for the structure error. byte[] readCommand = new byte[] { (byte)0xFF, (byte)0xB0, (byte)0x00, (byte)0x01, (byte)0x00 }; solve the problem with the error SW6981, but lead to the new error 6A86 - Insufficient memory. That's a bit confussing, which memory is insufficient? The memory of the reader, or any return variable?*

Edited by: JDominicL on 09.04.2010 11:03
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 21 2010
Added on Apr 8 2010
3 comments
388 views