This commit is contained in:
iceman1001 2019-04-13 01:46:10 +02:00
parent 6803e6d1c0
commit 618e31e920
2 changed files with 4 additions and 9 deletions

View file

@ -1048,10 +1048,9 @@ static int CmdHF14ACmdRaw(const char *Cmd) {
static int waitCmd(uint8_t iSelect) {
UsbCommand resp;
uint16_t len = 0;
if (WaitForResponseTimeout(CMD_ACK, &resp, 1500)) {
len = (resp.arg[0] & 0xFFFF);
uint16_t len = (resp.arg[0] & 0xFFFF);
if (iSelect) {
len = (resp.arg[1] & 0xFFFF);
if (len) {

View file

@ -123,24 +123,20 @@ static int switch_off_field_14b(void) {
static bool waitCmd14b(bool verbose) {
bool crc = false;
uint8_t data[USB_CMD_DATA_SIZE] = {0x00};
uint8_t status = 0;
uint16_t len = 0;
UsbCommand resp;
if (WaitForResponseTimeout(CMD_ACK, &resp, TIMEOUT)) {
status = (resp.arg[0] & 0xFF);
if (status > 0) return false;
if ((resp.arg[0] & 0xFF) > 0) return false;
len = (resp.arg[1] & 0xFFFF);
uint16_t len = (resp.arg[1] & 0xFFFF);
memcpy(data, resp.d.asBytes, len);
if (verbose) {
if (len >= 3) {
crc = check_crc(CRC_14443_B, data, len);
bool crc = check_crc(CRC_14443_B, data, len);
PrintAndLogEx(NORMAL, "[LEN %u] %s[%02X %02X] %s",
len,