added function 4x50_watch
This commit is contained in:
@@ -1049,6 +1049,10 @@ static void PacketReceived(PacketCommandNG *packet) {
|
||||
em4x50_reset();
|
||||
break;
|
||||
}
|
||||
case CMD_LF_EM4X50_WATCH: {
|
||||
em4x50_watch();
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef WITH_ISO15693
|
||||
|
||||
@@ -1403,3 +1403,48 @@ int em4x50_standalone_read(uint64_t *words) {
|
||||
|
||||
return now;
|
||||
}
|
||||
|
||||
void em4x50_watch() {
|
||||
|
||||
// reads continuously and displays standard reads of tag
|
||||
|
||||
int now = 0;
|
||||
|
||||
init_tag();
|
||||
em4x50_setup_read();
|
||||
|
||||
while (BUTTON_PRESS() == false) {
|
||||
|
||||
WDT_HIT();
|
||||
init_tag();
|
||||
now = 0;
|
||||
|
||||
if (get_signalproperties() && find_em4x50_tag()) {
|
||||
|
||||
standard_read(&now);
|
||||
|
||||
if (now > 0) {
|
||||
|
||||
Dbprintf("");
|
||||
for (int i = 0; i < now; i++) {
|
||||
|
||||
Dbprintf("EM4x50 TAG ID: "
|
||||
_GREEN_("%02x%02x%02x%02x") " (msb) - "
|
||||
_GREEN_("%02x%02x%02x%02x") " (lsb)",
|
||||
tag.sectors[i][0],
|
||||
tag.sectors[i][1],
|
||||
tag.sectors[i][2],
|
||||
tag.sectors[i][3],
|
||||
reflect8(tag.sectors[i][3]),
|
||||
reflect8(tag.sectors[i][2]),
|
||||
reflect8(tag.sectors[i][1]),
|
||||
reflect8(tag.sectors[i][0]));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
LOW(GPIO_SSC_DOUT);
|
||||
lf_finalize();
|
||||
reply_ng(CMD_ACK, 1, 0, 0);
|
||||
}
|
||||
|
||||
@@ -31,5 +31,6 @@ void em4x50_wipe(em4x50_data_t *etd);
|
||||
void em4x50_brute(em4x50_data_t *etd);
|
||||
void em4x50_login(em4x50_data_t *etd);
|
||||
void em4x50_reset(void);
|
||||
void em4x50_watch(void);
|
||||
|
||||
#endif /* EM4X50_H */
|
||||
|
||||
Reference in New Issue
Block a user