mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-01-10 02:04:39 +08:00
Fixed (?) http://www.proxmark.org/forum/viewtopic.php?id=1967, two bytes are discarded when adding crc and sending raw iso14443a commands
This commit is contained in:
parent
f83cc12613
commit
fdcd43eb15
1 changed files with 3 additions and 0 deletions
|
@ -192,6 +192,7 @@ void AppendCrc14443a(uint8_t* data, int len)
|
||||||
// The function LogTrace() is also used by the iClass implementation in iClass.c
|
// The function LogTrace() is also used by the iClass implementation in iClass.c
|
||||||
bool RAMFUNC LogTrace(const uint8_t * btBytes, uint8_t iLen, uint32_t timestamp, uint32_t dwParity, bool readerToTag)
|
bool RAMFUNC LogTrace(const uint8_t * btBytes, uint8_t iLen, uint32_t timestamp, uint32_t dwParity, bool readerToTag)
|
||||||
{
|
{
|
||||||
|
if (!tracing) return FALSE;
|
||||||
// Return when trace is full
|
// Return when trace is full
|
||||||
if (traceLen + sizeof(timestamp) + sizeof(dwParity) + iLen >= TRACE_SIZE) {
|
if (traceLen + sizeof(timestamp) + sizeof(dwParity) + iLen >= TRACE_SIZE) {
|
||||||
tracing = FALSE; // don't trace any more
|
tracing = FALSE; // don't trace any more
|
||||||
|
@ -1859,8 +1860,10 @@ void ReaderIso14443a(UsbCommand *c)
|
||||||
if(param & ISO14A_APPEND_CRC) {
|
if(param & ISO14A_APPEND_CRC) {
|
||||||
AppendCrc14443a(cmd,len);
|
AppendCrc14443a(cmd,len);
|
||||||
len += 2;
|
len += 2;
|
||||||
|
lenbits += 16;
|
||||||
}
|
}
|
||||||
if(lenbits>0) {
|
if(lenbits>0) {
|
||||||
|
|
||||||
ReaderTransmitBitsPar(cmd,lenbits,GetParity(cmd,lenbits/8), NULL);
|
ReaderTransmitBitsPar(cmd,lenbits,GetParity(cmd,lenbits/8), NULL);
|
||||||
} else {
|
} else {
|
||||||
ReaderTransmit(cmd,len, NULL);
|
ReaderTransmit(cmd,len, NULL);
|
||||||
|
|
Loading…
Reference in a new issue