fix OTP simulation
This commit is contained in:
1 parent
c3390a2e0e
commit
c8cde55a5e
6 files changed
+72
-63
No files matched your search
@@ -1206,9 +1206,9 @@ static int CmdExchangeAPDU(bool chainingin, const uint8_t *datain, int datainlen
|
||||
}
|
||||
}
|
||||
|
||||
uint16_t cmdc = 0;
|
||||
uint16_t cmdc = (ISO14A_APDU | ISO14A_NO_DISCONNECT);
|
||||
if (chainingin) {
|
||||
cmdc = ISO14A_SEND_CHAINING;
|
||||
cmdc |= ISO14A_SEND_CHAINING;
|
||||
}
|
||||
|
||||
// "Command APDU" length should be 5+255+1, but javacard's APDU buffer might be smaller - 133 bytes
|
||||
@@ -1216,9 +1216,9 @@ static int CmdExchangeAPDU(bool chainingin, const uint8_t *datain, int datainlen
|
||||
// here length PM3_CMD_DATA_SIZE=512
|
||||
// timeout must be authomatically set by "get ATS"
|
||||
if (datain) {
|
||||
SendCommandMIX(CMD_HF_ISO14443A_READER, ISO14A_APDU | ISO14A_NO_DISCONNECT | cmdc, (datainlen & 0x1FF), 0, datain, datainlen & 0x1FF);
|
||||
SendCommandMIX(CMD_HF_ISO14443A_READER, cmdc, (datainlen & 0x1FF), 0, datain, (datainlen & 0x1FF));
|
||||
} else {
|
||||
SendCommandMIX(CMD_HF_ISO14443A_READER, ISO14A_APDU | ISO14A_NO_DISCONNECT | cmdc, 0, 0, NULL, 0);
|
||||
SendCommandMIX(CMD_HF_ISO14443A_READER, cmdc, 0, 0, NULL, 0);
|
||||
}
|
||||
|
||||
PacketResponseNG resp;
|
||||
|
||||
Reference in new issue
Block a user