]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - winsrc/command.cpp
fix debug printing function, add readmem function
[proxmark3-svn] / winsrc / command.cpp
index 86b0d4466e62abdfdb0c5dc23809694522422dc0..485eff5240dafb70205c1e90587fe6d22d4bca9c 100644 (file)
@@ -2520,6 +2520,14 @@ static void CmdHIDsimTAG(char *str)
        SendCommand(&c, FALSE);\r
 }\r
 \r
+static void CmdReadmem(char *str)\r
+{\r
+       UsbCommand c;\r
+       c.cmd = CMD_READ_MEM;\r
+       c.ext1 = atoi(str);\r
+       SendCommand(&c, FALSE);\r
+}\r
+\r
 static void CmdLcdReset(char *str)\r
 {\r
        UsbCommand c;\r
@@ -2619,7 +2627,7 @@ static struct {
        {"hisamplest",          CmdHi14readt,0,         "    Get samples HF, for testing"},\r
        {"hisimlisten",         CmdHisimlisten,0,       "    Get HF samples as fake tag"},\r
        {"hpf",                         CmdHpf,1,               "    Remove DC offset from trace"},\r
-       {"indalademod",         CmdIndalademod,0,         "['224'] -- Demodulate samples for Indala 64 bit UID (option '224' for 224 bit)"},\r
+       {"indalademod",         CmdIndalademod,0,         "['224'] -- Demodulate samples for Indala 64 bit UID (option '224' for 224 bit)"},\r
        {"lcd",                         CmdLcd,0,                       "<HEX command> <count> -- Send command/data to LCD"},\r
        {"lcdreset",                    CmdLcdReset,0,          "    Hardware reset LCD"},\r
        {"load",                                CmdLoad,1,              "<filename> -- Load trace (to graph window"},\r
@@ -2633,12 +2641,13 @@ static struct {
        {"norm",                                CmdNorm,1,              "    Normalize max/min to +/-500"},\r
        {"plot",                                CmdPlot,1,              "    Show graph window"},\r
        {"quit",                                CmdQuit,1,                      "    Quit program"},\r
+       {"readmem",                     CmdReadmem,0,                   "    [address] Read memory at decimal address from flash"},\r
        {"reset",                       CmdReset,0,                     "    Reset the Proxmark3"},\r
        {"save",                                CmdSave,1,              "<filename> -- Save trace (from graph window)"},\r
        {"scale",                       CmdScale,1,             "<int> -- Set cursor display scale"},\r
        {"setlfdivisor",                CmdSetDivisor,0,        "<19 - 255> -- Drive LF antenna at 12Mhz/(divisor+1)"},\r
        {"sri512read",          CmdSri512read,0,        "<int> -- Read contents of a SRI512 tag"},\r
-       {"sweeplf",                     CmdSweepLF,0,           "    Sweep through LF freq range and store results in buffer"},\r
+       {"sweeplf",                     CmdSweepLF,0,           "    Sweep through LF freq range, store results in buffer and show resonant frequency of antenna"},\r
        {"tibits",                      CmdTibits,0,            "    Get raw bits for TI-type LF tag"},\r
        {"tidemod",                     CmdTidemod,0,           "    Demodulate raw bits for TI-type LF tag"},\r
        {"tiread",                      CmdTiread,0,            "    Read a TI-type 134 kHz tag"},\r
@@ -2653,7 +2662,8 @@ static struct {
        char *argshelp;\r
        char *description;\r
        }       CommandExtendedHelp[]= {\r
-               {"detectreader","'l'|'h'","'l' specifies LF antenna scan only, 'h' specifies HF antenna scan only.","Monitor antenna for changes in voltage. Output is in three fields: CHANGED, CURRENT, PERIOD,\nwhere CHANGED is the value just changed from, CURRENT is the current value and PERIOD is the\nnumber of program loops since the last change.\n\nThe RED LED indicates LF field detected, and the GREEN LED indicates HF field detected.\n"},\r
+               {"detectreader","'l'|'h'","'l' specifies LF antenna scan only, 'h' specifies HF antenna scan only.","Monitor antenna for changes in voltage. Output is in three fields: CHANGED, CURRENT, PERIOD,\nwhere CHANGED is the value just changed from, CURRENT is the current value and PERIOD is the\nnumber of program loops since the last change.\n\nThe RED LED indicates LF field detected, and the GREEN LED indicates HF field detected."},\r
+               {"sweeplf","","","Drive LF antenna at all divisor range values (19 - 255) and store the results in the output\nbuffer. Issuing 'losamples' and then 'plot' commands will display the resulting peak. 12MHz\ndivided by the peak's position plus one gives the antenna's resonant frequency. For convenience,\nthis value is also printed out by the command."},\r
                };\r
 \r
 //-----------------------------------------------------------------------------\r
@@ -2676,6 +2686,7 @@ void CommandReceived(char *cmd)
                                        PrintToScrollback("\nExtended help for '%s':\n", cmd);\r
                                        PrintToScrollback("Args: %s\t- %s\n",CommandExtendedHelp[i].args,CommandExtendedHelp[i].argshelp);\r
                                        PrintToScrollback(CommandExtendedHelp[i].description);\r
+                                       PrintToScrollback("");\r
                                        return;\r
                                }\r
                        }\r
@@ -2693,7 +2704,7 @@ void CommandReceived(char *cmd)
                        PrintToScrollback("%s", line);\r
                }\r
                PrintToScrollback("");\r
-               PrintToScrollback("'help <command>' for extended help on that command");\r
+               PrintToScrollback("'help <command>' for extended help on that command\n");\r
                return;\r
        }\r
 \r
Impressum, Datenschutz