Am working on a project to read from and write data to SLE 4442 smart cards. The Card Reader am using is ACR38 from ACS. Following their APDU commands, I have being able to get access to the card and read some data. But am suspecting that I still have not being able to read the exact data inside. This is because, anytime my application is started, it brings out new data. I really don't know why is behaving that way, can somebody please spot where am getting wrong here? Below is my Java code:
CardChannel channel = card.getBasicChannel();
byte[] read_memory_card = {(byte) 0xFF, (byte) 0xB0, (byte) 0xA7A6A5A4, (byte) 0xA3A2A1A0, (byte) 0x00};
ResponseAPDU read_data_resp = channel.transmit(new CommandAPDU(read_memory_card));
if (read_data_resp.getSW1() == 0x90 && read_data_resp.getSW2() == 0x00) {
System.out.println("Data in Card: " + read_data_resp.getData() + "and SW1: " + read_data_resp.getSW1());
}
What I get as a result:
Data in Card: [B@378bf509 and SW1: 144
Please note that Data in Card changes every time, the application is restarted.
0xA7A6A5A4
as a byte? this will only send the reader0xA4
. Same goes with0xA3A2A1A0
. Also you should output sw1 as hex, but you already know that sw1 is 0x90 becaues of your if statement. – Robert Snyder1010 0100
and if i'm reading the document correcty1000 000
has special meaning. – Robert Snyder