I need to read account number from Maestro/Mastercard with smart card reader. I am using Java 1.6 and its javax.smartcardio package. I need to send APDU command which will a
Did you try looking up in your documentation what 0x6D00 means? It looks like it might mean that the ENVELOPE command is not supported. Have you tried using T=0 protocol instead of T=1?
I would not expect my example to work on your card. I don't know which APDUs the Maestro/MasterCard-supports, so I couldn't give you a working example.
Try giving the command an explicit expected length like this:
byte[] readPan(CardChannel channel) throws CardException {
CommandAPDU command = new CommandAPDU(0x00, 0xB2, 0x5a, 0x14, 250);
ResponseAPDU response = channel.transmit(command);
return response.getData();
}