mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 13:23:51 -07:00
chg: "lf sim" - now only fills until bigbuffer is full
This commit is contained in:
parent
31ccc7d7ca
commit
fa44eee82c
1 changed files with 7 additions and 3 deletions
|
@ -702,6 +702,8 @@ int CmdLFSim(const char *Cmd) {
|
||||||
|
|
||||||
PrintAndLogEx(DEBUG, "DEBUG: Uploading %zu bytes", GraphTraceLen);
|
PrintAndLogEx(DEBUG, "DEBUG: Uploading %zu bytes", GraphTraceLen);
|
||||||
|
|
||||||
|
PacketResponseNG resp;
|
||||||
|
|
||||||
struct pupload {
|
struct pupload {
|
||||||
uint8_t flag;
|
uint8_t flag;
|
||||||
uint16_t offset;
|
uint16_t offset;
|
||||||
|
@ -726,9 +728,12 @@ int CmdLFSim(const char *Cmd) {
|
||||||
for (uint16_t j = 0; j < len; j++)
|
for (uint16_t j = 0; j < len; j++)
|
||||||
payload_up.data[j] = GraphBuffer[i + j];
|
payload_up.data[j] = GraphBuffer[i + j];
|
||||||
|
|
||||||
|
|
||||||
SendCommandNG(CMD_LF_UPLOAD_SIM_SAMPLES, (uint8_t *)&payload_up, sizeof(struct pupload));
|
SendCommandNG(CMD_LF_UPLOAD_SIM_SAMPLES, (uint8_t *)&payload_up, sizeof(struct pupload));
|
||||||
WaitForResponse(CMD_LF_UPLOAD_SIM_SAMPLES, NULL);
|
WaitForResponse(CMD_LF_UPLOAD_SIM_SAMPLES, &resp);
|
||||||
|
if (resp.status != PM3_SUCCESS) {
|
||||||
|
PrintAndLogEx(INFO, "Bigbuf is full.");
|
||||||
|
break;
|
||||||
|
}
|
||||||
printf(".");
|
printf(".");
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
payload_up.flag = 0;
|
payload_up.flag = 0;
|
||||||
|
@ -750,7 +755,6 @@ int CmdLFSim(const char *Cmd) {
|
||||||
clearCommandBuffer();
|
clearCommandBuffer();
|
||||||
SendCommandNG(CMD_LF_SIMULATE, (uint8_t *)&payload, sizeof(payload));
|
SendCommandNG(CMD_LF_SIMULATE, (uint8_t *)&payload, sizeof(payload));
|
||||||
|
|
||||||
PacketResponseNG resp;
|
|
||||||
WaitForResponse(CMD_LF_SIMULATE, &resp);
|
WaitForResponse(CMD_LF_SIMULATE, &resp);
|
||||||
|
|
||||||
PrintAndLogEx(INFO, "Done");
|
PrintAndLogEx(INFO, "Done");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue