ISO 14443-4 compliant Card Access
Communication with the Applet with APDU commands
byte[] GET_MSISDN = {
(byte) 0x80, // CLA Class
(byte) 0x04, // INS Instruction
(byte) 0x00, // P1 Parameter 1
(byte) 0x00, // P2 Parameter 2
(byte) 0x10 // LE maximal number of bytes expected in result
};
result = tag.transceive(GET_MSISDN);
int len = result.length;
if (!(result[len-2]==(byte)0x90&&result[len-1]==(byte) 0x00))
throw new IOException("could not retrieve msisdn");
byte[] data = new byte[len-2];
System.arraycopy(result, 0, data, 0, len-2);
String msisdn = new String(data).trim();
tag.close();
44
Comments to this Manuals