mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 13:23:51 -07:00
hitag sniff, use edgemode
This commit is contained in:
parent
1e37c57729
commit
1f5de5debd
1 changed files with 29 additions and 28 deletions
|
@ -74,16 +74,16 @@ size_t lf_count_edge_periods_ex(size_t max, bool wait, bool detect_gap) {
|
||||||
while (!BUTTON_PRESS()) {
|
while (!BUTTON_PRESS()) {
|
||||||
|
|
||||||
// only every 100th times, in order to save time when collecting samples.
|
// only every 100th times, in order to save time when collecting samples.
|
||||||
/*
|
/*
|
||||||
if (checked == 1000) {
|
if (checked == 1000) {
|
||||||
if (data_available()) {
|
if (data_available()) {
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
checked = 0;
|
checked = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
++checked;
|
++checked;
|
||||||
*/
|
*/
|
||||||
WDT_HIT();
|
WDT_HIT();
|
||||||
|
|
||||||
if (AT91C_BASE_SSC->SSC_SR & (AT91C_SSC_RXRDY)) {
|
if (AT91C_BASE_SSC->SSC_SR & (AT91C_SSC_RXRDY)) {
|
||||||
|
@ -136,12 +136,12 @@ void lf_reset_counter() {
|
||||||
|
|
||||||
// TODO: find out the correct reset settings for tag and reader mode
|
// TODO: find out the correct reset settings for tag and reader mode
|
||||||
// if (reader_mode) {
|
// if (reader_mode) {
|
||||||
// Reset values for reader mode
|
// Reset values for reader mode
|
||||||
rising_edge = false;
|
rising_edge = false;
|
||||||
previous_adc_val = 0xFF;
|
previous_adc_val = 0xFF;
|
||||||
|
|
||||||
// } else {
|
// } else {
|
||||||
// Reset values for tag/transponder mode
|
// Reset values for tag/transponder mode
|
||||||
// rising_edge = false;
|
// rising_edge = false;
|
||||||
// previous_adc_val = 0xFF;
|
// previous_adc_val = 0xFF;
|
||||||
// }
|
// }
|
||||||
|
@ -179,7 +179,8 @@ void lf_init(bool reader, bool simulate) {
|
||||||
// FpgaWriteConfWord(FPGA_MAJOR_MODE_LF_EDGE_DETECT);
|
// FpgaWriteConfWord(FPGA_MAJOR_MODE_LF_EDGE_DETECT);
|
||||||
FpgaWriteConfWord(FPGA_MAJOR_MODE_LF_ADC);
|
FpgaWriteConfWord(FPGA_MAJOR_MODE_LF_ADC);
|
||||||
else
|
else
|
||||||
FpgaWriteConfWord(FPGA_MAJOR_MODE_LF_ADC);
|
// Sniff
|
||||||
|
FpgaWriteConfWord(FPGA_MAJOR_MODE_LF_EDGE_DETECT | FPGA_LF_EDGE_DETECT_TOGGLE_MODE);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -249,18 +250,18 @@ size_t lf_detect_field_drop(size_t max) {
|
||||||
|
|
||||||
while (!BUTTON_PRESS()) {
|
while (!BUTTON_PRESS()) {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
// only every 1000th times, in order to save time when collecting samples.
|
// only every 1000th times, in order to save time when collecting samples.
|
||||||
if (checked == 1000) {
|
if (checked == 1000) {
|
||||||
if (data_available()) {
|
if (data_available()) {
|
||||||
checked = -1;
|
checked = -1;
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
checked = 0;
|
checked = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
++checked;
|
++checked;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
WDT_HIT();
|
WDT_HIT();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue