]> git.zerfleddert.de Git - proxmark3-svn/commitdiff
CHG: added the ASK/Biphase demod of signal for NEDAP demod.
authoriceman1001 <iceman@iuse.se>
Mon, 2 May 2016 12:06:08 +0000 (14:06 +0200)
committericeman1001 <iceman@iuse.se>
Mon, 2 May 2016 12:06:08 +0000 (14:06 +0200)
ADD: 'LF SEARCH'  now also checks for NEDAP.

client/cmdlf.c
client/cmdlfnedap.c
common/lfdemod.c

index 09bd5a1ab8d786da64a093b3eb5672bb1d7cdfab..0093c5be15d81d1fd9575ee42bb38c0fbc1f125b 100644 (file)
@@ -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?
        
 
index bae9d85ea7b85c04d3897636a075a82d3553ddc6..f15813f10c21886cbea11061d8c081fa8fc9b59a 100644 (file)
@@ -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){
index 3bc246a3e20b5831f01764ac51ee94ee100c2330..047c9e2893edbbdccb770f32f53a7a16965cecd5 100644 (file)
@@ -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);
Impressum, Datenschutz