X-Git-Url: http://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/8b576d2d3125081ab24a970f6430044a19a4231d..044a375b953c2ee834e457e9bf17853b2047681f:/client/command.c diff --git a/client/command.c b/client/command.c index 9bfb18f2..a2c567e6 100644 --- a/client/command.c +++ b/client/command.c @@ -93,6 +93,12 @@ static void CmdTune(char *str) SendCommand(&c); } +static void CmdHiTune(char *str) +{ + UsbCommand c={CMD_MEASURE_ANTENNA_TUNING_HF}; + SendCommand(&c); +} + static void CmdHi15read(char *str) { UsbCommand c={CMD_ACQUIRE_RAW_ADC_SAMPLES_ISO_15693}; @@ -847,7 +853,15 @@ static int CmdHisamplest(char *str, int nrlow) static void CmdHexsamples(char *str) { int i, j, n; - int requested = strtol(str, NULL, 0); + int requested = 0; + int offset = 0; + sscanf(str, "%i %i", &requested, &offset); + if (offset % 4!=0) { + PrintToScrollback("Offset must be a multiple of 4"); + return; + } + offset = offset/4; + int delivered = 0; if (requested == 0) { @@ -857,7 +871,7 @@ static void CmdHexsamples(char *str) n = requested/4; } - for(i = 0; i < n; i += 12) { + for(i = offset; i < n+offset; i += 12) { UsbCommand c = {CMD_DOWNLOAD_RAW_ADC_SAMPLES_125K, {i, 0, 0}}; SendCommand(&c); wait_for_response(CMD_DOWNLOADED_RAW_ADC_SAMPLES_125K); @@ -2825,6 +2839,7 @@ static struct { /* low-level hardware control */ {"fpgaoff", CmdFPGAOff, 0, "Set FPGA off"}, {"tune", CmdTune, 0, "Measure antenna tuning"}, + {"hitune", CmdHiTune, 0, "Continuously measure HF antenna tuning"}, {"readmem", CmdReadmem, 0, "[address] -- Read memory at decimal address from flash"}, {"reset", CmdReset, 0, "Reset the Proxmark3"}, {"setlfdivisor", CmdSetDivisor, 0, "<19 - 255> -- Drive LF antenna at 12Mhz/(divisor+1)"}, @@ -2836,7 +2851,7 @@ static struct { /* data transfer functions */ {"bitsamples", CmdBitsamples, 0, "Get raw samples as bitstring"}, - {"hexsamples", CmdHexsamples, 0, " -- Dump big buffer as hex bytes"}, + {"hexsamples", CmdHexsamples, 0, " [] -- Dump big buffer as hex bytes"}, {"higet", CmdHi14read_sim, 0, " -- Get samples HF, 'analog'"}, {"hisamples", CmdHisamples, 0, "Get raw samples for HF tag"}, {"hisampless", CmdHisampless, 0, " -- Get signed raw samples, HF tag"},