mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-01-23 08:27:51 +08: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);
|
||||
|
||||
PacketResponseNG resp;
|
||||
|
||||
struct pupload {
|
||||
uint8_t flag;
|
||||
uint16_t offset;
|
||||
|
@ -726,9 +728,12 @@ int CmdLFSim(const char *Cmd) {
|
|||
for (uint16_t j = 0; j < len; j++)
|
||||
payload_up.data[j] = GraphBuffer[i + j];
|
||||
|
||||
|
||||
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(".");
|
||||
fflush(stdout);
|
||||
payload_up.flag = 0;
|
||||
|
@ -750,7 +755,6 @@ int CmdLFSim(const char *Cmd) {
|
|||
clearCommandBuffer();
|
||||
SendCommandNG(CMD_LF_SIMULATE, (uint8_t *)&payload, sizeof(payload));
|
||||
|
||||
PacketResponseNG resp;
|
||||
WaitForResponse(CMD_LF_SIMULATE, &resp);
|
||||
|
||||
PrintAndLogEx(INFO, "Done");
|
||||
|
|
Loading…
Reference in a new issue