mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-01-11 02:31:23 +08:00
CHG: lf em
- some minor psk detection changes.
This commit is contained in:
parent
1a4b907335
commit
6f93185537
1 changed files with 6 additions and 4 deletions
|
@ -546,8 +546,10 @@ bool downloadSamplesEM(){
|
||||||
bool doPreambleSearch(size_t *startIdx){
|
bool doPreambleSearch(size_t *startIdx){
|
||||||
|
|
||||||
// sanity check
|
// sanity check
|
||||||
if ( DemodBufferLen < EM_PREAMBLE_LEN)
|
if ( DemodBufferLen < EM_PREAMBLE_LEN) {
|
||||||
|
if (g_debugMode) PrintAndLog("DEBUG: Error - EM4305 demodbuffer too small");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
// skip first two 0 bits as they might have been missed in the demod
|
// 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};
|
uint8_t preamble[EM_PREAMBLE_LEN] = {0,0,1,0,1,0};
|
||||||
|
@ -591,8 +593,8 @@ bool detectFSK(){
|
||||||
// PSK clocks should be easy to detect ( but difficult to demod a non-repeating pattern... )
|
// PSK clocks should be easy to detect ( but difficult to demod a non-repeating pattern... )
|
||||||
bool detectPSK(){
|
bool detectPSK(){
|
||||||
int ans = GetPskClock("", FALSE, FALSE);
|
int ans = GetPskClock("", FALSE, FALSE);
|
||||||
if (!ans) {
|
if (ans <= 0) {
|
||||||
if (g_debugMode) PrintAndLog("DEBUG: Error - EM4305: PSK clock failed");
|
if (g_debugMode) PrintAndLog("DEBUG: Error - EM4305: PSK clock failed");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
PrintAndLog("PSK response possibly found, run `data rawd p1` to attempt to demod");
|
PrintAndLog("PSK response possibly found, run `data rawd p1` to attempt to demod");
|
||||||
|
@ -601,7 +603,7 @@ bool detectPSK(){
|
||||||
// try manchester - NOTE: ST only applies to T55x7 tags.
|
// try manchester - NOTE: ST only applies to T55x7 tags.
|
||||||
bool detectASK_MAN(){
|
bool detectASK_MAN(){
|
||||||
bool stcheck = FALSE;
|
bool stcheck = FALSE;
|
||||||
int ans = ASKDemod_ext("0 0 0", TRUE, FALSE, 1, &stcheck);
|
int ans = ASKDemod_ext("0 0 0", FALSE, FALSE, 1, &stcheck);
|
||||||
if (!ans) {
|
if (!ans) {
|
||||||
if (g_debugMode) PrintAndLog("DEBUG: Error - EM4305: ASK/Manchester Demod failed");
|
if (g_debugMode) PrintAndLog("DEBUG: Error - EM4305: ASK/Manchester Demod failed");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
Loading…
Reference in a new issue