ADD: Added the autodetection of Topaz to "HF SEARCH"
FIX: Fixed a minor bug in "HF SEARCH" where it always found a "14b" tag, making the command never test for other formats afterward the 14b test. The 14b detection is not good still, conflicting return values is main reason for this bug
This commit is contained in:
@@ -750,6 +750,11 @@ int CmdHFSearch(const char *Cmd){
|
||||
PrintAndLog("\nValid ISO15693 Tag Found - Quiting Search\n");
|
||||
return ans;
|
||||
}
|
||||
ans = CmdHFTopazReader("");
|
||||
if (ans == 0) {
|
||||
PrintAndLog("\nValid Topaz Tag Found - Quiting Search\n");
|
||||
return 1;
|
||||
}
|
||||
PrintAndLog("\nno known/supported 13.56 MHz tags found\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -73,16 +73,19 @@ int CmdSrix4kRead(const char *Cmd) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int rawClose(void){
|
||||
static int rawCloseEx(bool silent){
|
||||
UsbCommand resp;
|
||||
UsbCommand c = {CMD_ISO_14443B_COMMAND, {0, 0, 0}};
|
||||
clearCommandBuffer();
|
||||
SendCommand(&c);
|
||||
if (!WaitForResponseTimeout(CMD_ACK,&resp,1000)) {
|
||||
PrintAndLog("Command time-out");
|
||||
return 1;
|
||||
if ( !silent ) PrintAndLog("Command time-out");
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
static int rawClose() {
|
||||
return rawCloseEx(false);
|
||||
}
|
||||
|
||||
int HF14BCmdRaw(bool reply, bool *crc, bool power, uint8_t *data, uint8_t *datalen, bool verbose){
|
||||
|
||||
@@ -306,6 +306,7 @@ int CmdHFTopazReader(const char *Cmd) {
|
||||
topaz_tag.uid[2],
|
||||
topaz_tag.uid[1],
|
||||
topaz_tag.uid[0]);
|
||||
|
||||
PrintAndLog(" UID[6] (Manufacturer Byte) = %02x, Manufacturer: %s",
|
||||
topaz_tag.uid[6],
|
||||
getTagInfo(topaz_tag.uid[6]));
|
||||
|
||||
Reference in New Issue
Block a user