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