small improvement to fsk clock detect + fixed a bug where it would
default to rf/16 when it couldn't find a valid one...
fwd_bit_count += Prepare_Addr( Address );
SendForward(fwd_bit_count);
fwd_bit_count += Prepare_Addr( Address );
SendForward(fwd_bit_count);
// Now do the acquisition
// Now do the acquisition
- DoPartialAcquisition(20, true, 5500);
+ DoPartialAcquisition(20, true, 6000);
FpgaWriteConfWord(FPGA_MAJOR_MODE_OFF); // field off
LED_A_OFF();
FpgaWriteConfWord(FPGA_MAJOR_MODE_OFF); // field off
LED_A_OFF();
SpinDelayUs(6500);
//Capture response if one exists
SpinDelayUs(6500);
//Capture response if one exists
- DoPartialAcquisition(20, true, 5500);
+ DoPartialAcquisition(20, true, 6000);
FpgaWriteConfWord(FPGA_MAJOR_MODE_OFF); // field off
LED_A_OFF();
FpgaWriteConfWord(FPGA_MAJOR_MODE_OFF); // field off
LED_A_OFF();
uint32_t wordData = 0;
int success = EM4x05ReadWord_ext(addr, pwd, usePwd, &wordData);
if (success == 1)
uint32_t wordData = 0;
int success = EM4x05ReadWord_ext(addr, pwd, usePwd, &wordData);
if (success == 1)
- PrintAndLog(" Got Address %02d | %08X",addr,wordData);
+ PrintAndLog("%s Address %02d | %08X", (addr>13) ? "Lock":" Got",addr,wordData);
else
PrintAndLog("Read Address %02d | failed",addr);
else
PrintAndLog("Read Address %02d | failed",addr);
}
PrintAndLog("ConfigWord: %08X (Word 4)\n", wordData);
PrintAndLog("Config Breakdown:", wordData);
}
PrintAndLog("ConfigWord: %08X (Word 4)\n", wordData);
PrintAndLog("Config Breakdown:", wordData);
- PrintAndLog(" Data Rate: %02X | RF/%u", wordData & 0x3F, datarate);
+ PrintAndLog(" Data Rate: %02u | RF/%u", wordData & 0x3F, datarate);
PrintAndLog(" Encoder: %u | %s", encoder, enc);
PrintAndLog(" PSK CF: %u | %s", PSKcf, cf);
PrintAndLog(" Delay: %u | %s", delay, cdelay);
PrintAndLog(" Encoder: %u | %s", encoder, enc);
PrintAndLog(" PSK CF: %u | %s", PSKcf, cf);
PrintAndLog(" Delay: %u | %s", delay, cdelay);
- PrintAndLog(" LastWordR: %02u | Address of last default word read", LWR);
+ PrintAndLog(" LastWordR: %02u | Address of last word for default read", LWR);
PrintAndLog(" ReadLogin: %u | Read Login is %s", (wordData & 0x40000)>>18, (wordData & 0x40000) ? "Required" : "Not Required");
PrintAndLog(" ReadHKL: %u | Read Housekeeping Words Login is %s", (wordData & 0x80000)>>19, (wordData & 0x80000) ? "Required" : "Not Required");
PrintAndLog("WriteLogin: %u | Write Login is %s", (wordData & 0x100000)>>20, (wordData & 0x100000) ? "Required" : "Not Required");
PrintAndLog(" ReadLogin: %u | Read Login is %s", (wordData & 0x40000)>>18, (wordData & 0x40000) ? "Required" : "Not Required");
PrintAndLog(" ReadHKL: %u | Read Housekeeping Words Login is %s", (wordData & 0x80000)>>19, (wordData & 0x80000) ? "Required" : "Not Required");
PrintAndLog("WriteLogin: %u | Write Login is %s", (wordData & 0x100000)>>20, (wordData & 0x100000) ? "Required" : "Not Required");
}
void printEM4x05ProtectionBits(uint32_t wordData) {
}
void printEM4x05ProtectionBits(uint32_t wordData) {
- for (uint8_t i = 0; i < 14; i++) {
- PrintAndLog(" Word: %02u | %s", i, (((1 << i) & wordData ) || i < 2) ? "Is Locked" : "Is Not Locked");
+ for (uint8_t i = 0; i < 15; i++) {
+ PrintAndLog(" Word: %02u | %s", i, (((1 << i) & wordData ) || i < 2) ? "Is Write Locked" : "Is Not Write Locked");
+ if (i==14) {
+ PrintAndLog(" Word: %02u | %s", i+1, (((1 << i) & wordData ) || i < 2) ? "Is Write Locked" : "Is Not Write Locked");
+ }
continue;
// else new peak
// if we got less than the small fc + tolerance then set it to the small fc
continue;
// else new peak
// if we got less than the small fc + tolerance then set it to the small fc
- if (fcCounter < fcLow+fcTol)
+ // if it is inbetween set it to the last counter
+ if (fcCounter < fcHigh && fcCounter > fcLow)
+ fcCounter = lastFCcnt;
+ else if (fcCounter < fcLow+fcTol)
fcCounter = fcLow;
else //set it to the large fc
fcCounter = fcHigh;
fcCounter = fcLow;
else //set it to the large fc
fcCounter = fcHigh;
- if (ii<0) return 0; // oops we went too far
+ if (ii<2) return 0; // oops we went too far