X-Git-Url: http://cvs.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/f25c62c5ec53de4f0657fb14379bf3098dab9148..e069547c27276069fd8d1cf93a281b819127bec4:/client/cmdlfparadox.c?ds=sidebyside diff --git a/client/cmdlfparadox.c b/client/cmdlfparadox.c index 5225820b..e918c7fe 100644 --- a/client/cmdlfparadox.c +++ b/client/cmdlfparadox.c @@ -5,6 +5,7 @@ // the license. //----------------------------------------------------------------------------- // Low frequency Paradox tag commands +// FSK2a, rf/50, 96 bits (completely known) //----------------------------------------------------------------------------- #include #include @@ -31,8 +32,9 @@ int CmdFSKdemodParadox(const char *Cmd) uint8_t BitStream[MAX_GRAPH_TRACE_LEN]={0}; size_t BitLen = getFromGraphBuf(BitStream); if (BitLen==0) return 0; + int waveIdx=0; //get binary from fsk wave - int idx = ParadoxdemodFSK(BitStream,&BitLen,&hi2,&hi,&lo); + int idx = ParadoxdemodFSK(BitStream,&BitLen,&hi2,&hi,&lo,&waveIdx); if (idx<0){ if (g_debugMode){ if (idx==-1){ @@ -62,6 +64,7 @@ int CmdFSKdemodParadox(const char *Cmd) PrintAndLog("Paradox TAG ID: %x%08x - FC: %d - Card: %d - Checksum: %02x - RAW: %08x%08x%08x", hi>>10, (hi & 0x3)<<26 | (lo>>10), fc, cardnum, (lo>>2) & 0xFF, rawHi2, rawHi, rawLo); setDemodBuf(BitStream,BitLen,idx); + setClockGrid(50, waveIdx + (idx*50)); if (g_debugMode){ PrintAndLog("DEBUG: idx: %d, len: %d, Printing Demod Buffer:", idx, BitLen); printDemodBuff(); @@ -72,9 +75,7 @@ int CmdFSKdemodParadox(const char *Cmd) //see ASKDemod for what args are accepted int CmdParadoxRead(const char *Cmd) { // read lf silently - CmdLFRead("s"); - // get samples silently - getSamples("10000",false); + lf_read(true, 10000); // demod and output viking ID return CmdFSKdemodParadox(Cmd); }