mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 13:23:51 -07:00
next version of half duplex simulation
This commit is contained in:
parent
eea63a6cb7
commit
f6868aadf9
2 changed files with 13 additions and 3 deletions
|
@ -1248,6 +1248,7 @@ int CmdEM4x50Test(const char *Cmd) {
|
||||||
"lf em 4x50 test --field off -> reader field off\n"
|
"lf em 4x50 test --field off -> reader field off\n"
|
||||||
"lf em 4x50 test --check -> check on/off status of reader field\n"
|
"lf em 4x50 test --check -> check on/off status of reader field\n"
|
||||||
"lf em 4x50 test --cycles 100 -> measure time of 100 field cycles\n"
|
"lf em 4x50 test --cycles 100 -> measure time of 100 field cycles\n"
|
||||||
|
"lf em 4x50 test --reset -> intitiate reset command\n"
|
||||||
);
|
);
|
||||||
|
|
||||||
void *argtable[] = {
|
void *argtable[] = {
|
||||||
|
@ -1255,6 +1256,7 @@ int CmdEM4x50Test(const char *Cmd) {
|
||||||
arg_str0(NULL, "field", "on/off", "field on/off"),
|
arg_str0(NULL, "field", "on/off", "field on/off"),
|
||||||
arg_lit0(NULL, "check", "check if field is on or off"),
|
arg_lit0(NULL, "check", "check if field is on or off"),
|
||||||
arg_int0(NULL, "cycles", "<dec>", "number of field cycles"),
|
arg_int0(NULL, "cycles", "<dec>", "number of field cycles"),
|
||||||
|
arg_lit0(NULL, "reset", "initiates a manual reset command"),
|
||||||
arg_param_end
|
arg_param_end
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1280,6 +1282,8 @@ int CmdEM4x50Test(const char *Cmd) {
|
||||||
ett.check_field = arg_get_lit(ctx, 2);
|
ett.check_field = arg_get_lit(ctx, 2);
|
||||||
// option: cycles
|
// option: cycles
|
||||||
ett.cycles = arg_get_int_def(ctx, 3, 0);
|
ett.cycles = arg_get_int_def(ctx, 3, 0);
|
||||||
|
// option: reset
|
||||||
|
ett.reset = arg_get_lit(ctx, 4);
|
||||||
|
|
||||||
CLIParserFree(ctx);
|
CLIParserFree(ctx);
|
||||||
|
|
||||||
|
@ -1295,8 +1299,13 @@ int CmdEM4x50Test(const char *Cmd) {
|
||||||
PrintAndLogEx(SUCCESS, "Field switched " _GREEN_("on"));
|
PrintAndLogEx(SUCCESS, "Field switched " _GREEN_("on"));
|
||||||
if (ett.check_field == 1)
|
if (ett.check_field == 1)
|
||||||
PrintAndLogEx(SUCCESS, "Field status evaluated");
|
PrintAndLogEx(SUCCESS, "Field status evaluated");
|
||||||
|
if (ett.reset == 1)
|
||||||
|
PrintAndLogEx(SUCCESS, "reset command " _GREEN_("ok"));
|
||||||
} else if (resp.status == 0) {
|
} else if (resp.status == 0) {
|
||||||
|
if (ett.field == 1)
|
||||||
PrintAndLogEx(SUCCESS, "Field switched " _GREEN_("off"));
|
PrintAndLogEx(SUCCESS, "Field switched " _GREEN_("off"));
|
||||||
|
if (ett.reset == 1)
|
||||||
|
PrintAndLogEx(SUCCESS, "reset command " _GREEN_("failed"));
|
||||||
} else if (resp.status == -1) {
|
} else if (resp.status == -1) {
|
||||||
PrintAndLogEx(INFO, "Nothing done");
|
PrintAndLogEx(INFO, "Nothing done");
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -52,6 +52,7 @@ typedef struct {
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
bool check_field;
|
bool check_field;
|
||||||
|
bool reset;
|
||||||
int field;
|
int field;
|
||||||
int cycles;
|
int cycles;
|
||||||
} PACKED em4x50_test_t;
|
} PACKED em4x50_test_t;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue