mirror of
https://github.com/nfc-tools/libnfc.git
synced 2026-02-28 12:46:37 +00:00
Modify pcsc.c to have support for Mifare classic and Ultralight card
Modify pcsc.c and mifare.c files. 1. add code into pcsc.c to have support Mifare classic card. 2. The PCSC reader has SW value, add response data length for PCSC reader
This commit is contained in:
@@ -130,7 +130,9 @@ nfc_initiator_mifare_cmd(nfc_device *pnd, const mifare_cmd mc, const uint8_t ui8
|
||||
|
||||
// When we have executed a read command, copy the received bytes into the param
|
||||
if (mc == MC_READ) {
|
||||
if (res == 16) {
|
||||
|
||||
//Check the length of response data, with PCSC reader, there have 2 bytes for SW value
|
||||
if (res == 16 || res == (16 + 2)) {
|
||||
memcpy(pmp->mpd.abtData, abtRx, 16);
|
||||
} else {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user