]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - armsrc/iso14443a.c
debug in progress
[proxmark3-svn] / armsrc / iso14443a.c
index 8e4082eab0f98420120f8e2af388e628988ee48f..cd7c9540663bc54a98e48e7551095b8b786677e2 100644 (file)
@@ -192,6 +192,7 @@ void AppendCrc14443a(uint8_t* data, int len)
 // 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)
 {
 // 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)
 {
+       if (!tracing) return FALSE;
        // Return when trace is full
        if (traceLen + sizeof(timestamp) + sizeof(dwParity) + iLen >= TRACE_SIZE) {
                tracing = FALSE;        // don't trace any more
        // Return when trace is full
        if (traceLen + sizeof(timestamp) + sizeof(dwParity) + iLen >= TRACE_SIZE) {
                tracing = FALSE;        // don't trace any more
@@ -1859,8 +1860,10 @@ void ReaderIso14443a(UsbCommand *c)
                if(param & ISO14A_APPEND_CRC) {
                        AppendCrc14443a(cmd,len);
                        len += 2;
                if(param & ISO14A_APPEND_CRC) {
                        AppendCrc14443a(cmd,len);
                        len += 2;
+                       lenbits += 16;
                }
                if(lenbits>0) {
                }
                if(lenbits>0) {
+
                        ReaderTransmitBitsPar(cmd,lenbits,GetParity(cmd,lenbits/8), NULL);
                } else {
                        ReaderTransmit(cmd,len, NULL);
                        ReaderTransmitBitsPar(cmd,lenbits,GetParity(cmd,lenbits/8), NULL);
                } else {
                        ReaderTransmit(cmd,len, NULL);
Impressum, Datenschutz