Update to use latest libnfc devel version
This commit is contained in:
parent
ecee7b8a7e
commit
42ed06af74
@ -1,4 +1,4 @@
|
|||||||
AC_INIT(nfcutils, 0.3.0, rconty@il4p.fr)
|
AC_INIT([nfcutils],[0.3.1],[rconty@il4p.fr])
|
||||||
|
|
||||||
AC_CONFIG_HEADER(config.h)
|
AC_CONFIG_HEADER(config.h)
|
||||||
|
|
||||||
@ -13,7 +13,7 @@ AC_DEFINE_UNQUOTED([SVN_REVISION], ["$SVN_REVISION"], [SVN revision])
|
|||||||
AM_INIT_AUTOMAKE
|
AM_INIT_AUTOMAKE
|
||||||
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
|
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
|
||||||
|
|
||||||
AC_LANG_C
|
AC_LANG([C])
|
||||||
AC_PROG_CC
|
AC_PROG_CC
|
||||||
AC_PROG_MAKE_SET
|
AC_PROG_MAKE_SET
|
||||||
|
|
||||||
@ -59,7 +59,7 @@ fi
|
|||||||
AC_SUBST([DEBUG_CFLAGS])
|
AC_SUBST([DEBUG_CFLAGS])
|
||||||
|
|
||||||
# Checks for pkg-config modules.
|
# Checks for pkg-config modules.
|
||||||
LIBNFC_REQUIRED_VERSION=1.5.1
|
LIBNFC_REQUIRED_VERSION=1.6.0
|
||||||
PKG_CHECK_MODULES([libnfc], [libnfc >= $LIBNFC_REQUIRED_VERSION], [], [AC_MSG_ERROR([libnfc >= $LIBNFC_REQUIRED_VERSION is mandatory.])])
|
PKG_CHECK_MODULES([libnfc], [libnfc >= $LIBNFC_REQUIRED_VERSION], [], [AC_MSG_ERROR([libnfc >= $LIBNFC_REQUIRED_VERSION is mandatory.])])
|
||||||
|
|
||||||
AC_SUBST(libnfc_LIBS)
|
AC_SUBST(libnfc_LIBS)
|
||||||
|
|||||||
6
debian/changelog
vendored
6
debian/changelog
vendored
@ -1,3 +1,9 @@
|
|||||||
|
nfcutils (0.3.0-pre1-0) unstable; urgency=low
|
||||||
|
|
||||||
|
* Update libnfc version.
|
||||||
|
|
||||||
|
-- Romuald Conty <rconty@il4p.fr> Thu, 16 Sep 2010 20:42:42 +0200
|
||||||
|
|
||||||
nfcutils (0.2.9-0) unstable; urgency=low
|
nfcutils (0.2.9-0) unstable; urgency=low
|
||||||
|
|
||||||
* New upstream release.
|
* New upstream release.
|
||||||
|
|||||||
2
debian/control
vendored
2
debian/control
vendored
@ -8,7 +8,7 @@ Homepage: http://code.google.com/p/nfc-tools/wiki/nfcutils
|
|||||||
|
|
||||||
Package: nfcutils
|
Package: nfcutils
|
||||||
Architecture: any
|
Architecture: any
|
||||||
Depends: ${shlibs:Depends}, libnfc-dev (>= 1.3.0)
|
Depends: ${shlibs:Depends}, libnfc-dev (>= 1.6.0)
|
||||||
Description: Near Field Communication (NFC) utilities
|
Description: Near Field Communication (NFC) utilities
|
||||||
This package contains one utility for listing NFC devices and in-field tags or targets.
|
This package contains one utility for listing NFC devices and in-field tags or targets.
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
INCLUDES = $(all_includes)
|
AM_CPPFLAGS = $(all_includes)
|
||||||
|
|
||||||
AM_CFLAGS = @libnfc_CFLAGS@
|
AM_CFLAGS = @libnfc_CFLAGS@
|
||||||
AM_LDFLAGS = @libnfc_LIBS@
|
AM_LDFLAGS = @libnfc_LIBS@
|
||||||
|
|||||||
10
src/lsnfc.c
10
src/lsnfc.c
@ -88,7 +88,7 @@ mifare_ultralight_identification(const nfc_iso14443a_info nai)
|
|||||||
};
|
};
|
||||||
if((res = nfc_initiator_select_passive_target(pnd, nm, nai.abtUid, nai.szUidLen, NULL)) >= 0 ) {
|
if((res = nfc_initiator_select_passive_target(pnd, nm, nai.abtUid, nai.szUidLen, NULL)) >= 0 ) {
|
||||||
nfc_device_set_property_bool (pnd, NP_EASY_FRAMING, false);
|
nfc_device_set_property_bool (pnd, NP_EASY_FRAMING, false);
|
||||||
if ((res = nfc_initiator_transceive_bytes(pnd, abtCmd,sizeof(abtCmd), abtRx, &szRxLen, 0)) >= 0) {
|
if ((res = nfc_initiator_transceive_bytes(pnd, abtCmd,sizeof(abtCmd), abtRx, sizeof(abtRx), 0)) >= 0) {
|
||||||
// AUTH step1 command success, so it's a Ultralight C
|
// AUTH step1 command success, so it's a Ultralight C
|
||||||
nfc_device_set_property_bool (pnd, NP_EASY_FRAMING, true);
|
nfc_device_set_property_bool (pnd, NP_EASY_FRAMING, true);
|
||||||
nfc_initiator_deselect_target(pnd);
|
nfc_initiator_deselect_target(pnd);
|
||||||
@ -126,13 +126,13 @@ mifare_desfire_identification(const nfc_iso14443a_info nai)
|
|||||||
.nbr = NBR_106
|
.nbr = NBR_106
|
||||||
};
|
};
|
||||||
if((nfcRes = nfc_initiator_select_passive_target(pnd, nm, nai.abtUid, nai.szUidLen, NULL)) >= 0 ) {
|
if((nfcRes = nfc_initiator_select_passive_target(pnd, nm, nai.abtUid, nai.szUidLen, NULL)) >= 0 ) {
|
||||||
if ((nfcRes = nfc_initiator_transceive_bytes(pnd, abtCmd, sizeof(abtCmd), abtRx, &szRxLen, 0)) >= 0) {
|
if ((nfcRes = nfc_initiator_transceive_bytes(pnd, abtCmd, sizeof(abtCmd), abtRx, sizeof(abtRx), 0)) >= 0) {
|
||||||
// MIFARE DESFire GetVersion command success, decoding...
|
// MIFARE DESFire GetVersion command success, decoding...
|
||||||
if( szRxLen == 8 ) { // GetVersion should reply 8 bytes
|
if( nfcRes == 8 ) { // GetVersion should reply 8 bytes
|
||||||
memcpy( abtDESFireVersion, abtRx + 1, 7 );
|
memcpy( abtDESFireVersion, abtRx + 1, 7 );
|
||||||
abtCmd[0] = 0xAF; // ask for GetVersion next bytes
|
abtCmd[0] = 0xAF; // ask for GetVersion next bytes
|
||||||
if ((nfcRes = nfc_initiator_transceive_bytes(pnd, abtCmd, sizeof(abtCmd), abtRx, &szRxLen, 0)) >= 0) {
|
if ((nfcRes = nfc_initiator_transceive_bytes(pnd, abtCmd, sizeof(abtCmd), abtRx, sizeof(abtRx), 0)) >= 0) {
|
||||||
if( szRxLen == 8 ) { // GetVersion should reply 8 bytes
|
if( nfcRes == 8 ) { // GetVersion should reply 8 bytes
|
||||||
memcpy( abtDESFireVersion + 7, abtRx + 1, 7 );
|
memcpy( abtDESFireVersion + 7, abtRx + 1, 7 );
|
||||||
res = malloc(16); // We can alloc res: we will be able to provide information
|
res = malloc(16); // We can alloc res: we will be able to provide information
|
||||||
bool bEV1 = ( ( abtDESFireVersion[3] == 0x01 ) && ( abtDESFireVersion[10] == 0x01 ) ); // Hardware major version and software major version should be equals to 1 to be an DESFire EV1
|
bool bEV1 = ( ( abtDESFireVersion[3] == 0x01 ) && ( abtDESFireVersion[10] == 0x01 ) ); // Hardware major version and software major version should be equals to 1 to be an DESFire EV1
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user