X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/9a6bc2feb4f750e13f365c050f80b42194a3b797..e1778858ddc53a6a82e8ee24f02e6b673687f69a:/client/cmdlfnoralsy.c diff --git a/client/cmdlfnoralsy.c b/client/cmdlfnoralsy.c index f859bae9..32c92d86 100644 --- a/client/cmdlfnoralsy.c +++ b/client/cmdlfnoralsy.c @@ -71,6 +71,18 @@ int getnoralsyBits(uint32_t id, uint16_t year, uint8_t *bits) { return 1; } +/* +* +* 2520116 | BB0314FF2529900116360000 | 10111011 00000011 00010100 11111111 00100101 00101001 10010000 00000001 00010110 00110110 00000000 00000000 +* aaaaaaaaiii***iiiicc---- iiiiiiii iiiiYYYY YYYY**** iiiiiiii iiiiiiii cccccccc +* +* a = fixed value BB0314FF +* i = printed id, BCD-format +* Y = year +* c = checksum +* +**/ + //see ASKDemod for what args are accepted int CmdNoralsyDemod(const char *Cmd) { @@ -96,6 +108,7 @@ int CmdNoralsyDemod(const char *Cmd) { return 0; } setDemodBuf(DemodBuffer, 96, ans); + setGrid_Clock(32); //got a good demod uint32_t raw1 = bytebits_to_byte(DemodBuffer, 32); @@ -141,7 +154,7 @@ int CmdNoralsyClone(const char *Cmd) { uint16_t year = 0; uint32_t id = 0; - uint32_t blocks[4] = {T55x7_MODULATION_MANCHESTER | T55x7_BITRATE_RF_32 | T55x7_ST_TERMINATOR |3<>1) << T5555_BITRATE_SHIFT | T5555_ST_TERMINATOR | 3 << T5555_MAXBLOCK_SHIFT; } if ( !getnoralsyBits(id, year, bs)) { @@ -184,7 +197,7 @@ int CmdNoralsyClone(const char *Cmd) { c.arg[1] = i; clearCommandBuffer(); SendCommand(&c); - if (!WaitForResponseTimeout(CMD_ACK, &resp, 1000)){ + if (!WaitForResponseTimeout(CMD_ACK, &resp, T55XX_WRITE_TIMEOUT)){ PrintAndLog("Error occurred, device did not respond during write operation."); return -1; }