diff --git a/configure.ac b/configure.ac index 1155904..534161b 100644 --- a/configure.ac +++ b/configure.ac @@ -59,7 +59,7 @@ fi AC_SUBST([DEBUG_CFLAGS]) # Checks for pkg-config modules. -LIBNFC_REQUIRED_VERSION=1.4.0 +LIBNFC_REQUIRED_VERSION=1.5.1 PKG_CHECK_MODULES([libnfc], [libnfc >= $LIBNFC_REQUIRED_VERSION], [], [AC_MSG_ERROR([libnfc >= $LIBNFC_REQUIRED_VERSION is mandatory.])]) AC_SUBST(libnfc_LIBS) diff --git a/src/lsnfc.c b/src/lsnfc.c index fe0b8e4..7482379 100644 --- a/src/lsnfc.c +++ b/src/lsnfc.c @@ -81,7 +81,7 @@ mifare_ultralight_identification(const nfc_iso14443a_info_t nai) }; if(nfc_initiator_select_passive_target(pnd, nm, nai.abtUid, nai.szUidLen, NULL) ) { nfc_configure (pnd, NDO_EASY_FRAMING, false); - if (nfc_initiator_transceive_bytes(pnd, abtCmd,sizeof(abtCmd), abtRx, &szRxLen)) { + if (nfc_initiator_transceive_bytes(pnd, abtCmd,sizeof(abtCmd), abtRx, &szRxLen, NULL)) { // AUTH step1 command success, so it's a Ultralight C nfc_configure (pnd, NDO_EASY_FRAMING, true); nfc_initiator_deselect_target(pnd); @@ -118,12 +118,12 @@ mifare_desfire_identification(const nfc_iso14443a_info_t nai) .nbr = NBR_106 }; if(nfc_initiator_select_passive_target(pnd, nm, nai.abtUid, nai.szUidLen, NULL) ) { - if (nfc_initiator_transceive_bytes(pnd, abtCmd, sizeof(abtCmd), abtRx, &szRxLen)) { + if (nfc_initiator_transceive_bytes(pnd, abtCmd, sizeof(abtCmd), abtRx, &szRxLen, NULL)) { // MIFARE DESFire GetVersion command success, decoding... if( szRxLen == 8 ) { // GetVersion should reply 8 bytes memcpy( abtDESFireVersion, abtRx + 1, 7 ); abtCmd[0] = 0xAF; // ask for GetVersion next bytes - if (nfc_initiator_transceive_bytes(pnd, abtCmd, sizeof(abtCmd), abtRx, &szRxLen)) { + if (nfc_initiator_transceive_bytes(pnd, abtCmd, sizeof(abtCmd), abtRx, &szRxLen, NULL)) { if( szRxLen == 8 ) { // GetVersion should reply 8 bytes memcpy( abtDESFireVersion + 7, abtRx + 1, 7 ); res = malloc(16); // We can alloc res: we will be able to provide information