Merge remote-tracking branch 'refs/remotes/libnfc/master'
Conflicts: contrib/windows.h libnfc/CMakeLists.txt libnfc/log-printf.c utils/CMakeLists.txt
This commit is contained in:
commit
caa09db5fc
36 changed files with 301 additions and 88 deletions
|
|
@ -21,10 +21,12 @@ FOREACH(source ${UTILS-SOURCES})
|
|||
LIST(APPEND TARGETS mifare)
|
||||
ENDIF((${source} MATCHES "nfc-mfultralight") OR (${source} MATCHES "nfc-mfclassic"))
|
||||
|
||||
IF(${source} MATCHES "nfc-scan-device")
|
||||
LIST(APPEND TARGETS ../contrib/win32/nfc_win32)
|
||||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../contrib/win32)
|
||||
ENDIF(${source} MATCHES "nfc-scan-device")
|
||||
IF(WIN32)
|
||||
IF(${source} MATCHES "nfc-scan-device")
|
||||
LIST(APPEND TARGETS ../contrib/win32/stdlib)
|
||||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../contrib/win32)
|
||||
ENDIF(${source} MATCHES "nfc-scan-device")
|
||||
ENDIF(WIN32)
|
||||
|
||||
ADD_EXECUTABLE(${source} ${TARGETS})
|
||||
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@
|
|||
* @note There are three different types of information (Authenticate, Data and Value).
|
||||
*
|
||||
* First an authentication must take place using Key A or B. It requires a 48 bit Key (6 bytes) and the UID.
|
||||
* They are both used to initialize the internal cipher-state of the PN53X chip (http://libnfc.org/hardware/pn53x-chip).
|
||||
* They are both used to initialize the internal cipher-state of the PN53X chip.
|
||||
* After a successful authentication it will be possible to execute other commands (e.g. Read/Write).
|
||||
* The MIFARE Classic Specification (http://www.nxp.com/acrobat/other/identification/M001053_MF1ICS50_rev5_3.pdf) explains more about this process.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -382,7 +382,7 @@ main(int argc, char *argv[])
|
|||
printf("NFC device: %s opened\n", nfc_device_get_name(pnd));
|
||||
printf("Emulating NDEF tag now, please touch it with a second NFC device\n");
|
||||
|
||||
if (0 != nfc_emulate_target(pnd, &emulator)) { // contains already nfc_target_init() call
|
||||
if (0 != nfc_emulate_target(pnd, &emulator, 0)) { // contains already nfc_target_init() call
|
||||
nfc_perror(pnd, "nfc_emulate_target");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -77,11 +77,6 @@ main(int argc, const char *argv[])
|
|||
bool verbose = false;
|
||||
|
||||
nfc_context *context;
|
||||
nfc_init(&context);
|
||||
|
||||
// Display libnfc version
|
||||
acLibnfcVersion = nfc_version();
|
||||
printf("%s uses libnfc %s\n", argv[0], acLibnfcVersion);
|
||||
|
||||
// Get commandline options
|
||||
for (int arg = 1; arg < argc; arg++) {
|
||||
|
|
@ -91,6 +86,7 @@ main(int argc, const char *argv[])
|
|||
} else if (0 == strcmp(argv[arg], "-v")) {
|
||||
verbose = true;
|
||||
} else if (0 == strcmp(argv[arg], "-i")) {
|
||||
// This has to be done before the call to nfc_init()
|
||||
setenv("LIBNFC_INTRUSIVE_SCAN", "yes", 1);
|
||||
} else {
|
||||
ERR("%s is not supported option.", argv[arg]);
|
||||
|
|
@ -99,6 +95,12 @@ main(int argc, const char *argv[])
|
|||
}
|
||||
}
|
||||
|
||||
nfc_init(&context);
|
||||
|
||||
// Display libnfc version
|
||||
acLibnfcVersion = nfc_version();
|
||||
printf("%s uses libnfc %s\n", argv[0], acLibnfcVersion);
|
||||
|
||||
#ifdef HAVE_LIBUSB
|
||||
# ifdef DEBUG
|
||||
usb_set_debug(4);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue