diff --git a/armsrc/hfsnoop.c b/armsrc/hfsnoop.c index 08860da9d..0c9334c99 100644 --- a/armsrc/hfsnoop.c +++ b/armsrc/hfsnoop.c @@ -209,6 +209,6 @@ void HfPlotDownload(void) { FpgaWriteConfWord(FPGA_MAJOR_MODE_OFF); // Trigger a finish downloading signal with an ACK frame - reply_mix(CMD_ACK, 1, 0, FPGA_TRACE_SIZE, 0, 0); + reply_ng(CMD_FPGAMEM_DOWNLOAD, PM3_SUCCESS, NULL, 0); LED_B_OFF(); } diff --git a/client/src/cmdhf.c b/client/src/cmdhf.c index cd58e1647..2c073e262 100644 --- a/client/src/cmdhf.c +++ b/client/src/cmdhf.c @@ -416,10 +416,10 @@ int CmdHFSniff(const char *Cmd) { int handle_hf_plot(void) { - uint8_t buf[FPGA_TRACE_SIZE]; + uint8_t buf[FPGA_TRACE_SIZE] = {0}; PacketResponseNG response; - if (!GetFromDevice(FPGA_MEM, buf, FPGA_TRACE_SIZE, 0, NULL, 0, &response, 4000, true)) { + if (GetFromDevice(FPGA_MEM, buf, FPGA_TRACE_SIZE, 0, NULL, 0, &response, 4000, true) == false) { PrintAndLogEx(WARNING, "timeout while waiting for reply."); return PM3_ETIMEOUT; } diff --git a/client/src/comms.c b/client/src/comms.c index 535b95a61..2b521d2d7 100644 --- a/client/src/comms.c +++ b/client/src/comms.c @@ -834,7 +834,7 @@ bool GetFromDevice(DeviceMemType_t memtype, uint8_t *dest, uint32_t bytes, uint3 return false; } case FPGA_MEM: { - SendCommandMIX(CMD_FPGAMEM_DOWNLOAD, start_index, bytes, 0, NULL, 0); + SendCommandNG(CMD_FPGAMEM_DOWNLOAD, NULL, 0); return dl_it(dest, bytes, response, ms_timeout, show_warning, CMD_FPGAMEM_DOWNLOADED); } } @@ -856,8 +856,8 @@ static bool dl_it(uint8_t *dest, uint32_t bytes, PacketResponseNG *response, siz if (response->cmd == CMD_ACK) return true; - // Spiffs download is converted to NG, - if (response->cmd == CMD_SPIFFS_DOWNLOAD) + // Spiffs // fpgamem-plot download is converted to NG, + if (response->cmd == CMD_SPIFFS_DOWNLOAD || response->cmd == CMD_FPGAMEM_DOWNLOAD) return true; // sample_buf is a array pointer, located in data.c