Fix #1499 hf 15 restore and fix trace list -t 15 writeblock

This commit is contained in:
Philippe Teuwen committed 2021-09-07 10:04:01 +02:00
1 parent c326c25905
commit 3e39689b6e
3 files changed
+7 -4

No files matched your search

+1 -1
View File
@@ -2028,7 +2028,7 @@ static int CmdHF15Restore(const char *Cmd) {
uint16_t i = 0;
while (bytes < datalen) {
req[reqlen + 1] = i;
req[reqlen] = i;
// copy over the data to the request
memcpy(req + reqlen + 1, data + bytes, blocksize);
AddCrc15(req, reqlen + 1 + blocksize);
+5 -3
View File
@@ -470,10 +470,10 @@ void annotateIso15693(char *exp, size_t size, uint8_t *cmd, uint8_t cmdsize) {
case ISO15693_READBLOCK: {
uint8_t block = 0;
if (cmdsize == 13)
block = cmd[10];
else if (cmdsize == 5)
if (cmdsize == 5)
block = cmd[2];
else if (cmdsize == 13) // with UID
block = cmd[10];
snprintf(exp, size, "READBLOCK(%d)", block);
return;
@@ -482,6 +482,8 @@ void annotateIso15693(char *exp, size_t size, uint8_t *cmd, uint8_t cmdsize) {
uint8_t block = 0;
if (cmdsize == 9)
block = cmd[2];
else if (cmdsize == 9 + 8) // with UID
block = cmd[2 + 8];
snprintf(exp, size, "WRITEBLOCK(%d)", block);
return;
}