mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 13:53:55 -07:00
CHG: making timings a bit tighter == faster read of tag. Like 1ms for whole tag.
FIX: off-by-one bug in read-byte-loop.
This commit is contained in:
parent
e1a0ed65ff
commit
c15e07f11d
2 changed files with 8 additions and 6 deletions
|
@ -395,8 +395,10 @@ int legic_read_byte( uint16_t index, uint8_t cmd_sz) {
|
||||||
uint8_t byte, crc, calcCrc = 0;
|
uint8_t byte, crc, calcCrc = 0;
|
||||||
uint32_t cmd = (index << 1) | LEGIC_READ;
|
uint32_t cmd = (index << 1) | LEGIC_READ;
|
||||||
|
|
||||||
//WaitTicks(366);
|
//WaitTicks(330); // (4)
|
||||||
WaitTicks(330);
|
WaitTicks(240); // (3)
|
||||||
|
//WaitTicks(230); //(2)
|
||||||
|
//WaitTicks(60); //(1)
|
||||||
|
|
||||||
frame_sendAsReader(cmd, cmd_sz);
|
frame_sendAsReader(cmd, cmd_sz);
|
||||||
frame_receiveAsReader(¤t_frame, 12);
|
frame_receiveAsReader(¤t_frame, 12);
|
||||||
|
@ -411,7 +413,7 @@ int legic_read_byte( uint16_t index, uint8_t cmd_sz) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
legic_prng_forward(4);
|
legic_prng_forward(3);
|
||||||
return byte;
|
return byte;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -505,7 +507,7 @@ int LegicRfReader(uint16_t offset, uint16_t len, uint8_t iv) {
|
||||||
setup_phase_reader(iv);
|
setup_phase_reader(iv);
|
||||||
|
|
||||||
LED_B_ON();
|
LED_B_ON();
|
||||||
while (i <= len) {
|
while (i < len) {
|
||||||
int r = legic_read_byte(offset + i, card.cmdsize);
|
int r = legic_read_byte(offset + i, card.cmdsize);
|
||||||
|
|
||||||
if (r == -1 || BUTTON_PRESS()) {
|
if (r == -1 || BUTTON_PRESS()) {
|
||||||
|
|
|
@ -440,8 +440,8 @@ int CmdLegicRFRead(const char *Cmd) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
PrintAndLog("\nData");
|
PrintAndLog("\n ## | Data");
|
||||||
PrintAndLog("-----------------------------");
|
PrintAndLog("-----+-----");
|
||||||
print_hex_break( data, readlen, 32);
|
print_hex_break( data, readlen, 32);
|
||||||
} else {
|
} else {
|
||||||
PrintAndLog("failed reading tag");
|
PrintAndLog("failed reading tag");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue