projects
/
proxmark3-svn
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Flush stdout when waiting for /dev/ttyACM0
[proxmark3-svn]
/
client
/
cmdlfnoralsy.c
diff --git
a/client/cmdlfnoralsy.c
b/client/cmdlfnoralsy.c
index e56ebf7f4a7a99e1b05a88455197f8fbff679eee..2c90fa14da4843637114a680a28993021b1bffb7 100644
(file)
--- a/
client/cmdlfnoralsy.c
+++ b/
client/cmdlfnoralsy.c
@@
-5,7
+5,7
@@
// the license.
//-----------------------------------------------------------------------------
// Low frequency Noralsy tag commands
// the license.
//-----------------------------------------------------------------------------
// Low frequency Noralsy tag commands
-// ASK/Manchester, STT, RF/32, 96 bits long
+// ASK/Manchester, STT, RF/32, 96 bits long
(some bits unknown)
//-----------------------------------------------------------------------------
#include "cmdlfnoralsy.h"
#include <string.h>
//-----------------------------------------------------------------------------
#include "cmdlfnoralsy.h"
#include <string.h>
@@
-98,30
+98,27
@@
int NoralsyDemod_AM(uint8_t *dest, size_t *size) {
/*
*
* 2520116 | BB0214FF2529900116360000 | 10111011 00000011 00010100 11111111 00100101 00101001 10010000 00000001 00010110 00110110 00000000 00000000
/*
*
* 2520116 | BB0214FF2529900116360000 | 10111011 00000011 00010100 11111111 00100101 00101001 10010000 00000001 00010110 00110110 00000000 00000000
-* aaa
aaaaaiii***iiiicc----
iiiiiiii iiiiYYYY YYYY**** iiiiiiii iiiiiiii cccccccc
+* aaa
*aaaaiiiYY*iiiicc---- ****
iiiiiiii iiiiYYYY YYYY**** iiiiiiii iiiiiiii cccccccc
*
*
-* a = fixed value BB0
3
14FF
+* a = fixed value BB0
*
14FF
* i = printed id, BCD-format
* Y = year
* c = checksum
* i = printed id, BCD-format
* Y = year
* c = checksum
-*
+* * = unknown
+*
**/
//see ASKDemod for what args are accepted
int CmdNoralsyDemod(const char *Cmd) {
//ASK / Manchester
**/
//see ASKDemod for what args are accepted
int CmdNoralsyDemod(const char *Cmd) {
//ASK / Manchester
- DemodBufferLen = getFromGraphBuf(DemodBuffer);
- if (DemodBufferLen < 255) return 0;
- int foundclk = 0;
- size_t ststart = 0, stend = 0;
- bool st = DetectST_ext(DemodBuffer, &DemodBufferLen, &foundclk, &ststart, &stend);
- if (!st) return 0;
-
+ bool st = true;
if (!ASKDemod_ext("32 0 0", false, false, 1, &st)) {
if (g_debugMode) PrintAndLog("DEBUG: Error - Noralsy: ASK/Manchester Demod failed");
return 0;
}
if (!ASKDemod_ext("32 0 0", false, false, 1, &st)) {
if (g_debugMode) PrintAndLog("DEBUG: Error - Noralsy: ASK/Manchester Demod failed");
return 0;
}
+ if (!st) return 0;
+
size_t size = DemodBufferLen;
int ans = NoralsyDemod_AM(DemodBuffer, &size);
if (ans < 0){
size_t size = DemodBufferLen;
int ans = NoralsyDemod_AM(DemodBuffer, &size);
if (ans < 0){
@@
-138,6
+135,7
@@
int CmdNoralsyDemod(const char *Cmd) {
return 0;
}
setDemodBuf(DemodBuffer, 96, ans);
return 0;
}
setDemodBuf(DemodBuffer, 96, ans);
+ setClockGrid(g_DemodClock, g_DemodStartIdx + (ans*g_DemodClock));
//setGrid_Clock(32);
//got a good demod
//setGrid_Clock(32);
//got a good demod
@@
-175,8
+173,7
@@
int CmdNoralsyDemod(const char *Cmd) {
}
int CmdNoralsyRead(const char *Cmd) {
}
int CmdNoralsyRead(const char *Cmd) {
- CmdLFRead("s");
- getSamples("8000",true);
+ lf_read(true, 8000);
return CmdNoralsyDemod(Cmd);
}
return CmdNoralsyDemod(Cmd);
}
Impressum
,
Datenschutz