X-Git-Url: http://cvs.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/160dba86970b71e23770929cb2b15b2454a1496f..0d2624a0cc13dbe34392da1f8495af6c64a84ddb:/client/cmdlfnexwatch.c diff --git a/client/cmdlfnexwatch.c b/client/cmdlfnexwatch.c index 030c61c7..d44c2a27 100644 --- a/client/cmdlfnexwatch.c +++ b/client/cmdlfnexwatch.c @@ -5,14 +5,16 @@ // the license. //----------------------------------------------------------------------------- // Low frequency Honeywell NexWatch tag commands -// PSK1 RF/16, RF/2, 128 bits long +// PSK1 RF/16, RF/2, 128 bits long (known) //----------------------------------------------------------------------------- + +#include "cmdlfnexwatch.h" + #include #include #include #include -#include "cmdlfnexwatch.h" -#include "proxmark3.h" +#include "comms.h" #include "ui.h" #include "util.h" #include "graph.h" @@ -38,7 +40,8 @@ int CmdPSKNexWatch(const char *Cmd) } if (size != 128) return 0; setDemodBuf(DemodBuffer, size, startIdx+4); - startIdx = 8+32; //4 = extra i added, 8 = preamble, 32 = reserved bits (always 0) + setClockGrid(g_DemodClock, g_DemodStartIdx + ((startIdx+4)*g_DemodClock)); + startIdx = 8+32; // 8 = preamble, 32 = reserved bits (always 0) //get ID uint32_t ID = 0; for (uint8_t wordIdx=0; wordIdx<4; wordIdx++){ @@ -66,9 +69,7 @@ int CmdPSKNexWatch(const char *Cmd) //see ASKDemod for what args are accepted int CmdNexWatchRead(const char *Cmd) { // read lf silently - CmdLFRead("s"); - // get samples silently - getSamples("10000",false); + lf_read(true, 10000); // demod and output viking ID return CmdPSKNexWatch(Cmd); }