ADD: added a lot of ic ids to cmdhf15.c Thanks to Asper for the list.
ADD: added a manufacturer list for hf 14a reader, only viable when UID is double or triple size. Thanks to Asper for the list. ADD: Some changes from Holimans commits. CHG: some more code clean up.
This commit is contained in:
@@ -20,7 +20,6 @@
|
||||
#include "string.h"
|
||||
#include <stdarg.h>
|
||||
|
||||
|
||||
#include "legicrf.h"
|
||||
#include "../include/hitag2.h"
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
// different initial value (CRC_ICLASS)
|
||||
#include "../common/iso14443crc.h"
|
||||
#include "../common/iso15693tools.h"
|
||||
#include "iso15693tools.h"
|
||||
//#include "iso15693tools.h"
|
||||
|
||||
|
||||
static int timeout = 4096;
|
||||
|
||||
@@ -1816,11 +1816,7 @@ int iso14443a_select_card(byte_t* uid_ptr, iso14a_card_select_t* p_hi14a_card, u
|
||||
ReaderTransmit(sel_uid,sizeof(sel_uid), NULL);
|
||||
|
||||
// Receive the SAK
|
||||
if (!ReaderReceive(resp, resp_par)){
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (!ReaderReceive(resp, resp_par)) return 0;
|
||||
sak = resp[0];
|
||||
|
||||
// Test if more parts of the uid are coming
|
||||
|
||||
@@ -64,8 +64,7 @@
|
||||
#include "string.h"
|
||||
#include "../common/iso15693tools.h"
|
||||
#include "../common/cmd.h"
|
||||
#include "crapto1.h"
|
||||
#include "mifareutil.h"
|
||||
|
||||
|
||||
#define arraylen(x) (sizeof(x)/sizeof((x)[0]))
|
||||
|
||||
@@ -470,8 +469,20 @@ static int GetIso15693AnswerFromSniff(uint8_t *receivedResponse, int maxLen, int
|
||||
// every other is Q. We just want power, so abs(I) + abs(Q) is
|
||||
// close to what we want.
|
||||
if (getNext) {
|
||||
int8_t r;
|
||||
|
||||
dest[c++] = abs(b) + abs(prev);
|
||||
if(b < 0) {
|
||||
r = -b;
|
||||
} else {
|
||||
r = b;
|
||||
}
|
||||
if(prev < 0) {
|
||||
r -= prev;
|
||||
} else {
|
||||
r += prev;
|
||||
}
|
||||
|
||||
dest[c++] = (uint8_t)r;
|
||||
|
||||
if(c >= 20000) {
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user