// the license.
//-----------------------------------------------------------------------------
// Low frequency fdx-b tag commands
+// Differential Biphase, rf/32, 128 bits (known)
//-----------------------------------------------------------------------------
#include "cmdlffdx.h"
+#include <stdio.h>
#include <inttypes.h>
+#include <string.h>
#include "proxmark3.h"
#include "ui.h" // for PrintAndLog
#include "util.h"
//Differential Biphase / di-phase (inverted biphase)
//get binary from ask wave
- if (!ASKbiphaseDemod("0 32 1 0", FALSE)) {
+ if (!ASKbiphaseDemod("0 32 1 0", false)) {
if (g_debugMode) PrintAndLog("DEBUG: Error - FDX-B ASKbiphaseDemod failed");
return 0;
}
// set and leave DemodBuffer intact
setDemodBuf(DemodBuffer, 128, preambleIndex);
+ setClockGrid(g_DemodClock, g_DemodStartIdx + (preambleIndex*g_DemodClock));
+
uint8_t bits_no_spacer[117];
memcpy(bits_no_spacer, DemodBuffer + 11, 117);
}
int CmdFdxRead(const char *Cmd) {
- CmdLFRead("s");
- getSamples("10000", TRUE);
+ lf_read(true, 10000);
return CmdFdxDemod(Cmd);
}