diff --git a/libfreefare/mifare_classic.c b/libfreefare/mifare_classic.c index 3bf1a9c..ffb7853 100644 --- a/libfreefare/mifare_classic.c +++ b/libfreefare/mifare_classic.c @@ -83,7 +83,7 @@ do { \ errno = 0; \ DEBUG_XFER (msg, __##msg##_n, "===> "); \ - if (!(nfc_initiator_transceive_dep_bytes (tag->device, msg, __##msg##_n, res, &__##res##_n))) { \ + if (!(nfc_initiator_transceive_bytes (tag->device, msg, __##msg##_n, res, &__##res##_n))) { \ nfc_perror (tag->device, __FUNCTION__); \ if (disconnect) \ tag->active = false; \ diff --git a/libfreefare/mifare_desfire.c b/libfreefare/mifare_desfire.c index 426482c..9c33035 100644 --- a/libfreefare/mifare_desfire.c +++ b/libfreefare/mifare_desfire.c @@ -277,6 +277,7 @@ mifare_desfire_connect (MifareTag tag) errno = EIO; return -1; } + nfc_configure (tag->device, NDO_EASY_FRAMING, false); return 0; } @@ -295,6 +296,7 @@ mifare_desfire_disconnect (MifareTag tag) if (nfc_initiator_deselect_target (tag->device)) { tag->active = 0; } + nfc_configure (tag->device, NDO_EASY_FRAMING, true); return 0; } diff --git a/libfreefare/mifare_ultralight.c b/libfreefare/mifare_ultralight.c index f045716..ec34273 100644 --- a/libfreefare/mifare_ultralight.c +++ b/libfreefare/mifare_ultralight.c @@ -51,7 +51,7 @@ do { \ errno = 0; \ DEBUG_XFER (msg, __##msg##_n, "===> "); \ - if (!(nfc_initiator_transceive_dep_bytes (tag->device, msg, __##msg##_n, res, &__##res##_n))) { \ + if (!(nfc_initiator_transceive_bytes (tag->device, msg, __##msg##_n, res, &__##res##_n))) { \ return errno = EIO, -1; \ } \ DEBUG_XFER (res, __##res##_n, "<=== "); \ @@ -187,7 +187,7 @@ mifare_ultralight_write (MifareTag tag, const MifareUltralightPageNumber page, c memcpy (cmd + 2, data, sizeof (MifareUltralightPage)); size_t n; - if (!(nfc_initiator_transceive_dep_bytes (tag->device, cmd, sizeof (cmd), NULL, &n))) { + if (!(nfc_initiator_transceive_bytes (tag->device, cmd, sizeof (cmd), NULL, &n))) { errno = EIO; return -1; }