mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 21:03:48 -07:00
lf config alone shows current config
This commit is contained in:
parent
159b90c002
commit
42cb2a32e8
3 changed files with 15 additions and 3 deletions
|
@ -685,6 +685,10 @@ static void PacketReceived(PacketCommandNG *packet) {
|
||||||
setT55xxConfig(packet->oldarg[0], (t55xx_configurations_t *) packet->data.asBytes);
|
setT55xxConfig(packet->oldarg[0], (t55xx_configurations_t *) packet->data.asBytes);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case CMD_LF_SAMPLING_GET_CONFIG: {
|
||||||
|
printConfig();
|
||||||
|
break;
|
||||||
|
}
|
||||||
case CMD_LF_SAMPLING_SET_CONFIG: {
|
case CMD_LF_SAMPLING_SET_CONFIG: {
|
||||||
setSamplingConfig((sample_config *) packet->data.asBytes);
|
setSamplingConfig((sample_config *) packet->data.asBytes);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -117,6 +117,8 @@ static int usage_lf_config(void) {
|
||||||
PrintAndLogEx(NORMAL, " t <threshold> Sets trigger threshold. 0 means no threshold (range: 0-128)");
|
PrintAndLogEx(NORMAL, " t <threshold> Sets trigger threshold. 0 means no threshold (range: 0-128)");
|
||||||
PrintAndLogEx(NORMAL, " s <samplestoskip> Sets a number of samples to skip before capture. Default: 0");
|
PrintAndLogEx(NORMAL, " s <samplestoskip> Sets a number of samples to skip before capture. Default: 0");
|
||||||
PrintAndLogEx(NORMAL, "Examples:");
|
PrintAndLogEx(NORMAL, "Examples:");
|
||||||
|
PrintAndLogEx(NORMAL, " lf config");
|
||||||
|
PrintAndLogEx(NORMAL, " Shows current config");
|
||||||
PrintAndLogEx(NORMAL, " lf config b 8 L");
|
PrintAndLogEx(NORMAL, " lf config b 8 L");
|
||||||
PrintAndLogEx(NORMAL, " Samples at 125 kHz, 8bps.");
|
PrintAndLogEx(NORMAL, " Samples at 125 kHz, 8bps.");
|
||||||
PrintAndLogEx(NORMAL, " lf config H b 4 d 3");
|
PrintAndLogEx(NORMAL, " lf config H b 4 d 3");
|
||||||
|
@ -446,7 +448,7 @@ int CmdFlexdemod(const char *Cmd) {
|
||||||
return PM3_SUCCESS;
|
return PM3_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
int CmdLFSetConfig(const char *Cmd) {
|
int CmdLFConfig(const char *Cmd) {
|
||||||
|
|
||||||
if (!session.pm3_present) return PM3_ENOTTY;
|
if (!session.pm3_present) return PM3_ENOTTY;
|
||||||
|
|
||||||
|
@ -523,7 +525,12 @@ int CmdLFSetConfig(const char *Cmd) {
|
||||||
}
|
}
|
||||||
|
|
||||||
//Validations
|
//Validations
|
||||||
if (errors || cmdp == 0) return usage_lf_config();
|
if (errors) return usage_lf_config();
|
||||||
|
if (cmdp == 0) {
|
||||||
|
clearCommandBuffer();
|
||||||
|
SendCommandNG(CMD_LF_SAMPLING_GET_CONFIG, NULL, 0);
|
||||||
|
return PM3_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
//Bps is limited to 8
|
//Bps is limited to 8
|
||||||
if (bps >> 4) bps = 8;
|
if (bps >> 4) bps = 8;
|
||||||
|
@ -1298,7 +1305,7 @@ static command_t CommandTable[] = {
|
||||||
{"viking", CmdLFViking, AlwaysAvailable, "{ Viking RFIDs... }"},
|
{"viking", CmdLFViking, AlwaysAvailable, "{ Viking RFIDs... }"},
|
||||||
{"visa2000", CmdLFVisa2k, AlwaysAvailable, "{ Visa2000 RFIDs... }"},
|
{"visa2000", CmdLFVisa2k, AlwaysAvailable, "{ Visa2000 RFIDs... }"},
|
||||||
{"", CmdHelp, AlwaysAvailable, ""},
|
{"", CmdHelp, AlwaysAvailable, ""},
|
||||||
{"config", CmdLFSetConfig, IfPm3Lf, "Set config for LF sampling, bit/sample, decimation, frequency"},
|
{"config", CmdLFConfig, IfPm3Lf, "Get/Set config for LF sampling, bit/sample, decimation, frequency"},
|
||||||
{"cmdread", CmdLFCommandRead, IfPm3Lf, "<off period> <'0' period> <'1' period> <command> ['h' 134] \n\t\t-- Modulate LF reader field to send command before read (all periods in microseconds)"},
|
{"cmdread", CmdLFCommandRead, IfPm3Lf, "<off period> <'0' period> <'1' period> <command> ['h' 134] \n\t\t-- Modulate LF reader field to send command before read (all periods in microseconds)"},
|
||||||
{"read", CmdLFRead, IfPm3Lf, "['s' silent] Read 125/134 kHz LF ID-only tag. Do 'lf read h' for help"},
|
{"read", CmdLFRead, IfPm3Lf, "['s' silent] Read 125/134 kHz LF ID-only tag. Do 'lf read h' for help"},
|
||||||
{"search", CmdLFfind, AlwaysAvailable, "[offline] ['u'] Read and Search for valid known tag (in offline mode it you can load first then search) \n\t\t-- 'u' to search for unknown tags"},
|
{"search", CmdLFfind, AlwaysAvailable, "[offline] ['u'] Read and Search for valid known tag (in offline mode it you can load first then search) \n\t\t-- 'u' to search for unknown tags"},
|
||||||
|
|
|
@ -373,6 +373,7 @@ typedef struct {
|
||||||
#define CMD_LF_T55XX_WAKEUP 0x0224
|
#define CMD_LF_T55XX_WAKEUP 0x0224
|
||||||
#define CMD_LF_COTAG_READ 0x0225
|
#define CMD_LF_COTAG_READ 0x0225
|
||||||
#define CMD_LF_T55XX_SET_CONFIG 0x0226
|
#define CMD_LF_T55XX_SET_CONFIG 0x0226
|
||||||
|
#define CMD_LF_SAMPLING_GET_CONFIG 0x0227
|
||||||
|
|
||||||
#define CMD_LF_T55XX_CHK_PWDS 0x0230
|
#define CMD_LF_T55XX_CHK_PWDS 0x0230
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue