From: iceman1001 Date: Mon, 2 May 2016 12:06:08 +0000 (+0200) Subject: CHG: added the ASK/Biphase demod of signal for NEDAP demod. X-Git-Url: http://cvs.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/commitdiff_plain/96faed2124908faee3a251b7e5a294327218a7ff CHG: added the ASK/Biphase demod of signal for NEDAP demod. ADD: 'LF SEARCH' now also checks for NEDAP. --- diff --git a/client/cmdlf.c b/client/cmdlf.c index 09bd5a1a..0093c5be 100644 --- a/client/cmdlf.c +++ b/client/cmdlf.c @@ -1119,6 +1119,11 @@ int CmdLFfind(const char *Cmd) { PrintAndLog("\nValid NexWatch ID Found!"); return 1; } + ans=CmdFSKdemodNedap(""); + if (ans>0) { + PrintAndLog("\nValid NEDAP ID Found!"); + return 1; + } // TIdemod? diff --git a/client/cmdlfnedap.c b/client/cmdlfnedap.c index bae9d85e..f15813f1 100644 --- a/client/cmdlfnedap.c +++ b/client/cmdlfnedap.c @@ -78,7 +78,13 @@ int CmdFSKdemodNedap(const char *Cmd) { size_t size = getFromGraphBuf(BitStream); if (size==0) return 0; - //get binary from fsk wave + //get binary from ask wave + if (!ASKbiphaseDemod("0 64 1 0", FALSE)) { + if (g_debugMode) PrintAndLog("Error NEDAP: ASKbiphaseDemod failed"); + return 0; + } + size_t size = DemodBufferLen; + int idx = NedapDemod(BitStream, &size); if (idx < 0){ if (g_debugMode){ diff --git a/common/lfdemod.c b/common/lfdemod.c index 3bc246a3..047c9e28 100644 --- a/common/lfdemod.c +++ b/common/lfdemod.c @@ -768,6 +768,7 @@ int PyramiddemodFSK(uint8_t *dest, size_t *size) int NedapDemod(uint8_t *dest, size_t *size) { //make sure buffer has data if (*size < 128) return -3; + size_t startIdx = 0; uint8_t preamble[] = {1,1,1,1,1,1,1,1,1,0}; uint8_t errChk = preambleSearch(dest, preamble, sizeof(preamble), size, &startIdx);