]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/cmdlfvisa2000.c
Improve 'Magic' Mifare tags generation detection & hf mf c* commands magic 4k compati...
[proxmark3-svn] / client / cmdlfvisa2000.c
index f8649bb14267104863cef42e3a04d2f763d21533..562b9bcdb583c06034f1e3762cad1f2656548995 100644 (file)
@@ -4,13 +4,15 @@
 // at your option, any later version. See the LICENSE.txt file for the text of
 // the license.
 //-----------------------------------------------------------------------------
-// Low frequency visa 200 tag commands
+// Low frequency visa 2000 tag commands
 // by iceman
+// ASK/Manchester, RF/64, STT, 96 bits (complete)
 //-----------------------------------------------------------------------------
 
 #include "cmdlfvisa2000.h"
 
 #include <stdio.h>
+#include <string.h>
 #include "proxmark3.h"
 #include "ui.h"
 #include "util.h"
@@ -82,12 +84,12 @@ static uint8_t visa_parity( uint32_t id) {
 /**
 *
 * 56495332 00096ebd 00000077 —> tag id 618173
-* aaaaaaaa iiiiiiii -----..c
+* aaaaaaaa iiiiiiii -----ppc
 *
 * a = fixed value  ascii 'VIS2'
 * i = card id
+* p = even parity bit for each nibble in card id.
 * c = checksum  (xor of card id)
-* . = unknown 
 * 
 **/
 //see ASKDemod for what args are accepted
@@ -117,7 +119,7 @@ int CmdVisa2kDemod(const char *Cmd) {
                return 0;
        }
        setDemodBuf(DemodBuffer, 96, ans);
-       //setGrid_Clock(64);
+       setClockGrid(g_DemodClock, g_DemodStartIdx + (ans*g_DemodClock));
 
        //got a good demod
        uint32_t raw1 = bytebits_to_byte(DemodBuffer, 32);
@@ -145,9 +147,8 @@ int CmdVisa2kDemod(const char *Cmd) {
 }
 
 int CmdVisa2kRead(const char *Cmd) {
-       CmdLFRead("s");
        //64*96*2=12288 samples just in case we just missed the first preamble we can still catch 2 of them
-       getSamples("12500",true); 
+       lf_read(true, 12500);
        return CmdVisa2kDemod(Cmd);
 }
 
Impressum, Datenschutz