mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 13:53:55 -07:00
new frame format, smaller and with crc. Some code simplified
This commit is contained in:
parent
34467b7550
commit
44bbb7d2c7
7 changed files with 70 additions and 52 deletions
|
@ -445,12 +445,13 @@ static int CmdPingNG(const char *Cmd) {
|
|||
PrintAndLogEx(NORMAL, "Pinging with payload len=%d", len);
|
||||
clearCommandBuffer();
|
||||
UsbCommand resp;
|
||||
UsbCommand c = {CMD_PING, {len, 0, 0}, {{0}}};
|
||||
uint8_t data[USB_CMD_DATA_SIZE] = {0};
|
||||
uint16_t cmd = CMD_PING;
|
||||
if (len >= 4)
|
||||
c.d.asDwords[0] = 0xAABBCCDD;
|
||||
((uint32_t *)data)[0]=0xAABBCCDD;
|
||||
if (len >= 8)
|
||||
c.d.asDwords[(len-1)/4] = 0xDDCCBBAA;
|
||||
SendCommandNG(&c, len);
|
||||
((uint32_t *)data)[(len-1)/4] = 0xDDCCBBAA;
|
||||
SendCommandNG(cmd, data, len);
|
||||
if (WaitForResponseTimeout(CMD_ACK, &resp, 1000)) {
|
||||
PrintAndLogEx(NORMAL, "PingNG successful");
|
||||
if (len >= 4)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue