Commit graph

776 commits

Author SHA1 Message Date
Romuald Conty
854cfe15ec Fix ARYGON detection. Rename acConnect to acPort. Now use snprintf and strncpy (see Issue 78) 2010-04-22 10:22:41 +00:00
Romuald Conty
3e16031877 Fix ARYGON driver build (missing comma). 2010-04-22 09:01:22 +00:00
Romuald Conty
367e14dcc0 Prevent from potential buffer-overflows. 2010-04-21 10:58:04 +00:00
Romuald Conty
fa1f9a1ff6 Fix device name: snprintf could not be used to append something to source string. 2010-04-21 10:50:29 +00:00
Romuald Conty
d9ec086beb Replace some sprintf with snprintf to prevent from buffer-overflow. 2010-04-21 10:23:11 +00:00
Romuald Conty
ce6f7f2c84 Fix potential UART speed problem while autoprobing. Extract communication test from pn532_uart_wakeup(). 2010-04-21 10:19:26 +00:00
Romuald Conty
67fd8ecd0e Unix-like system's developer should use 'autoreconf -vis' instead of './autogen.sh'. 2010-04-20 20:23:14 +00:00
Romuald Conty
f05e432df8 Fix autogen.sh usage on MacOS X. 2010-04-20 20:20:27 +00:00
Romuald Conty
942dcfa631 PN532_UART: prevent from blocking when device doesn't reply correctly to wakeup command. 2010-04-20 15:05:57 +00:00
Romuald Conty
e3ff11eb46 Fix warnings "no previous prototype for ..." on bitutils.[hc] 2010-04-20 09:44:27 +00:00
Romuald Conty
9abb29f1d1 nfc-mfultralight: fix warnings about prototypes. Fix Issue 77. 2010-04-20 09:28:19 +00:00
Romuald Conty
7762814eda nfc-mfclassic: fix warnings about prototypes. Fix Issue 76. 2010-04-20 09:25:18 +00:00
Romuald Conty
75cc48e460 nfc-mfclassic: fix warnings "no previous prototype for...". Fix Issue 75. 2010-04-20 09:05:23 +00:00
Romuald Conty
03eec8fab6 nfc-anticol: fix warnings "no previous prototype for...". Fix Issue 74. 2010-04-20 09:04:20 +00:00
Romuald Conty
2ab522950f Remove uart_cts() since the function is defined but never used. Fix Issue 71 2010-04-20 08:48:41 +00:00
Romuald Conty
778ac87b37 Add drivers selection to CMake build. Fix Issue 70 2010-04-20 08:45:31 +00:00
Romain Tartiere
204130477e (libnfc-less-bitutils-more-ponies) MFT 2010-04-17 13:45:00 +00:00
Romain Tartiere
be3f152d3c Fix a few more warnings. 2010-04-17 13:42:08 +00:00
Romain Tartiere
086e24c407 (libnfc-less-bitutils-more-ponies) Fix build on windows:
- do not depends on byte swapping functions / macros;
  - add basic err.h functionalities.
2010-04-16 22:38:45 +00:00
Romain Tartiere
3e8e1c8844 Fix build on Windows (using cmake and nmake). 2010-04-16 20:39:56 +00:00
Romain Tartiere
3820c34f28 (libnfc-less-bitutils-more-ponies) MFT 2010-04-16 19:27:49 +00:00
Romain Tartiere
0e6719908b (libnfc-less-bitutils-more-ponies) Update CMakeLists.txt. 2010-04-16 17:42:00 +00:00
Romain Tartiere
3dccc218df Enable drivers in cmake again (disabled implicitly in r375). 2010-04-16 17:35:00 +00:00
Romain Tartiere
39761badb7 Fix cmake breakage introduced in r360:
undefined reference to `print_nfc_iso14443a_info'
2010-04-16 17:20:22 +00:00
Romain Tartiere
5e452dbb13 Fix cmake breakage introduced in r352:
error: 'for' loop initial declaration used outside C99 mode
2010-04-16 17:10:08 +00:00
Romain Tartiere
10baef235f (libnfc-less-bitutils-more-ponies) Get rid of bitutils.[hc] (part 1).
- New API function append_iso14443a_crc();
  - Add a PRINT_HEX macro for driver debugging (replaces print_hex function from bitutils.c);
  - Move bit-mirroring related functions to libnfc/mirror-subr.[hc];
  - Move iso14443 related functions to libnfc/iso14443-subr.c;
  - Move libnfc/bitutils.c hex-dumping code to examples/nfc-utils.c;
  - Replace calls to swap_endian32() and swap_endian64() functions with calls to bswap32() and bswap64 provided by endian.h.

And while I am here:
  - Fix the DBG macro so that it does not throw warning at compile time.
2010-04-16 16:38:57 +00:00
Romain Tartiere
5302930b09 Avoid using a 'comma pasting' GNU extension (non-portable, reported my clang).
This is not a 'complete' fix since the DBG macro is still using it; but more globally, this file should not be part of the libnfc installed files.  We should rely on error codes and maybe some logging mechanism (e.g. syslog() on POSIX compliant systems and RegisterEventSource() / ReportEvent() on Windows).
2010-04-16 14:50:48 +00:00
Romain Tartiere
0b301d8ff6 Add missing documentation lines. 2010-04-16 13:00:33 +00:00
Romain Tartiere
7b65174856 Remove deprecated DEBUG_CFLAGS. 2010-04-16 12:58:29 +00:00
Romain Tartiere
4dbeff47db Fix warnings on 32bit systems:
- format '%ld' expects type 'long int', but argument 2 has type 'unsigned int';
  - format '%ld' expects type 'long int', but argument 2 has type 'size_t'.

Tested on FreeBSD arm.
2010-04-15 23:11:36 +00:00
Romuald Conty
d74e68a3fd Add nfc-utils.h to generated tarball. (make distcheck OK) 2010-04-15 17:36:43 +00:00
Romuald Conty
b55400a0d5 configure.ac rework
- Put libusb and PC/SC check in m4 macros.
- Suppress --disable-pcsclite and --disable-libusb
- Add --with-drivers option: we now could choose which driver to build. without this option a default set is build (ATM all drivers except PN532_UART)
2010-04-15 14:41:13 +00:00
Romuald Conty
b747573dc7 PN532_UART readers could now poll using PN532 hardware feature. This commit should fix Issue 56 too. 2010-04-14 13:28:24 +00:00
Romuald Conty
064b7c4b41 Revert libnfc/drivers.h (from r371), this file should not have been commited (in r372).
Second pointy hat to: me again
2010-04-14 10:44:12 +00:00
Romuald Conty
0a08ef00c2 Fix recently changed wakeup function for pn532_uart driver.
Pointy hat to: me ;)
2010-04-14 10:39:18 +00:00
Romuald Conty
a3f68b566d Raise up timeout value in UART, this is tricky (ugly?) hack to allow low speed UART device to run nfc-emulate. 2010-04-13 14:36:02 +00:00
Romuald Conty
2766cd8822 ARYGON readers could now poll using PN532 hardware feature. 2010-04-13 14:11:10 +00:00
Romuald Conty
332eed3596 nfc-poll: raise polling duration from 1500ms to 6000ms. 2010-04-13 14:07:29 +00:00
Romuald Conty
24e7b20d04 Add debug output when pnd->pdc->tranceive() failed. 2010-04-13 12:48:52 +00:00
Romuald Conty
29fad31ee5 Update ARYGON driver, it now support probing as PN532_UART. Communication should be faster (delays removed).
Note: ARYGON APPB2UA33 oem reader now works.
2010-04-12 14:51:50 +00:00
Romuald Conty
a4d1c53ed3 Add wake up function for PN532 UART and run a communication test to know if device correctly respond. 2010-04-12 14:48:03 +00:00
Romuald Conty
1ba436041b Report found device number in debug mode. 2010-04-12 14:43:19 +00:00
Romuald Conty
f693040ced Disable compiler code optimizations and turn on gdb support when --enable-debug is passed to configure. 2010-04-09 23:41:35 +00:00
Romuald Conty
e886ef4f48 nfc-poll: Warn user when hardware does not support polling. 2010-04-09 23:38:05 +00:00
Romuald Conty
c9370e6fac Prevent from running polling on hardware that does not support it. 2010-04-09 23:11:20 +00:00
Romuald Conty
71341b871e Minor comments added. 2010-04-09 23:09:20 +00:00
Romain Tartiere
ae99d155b5 Make nfc-list rely on the libnfcutils.a convenience library and call nfc_initiator_select_tag(). 2010-04-09 22:08:17 +00:00
Romain Tartiere
b8630c4230 Fix various warnings:
- format '%d' expects type 'int', but argument 2 has type 'long unsigned int';
  - format '%d' expects type 'int', but argument 2 has type 'size_t';
  - unused variable 'nti';
  - unused parameter 'argc'.
2010-04-09 22:03:52 +00:00
Romain Tartiere
ee3715e267 Add convenience library infrastructure and move the print_nfc_iso14443a_info() function away from bitutils. 2010-04-09 21:57:03 +00:00
Romuald Conty
2714180227 Add new example to show how to use new polling function. 2010-04-09 16:21:25 +00:00