diff --git a/CHANGELOG.md b/CHANGELOG.md index cac7d43db..0dde66bee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ This project uses the changelog in accordance with [keepchangelog](http://keepac ## [unreleased][unreleased] - Added `tools/ePassport` - EF_DG13 is decoded, and a Polish document's PESEL is shown as the personal number when it carries no EF_DG11 (@pkilar) +- Fixed `tools/ePassport` - a disabled button drew Kivy's banded disabled texture, which left its label unreadable (@pkilar) - Fixed `hf 14b` - a card asking for a waiting time extension of 4 or more left the timeout at zero, so any ISO14443-B card needing time to answer looked like it had stopped responding (@pkilar) - Fixed `hf mfdes chk` - now handles `-k` user supplied keys properly (@iceman1001) - Fixed `BigBuf_Clear_keep_EM()` - now also clear the trace length set (@iceman1001) diff --git a/client/src/cmddata.c b/client/src/cmddata.c index 795161717..411515da9 100644 --- a/client/src/cmddata.c +++ b/client/src/cmddata.c @@ -1940,6 +1940,10 @@ static int CmdSamples(const char *Cmd) { int n = arg_get_int_def(ctx, 1, 0); bool verbose = arg_get_lit(ctx, 2); CLIParserFree(ctx); + if (n < 0 || n > MIN(g_pm3_capabilities.bigbuf_size - 1, MAX_GRAPH_TRACE_LEN)) { + PrintAndLogEx(WARNING, "invalid number of samples, must be between 0 and %d", MIN(g_pm3_capabilities.bigbuf_size - 1, MAX_GRAPH_TRACE_LEN)); + return PM3_EINVARG; + } return getSamples(n, verbose); } diff --git a/client/src/cmdlf.c b/client/src/cmdlf.c index 17b682620..bf8186d73 100644 --- a/client/src/cmdlf.c +++ b/client/src/cmdlf.c @@ -872,7 +872,7 @@ int CmdLFRead(const char *Cmd) { "Sniff low frequency signal.\n" " - use " _YELLOW_("`lf config`") _CYAN_(" to set parameters.\n") _CYAN_(" - use ") _YELLOW_("`data plot`") _CYAN_(" to look at it.\n") - _CYAN_("If the number of samples is more than the device memory limit (40000 now), ") + _CYAN_("If the number of samples is more than the device memory limit, ") _CYAN_("it will try to use the real-time sampling mode."), "lf read -v -s 12000 --> collect 12000 samples\n" "lf read -s 3000 -@ --> oscilloscope style \n" @@ -891,9 +891,9 @@ int CmdLFRead(const char *Cmd) { bool cm = arg_get_lit(ctx, 3); CLIParserFree(ctx); - // the 40000 there should be the result of BigBuf_max_traceLen(), + // it should be the result of BigBuf_max_traceLen(), // but IDK how to get it. - bool realtime = samples > 40000; + bool realtime = samples >= g_pm3_capabilities.bigbuf_size; if (g_session.pm3_present == false) return PM3_ENOTTY; @@ -1000,7 +1000,7 @@ int CmdLFSniff(const char *Cmd) { " - use " _YELLOW_("`lf config`") _CYAN_(" to set parameters.\n") _CYAN_(" - use ") _YELLOW_("`data plot`") _CYAN_(" to look at sniff signal.\n") _CYAN_(" - use ") _YELLOW_("`lf search -1`") _CYAN_(" to see if signal can be automatic decoded.\n") - _CYAN_("If the number of samples is more than the device memory limit (40000 now), ") + _CYAN_("If the number of samples is more than the device memory limit, ") _CYAN_("it will try to use the real-time sampling mode."), "lf sniff -v\n" "lf sniff -s 3000 -@ --> oscilloscope style \n" @@ -1019,9 +1019,9 @@ int CmdLFSniff(const char *Cmd) { bool cm = arg_get_lit(ctx, 3); CLIParserFree(ctx); - // the 40000 there should be the result of BigBuf_max_traceLen(), + // it should be the result of BigBuf_max_traceLen(), // but IDK how to get it. - bool realtime = samples > 40000; + bool realtime = samples >= g_pm3_capabilities.bigbuf_size; if (g_session.pm3_present == false) return PM3_ENOTTY; @@ -1847,14 +1847,14 @@ int CmdLFRelay(const char *Cmd) { CLIParserContext *ctx; CLIParserInit(&ctx, "lf relay", "Relay LF signal between two Proxmark3 devices over TCP.\n" - "By default it uses PORT 8000 and uses 40000 samples from Graphbuffer\n" + "By default it uses PORT 8000 and uses 30000 samples from Graphbuffer\n" " --rdr : Reading device, act as IP client and reads LF tag and sends data\n" " --tag : Simulation device, act as IP server and simulates relayed data\n", _WHITE_("Device A, reading LF tag, client") "\n" "lf relay --rdr --ip 192.168.1.141 -> Client, connect to IP 192.168.1.141:8000\n" "lf relay --rdr --ip 192.168.1.141 -p 18111 -> Client, connect to IP 192.168.1.141:18111 \n\n" _WHITE_("Device B, simulate LF tag, server") "\n" - "lf relay --tag -p 8111 -> Server listening port 8111, recv 40000 samples\n" + "lf relay --tag -p 8111 -> Server listening port 8111, recv 30000 samples\n" "lf relay --tag -s 10000 -> Server listening port 8000, recv 10000 samples\n" ); @@ -1863,7 +1863,7 @@ int CmdLFRelay(const char *Cmd) { arg_lit0(NULL, "tag", "Simulation device, act as Server"), arg_lit0(NULL, "rdr", "Sniffing device, act as client"), arg_str0("i", "ip", "", "Target IPv4 address to send data to. Used with `--rdr`"), - arg_u64_0("s", "samples", "", "Number of samples to collect (def: 40000)"), + arg_u64_0("s", "samples", "", "Number of samples to collect (def: 30000)"), arg_u64_0("p", "port", "", "Port number (def: 8000)"), arg_param_end }; @@ -1877,7 +1877,7 @@ int CmdLFRelay(const char *Cmd) { char ip[256] = { 0 }; CLIParamStrToBuf(arg_get_str(ctx, 3), (uint8_t *)ip, sizeof(ip), &iplen); - uint64_t samples = arg_get_u64_def(ctx, 4, 40000); + uint64_t samples = arg_get_u64_def(ctx, 4, 30000); uint16_t port = arg_get_u32_def(ctx, 5, 8000) & 0xFFFF; CLIParserFree(ctx); diff --git a/client/src/cmdlfcotag.c b/client/src/cmdlfcotag.c index f016e3ed8..5ef8b9b28 100644 --- a/client/src/cmdlfcotag.c +++ b/client/src/cmdlfcotag.c @@ -452,7 +452,7 @@ static int CmdCOTAGReader(const char *Cmd) { "(which is assumed " STR(LF_COTAG_DIVISOR) " for cotag. Use --divisor to override).\n") _CYAN_(" - use ") _YELLOW_("`data plot`") _CYAN_(" to look at it.\n") _CYAN_(" - use ") _YELLOW_("`lf cotag demod`") _CYAN_(" to try to demodulate it.\n") - _CYAN_("If the number of samples is more than the device memory limit (40000 now), ") + _CYAN_("If the number of samples is more than the device memory limit, ") _CYAN_("it will try to use the real-time sampling mode.\n\n") _CYAN_("Note: Cotag has an extremely slow data rate - RF/" STR(LF_COTAG_CLOCK) " ") _CYAN_("-- capturing a full " STR(LF_COTAG_DATA_LEN) " bit card read requires a minimum of ") @@ -477,7 +477,7 @@ static int CmdCOTAGReader(const char *Cmd) { int16_t divisor = arg_get_int_def(ctx, 4, -1); CLIParserFree(ctx); - bool realtime = (samples > 40000); + bool realtime = (samples >= g_pm3_capabilities.bigbuf_size); if (divisor > -1 && (divisor < 19 || divisor > 255)) { PrintAndLogEx(ERR, "divisor must be between 19 and 255"); diff --git a/client/src/cmdmain.c b/client/src/cmdmain.c index a6e5d5403..ff76638bb 100644 --- a/client/src/cmdmain.c +++ b/client/src/cmdmain.c @@ -50,6 +50,7 @@ #include "preferences.h" #include "cliparser.h" #include "cmdmqtt.h" +#include "graph.h" // MAX_GRAPH_TRACE_LEN static int CmdHelp(const char *Cmd); @@ -175,7 +176,7 @@ static int CmdAuto(const char *Cmd) { CmdPlot(""); - lf_read(false, 40000); + lf_read(false, MIN(g_pm3_capabilities.bigbuf_size - 1, MAX_GRAPH_TRACE_LEN)); char *fname = calloc(100, sizeof(uint8_t)); if (fname == NULL) { diff --git a/client/src/pm3_dsp.h b/client/src/pm3_dsp.h index 1920ac026..04bf39372 100644 --- a/client/src/pm3_dsp.h +++ b/client/src/pm3_dsp.h @@ -21,6 +21,7 @@ #include #include "common.h" +#include "graph.h" // MAX_GRAPH_TRACE_LEN #ifdef __cplusplus extern "C" { @@ -28,7 +29,7 @@ extern "C" { #define PM3_DSP_MAX_FFT 262144 #define PM3_DSP_DC_GUARD 2 -#define PM3_DSP_MAX_RESAMPLE (40000 * 32) +#define PM3_DSP_MAX_RESAMPLE (MAX_GRAPH_TRACE_LEN * 32) #define PM3_DSP_NYQUIST_CLK 2.5 #define PM3_DSP_ENVELOPE_SMOOTH 8 #define PM3_DSP_ENVELOPE_DEPTH 0.6 diff --git a/doc/cheatsheet.md b/doc/cheatsheet.md index dc667766c..443f59f22 100644 --- a/doc/cheatsheet.md +++ b/doc/cheatsheet.md @@ -627,7 +627,7 @@ pm3 --> lf t55xx wipe ## Data ^[Top](#top) -Get raw samples [512-40000] +Get raw samples, between 512 and Bigbuf_size ``` pm3 --> data samples -n ``` diff --git a/doc/md/PM5_Start_Here/BWM-USAGE.md b/doc/md/PM5_Start_Here/BWM-USAGE.md index 485dbaab2..d88e0afdd 100644 --- a/doc/md/PM5_Start_Here/BWM-USAGE.md +++ b/doc/md/PM5_Start_Here/BWM-USAGE.md @@ -331,7 +331,7 @@ hw bwmwifi --stop - Bulk transfers over BLE/WiFi (`lf read`, `mem dump`, trace download) are paced by the BWM flow control so they don't drop — expect them to be **slower than USB**. -- COTAG / large realtime LF reads (**> 40000 samples**) use a separate streaming +- COTAG / large realtime LF reads use a separate streaming path and are **not** covered by this flow control. - All BWM commands are **PM5-only** and require the firmware built with `PLATFORM_EXTRAS=BWM`. diff --git a/tools/ePassport/epassport/ui/app.kv b/tools/ePassport/epassport/ui/app.kv index 6f06a5bd0..b506150e7 100644 --- a/tools/ePassport/epassport/ui/app.kv +++ b/tools/ePassport/epassport/ui/app.kv @@ -7,6 +7,13 @@ #:import ScanScreen epassport.ui.scan.ScanScreen #:import BinButton epassport.ui.widgets.binbutton.BinButton +# Kivy's disabled button texture is pale at the edges and dark in the middle, +# which stretches into three bands and leaves the label unreadable. Keep the +# normal background and let the dimmed text carry the disabled state. +