mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 13:53:55 -07:00
Merge pull request #1646 from lnv42/master
Fix USB communications when receiving empty frames
This commit is contained in:
commit
5a9432f78a
1 changed files with 9 additions and 0 deletions
|
@ -414,6 +414,15 @@ __attribute__((force_align_arg_pointer))
|
|||
}
|
||||
}
|
||||
}
|
||||
else if ((!error) && (length == 0)) { // we received an empty frame
|
||||
if (rx.ng)
|
||||
rx.length = 0; // set received length to 0
|
||||
else { // old frames can't be empty
|
||||
PrintAndLogEx(WARNING, "Received empty MIX packet frame (length: 0x00)");
|
||||
|
||||
error = true;
|
||||
}
|
||||
}
|
||||
if (!error) { // Get the postamble
|
||||
res = uart_receive(sp, (uint8_t *)&rx_raw.foopost, sizeof(PacketResponseNGPostamble), &rxlen);
|
||||
if ((res != PM3_SUCCESS) || (rxlen != sizeof(PacketResponseNGPostamble))) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue