mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-01-13 03:29:51 +08:00
EM4x05: avoid false positives in preamble detection
This commit is contained in:
parent
1d8c268b8b
commit
229da561d6
1 changed files with 3 additions and 2 deletions
|
@ -739,8 +739,9 @@ static int doPreambleSearch(size_t *startIdx) {
|
|||
return PM3_ESOFT;
|
||||
}
|
||||
|
||||
// set size to 20 to only test first 14 positions for the preamble
|
||||
size_t size = (20 > DemodBufferLen) ? DemodBufferLen : 20;
|
||||
// set size to 9 to only test first 3 positions for the preamble
|
||||
// do not set it too long else an error preamble followed by 010 could be seen as success.
|
||||
size_t size = (9 > DemodBufferLen) ? DemodBufferLen : 9;
|
||||
*startIdx = 0;
|
||||
// skip first two 0 bits as they might have been missed in the demod
|
||||
uint8_t preamble[EM_PREAMBLE_LEN] = {0, 0, 1, 0, 1, 0};
|
||||
|
|
Loading…
Reference in a new issue