mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 05:13:46 -07:00
revert back timeout values
This commit is contained in:
parent
f57a6195de
commit
f4ff22a5bc
1 changed files with 9 additions and 24 deletions
|
@ -55,8 +55,8 @@
|
||||||
#include "protocols.h"
|
#include "protocols.h"
|
||||||
#include "ticks.h"
|
#include "ticks.h"
|
||||||
|
|
||||||
static int g_wait = 200;
|
static int g_wait = 100;
|
||||||
static int timeout = 15000;
|
static int timeout = 5000;
|
||||||
static uint32_t time_rdr = 0;
|
static uint32_t time_rdr = 0;
|
||||||
static uint32_t time_response = 0;
|
static uint32_t time_response = 0;
|
||||||
|
|
||||||
|
@ -896,8 +896,6 @@ void RAMFUNC SniffIClass(void) {
|
||||||
// time ZERO, the point from which it all is calculated.
|
// time ZERO, the point from which it all is calculated.
|
||||||
time_0 = GetCountSspClk();
|
time_0 = GetCountSspClk();
|
||||||
|
|
||||||
int divi = 0;
|
|
||||||
uint8_t tag_byte = 0, foo = 0;
|
|
||||||
// loop and listen
|
// loop and listen
|
||||||
// every sample (1byte in data),
|
// every sample (1byte in data),
|
||||||
// contains HIGH nibble = reader data
|
// contains HIGH nibble = reader data
|
||||||
|
@ -908,12 +906,11 @@ void RAMFUNC SniffIClass(void) {
|
||||||
for (;;) {
|
for (;;) {
|
||||||
WDT_HIT();
|
WDT_HIT();
|
||||||
|
|
||||||
if (checked == 1000) {
|
if (checked == 2000) {
|
||||||
if (BUTTON_PRESS() || data_available()) break;
|
if (BUTTON_PRESS() || data_available()) break;
|
||||||
checked = 0;
|
checked = 0;
|
||||||
} else {
|
|
||||||
checked++;
|
|
||||||
}
|
}
|
||||||
|
checked++;
|
||||||
|
|
||||||
previous_data <<= 8;
|
previous_data <<= 8;
|
||||||
previous_data |= *data;
|
previous_data |= *data;
|
||||||
|
@ -927,14 +924,6 @@ void RAMFUNC SniffIClass(void) {
|
||||||
AT91C_BASE_PDC_SSC->PDC_RNCR = ICLASS_DMA_BUFFER_SIZE;
|
AT91C_BASE_PDC_SSC->PDC_RNCR = ICLASS_DMA_BUFFER_SIZE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (*data & 0xF) {
|
|
||||||
//tag_byte <<= 1;
|
|
||||||
tag_byte ^= (1 << 4);
|
|
||||||
foo ^= (1 << (3 - divi));
|
|
||||||
Dbprintf(" %d|%x == %d|%x", tag_byte, tag_byte, foo, foo);
|
|
||||||
}
|
|
||||||
divi++;
|
|
||||||
|
|
||||||
// every odd sample
|
// every odd sample
|
||||||
if (sniffCounter & 0x01) {
|
if (sniffCounter & 0x01) {
|
||||||
// no need to try decoding reader data if the tag is sending
|
// no need to try decoding reader data if the tag is sending
|
||||||
|
@ -964,8 +953,6 @@ void RAMFUNC SniffIClass(void) {
|
||||||
LED_C_INV();
|
LED_C_INV();
|
||||||
// LOW nibble is always tag data.
|
// LOW nibble is always tag data.
|
||||||
/*
|
/*
|
||||||
|
|
||||||
|
|
||||||
uint32_t tag_byte =
|
uint32_t tag_byte =
|
||||||
((previous_data & 0x0F000000) >> 8 ) |
|
((previous_data & 0x0F000000) >> 8 ) |
|
||||||
((previous_data & 0x000F0000) >> 4 ) |
|
((previous_data & 0x000F0000) >> 4 ) |
|
||||||
|
@ -975,8 +962,8 @@ void RAMFUNC SniffIClass(void) {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
//uint8_t tag_byte = ((previous_data & 0xF) << 4 ) | (*data & 0xF);
|
uint8_t tag_byte = ((previous_data & 0xF) << 4 ) | (*data & 0xF);
|
||||||
if (ManchesterDecoding_iclass(foo)) {
|
if (ManchesterDecoding_iclass(tag_byte)) {
|
||||||
time_stop = GetCountSspClk() - time_0;
|
time_stop = GetCountSspClk() - time_0;
|
||||||
LogTrace(Demod.output, Demod.len, time_start, time_stop, NULL, false);
|
LogTrace(Demod.output, Demod.len, time_start, time_stop, NULL, false);
|
||||||
DemodIcReset();
|
DemodIcReset();
|
||||||
|
@ -986,17 +973,15 @@ void RAMFUNC SniffIClass(void) {
|
||||||
}
|
}
|
||||||
TagIsActive = (Demod.state != DEMOD_IC_UNSYNCD);
|
TagIsActive = (Demod.state != DEMOD_IC_UNSYNCD);
|
||||||
}
|
}
|
||||||
tag_byte = 0;
|
|
||||||
foo = 0;
|
|
||||||
divi = 0;
|
|
||||||
}
|
}
|
||||||
} // end main loop
|
} // end main loop
|
||||||
|
|
||||||
|
/*
|
||||||
if (DBGLEVEL >= 1) {
|
if (DBGLEVEL >= 1) {
|
||||||
DbpString("[+] Sniff statistics:");
|
DbpString("[+] Sniff statistics:");
|
||||||
Dbhexdump(ICLASS_DMA_BUFFER_SIZE, data, false);
|
Dbhexdump(ICLASS_DMA_BUFFER_SIZE, data, false);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
switch_off();
|
switch_off();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue