Commit Graph
100 Commits
Author SHA1 Message Date
Romuald Conty 50401c5bf6 Fix CMake build 2013-01-15 13:45:28 +01:00
Romuald Conty ff3d8f708d Debian package update 2012-12-23 20:09:26 +01:00
Romuald Conty de62e4c011 Prepare 1.7.0 release candidate 1 2012-12-23 20:04:34 +01:00
Romuald Conty 82c41b4fc1 Fixes style: make style 2012-12-09 20:09:55 +01:00
Romuald Conty 007b78cbb4 Uses less ambiguous include when compiles for Windows platform 2012-12-09 19:27:46 +01:00
Romuald Conty 8d9d6a5696 Add ttyAMA* to radix list from UART scanning
It allows a PN532 UART connected on raspberry pi to be detected when intrusive scan allowed (e.g. with nfc-scan-device -i)
2012-12-09 19:10:35 +01:00
Romuald Conty 484dd5dfa5 Improves mingw-cross-configure.sh script using patch provided by Frank Morgner, thanks! 2012-12-05 18:27:40 +01:00
Romuald Conty 0af58b1cdd Attempt to build libnfc under for Windows target.
This commit fixes some issues related to the new log system, but libnfc can not build on Windows in this stage since regex.h have been introduced for configuration file parsing and regex.h is not available in Windows.

New issue
Summary: Update Windows port
Due to the recent configuration file parsing introduction, libnfc can not be built under Windows: regex.h is missing.
Google says there is a port of PCRE for Windows which contains a compiliant regex.h.
Contribution are welcome as nobody from currently active team use Windows as OS.
2012-12-05 18:22:27 +01:00
Romuald Conty 8f015c4369 Suppress warnings: "ISO C99 requires rest arguments to be used" 2012-12-05 16:53:43 +01:00
Romuald Conty 08f428fbdf Fix CMake build. 2012-12-05 16:47:08 +01:00
Romuald Conty 53349c8c20 Prevent from segfault if user add too many devices in configuration file(s) 2012-12-05 16:41:44 +01:00
Romuald Conty a3a3fa2848 Enhance messages display 2012-12-05 16:40:52 +01:00
Romuald Conty 995368cffa Update quick_start_examples 2012-12-05 02:05:16 +01:00
Romuald Conty 5b0e276572 Examples and utils are now updated to use the requiered nfc_context 2012-12-05 00:51:13 +01:00
Romuald Conty dc949c257e Removes nfc_get_default_device() function.
The nfc_get_default_device() is not needed anymore since the first element from returned nfc_connstring list of nfc_list_devices() function.
Plus, nfc_open() can be use with NULL nfc_connstring which will select automatically the first available device (ie. the default one).
2012-12-05 00:51:13 +01:00
Romuald Conty 03e5611d14 New feature: search in a directory for devices configuration files. 2012-12-05 00:51:13 +01:00
Romuald Conty 84dc268781 New feature: user can define a device by conf file. 2012-12-05 00:51:13 +01:00
Romuald Conty 0fd3c9fab3 Provides modprobe configuration file and instructions for PN533 and Linux >3.1 users. 2012-12-05 00:51:13 +01:00
Romuald Conty 9b3947b8ed Improves log feature:
* Add --disable-log
  * Add a log level filter, configurable using conf file (ie. /etc/nfc/libnfc.conf) or environment var LIBNFC_LOG_LEVEL
2012-11-26 21:02:03 +01:00
Romuald Conty d6c879083c git ignore more generated files. 2012-11-24 20:14:09 +01:00
Romuald Conty 4722b7dd97 SVN_REVISION is not relevant anymore, use GIT_REVISION (git describe) instead. 2012-11-24 20:11:12 +01:00
Romuald Conty 7963fdfc3b Import code to load configuration from file.
WARNING: This commit do not contains a fully cleaned code:
 - Only nfc-list have been tested
 - Some -commented- code is not used ATM
 - Some printf-as-debug remain in this commit
... but that a bit usable so... happy hacking ;-)
2012-11-24 13:10:52 +01:00
Romuald Conty 3ee77eb79e Fix *transceive*() calls from examples and utils (bug introduced in previous commit) 2012-11-24 13:00:23 +01:00
Romuald Conty 6650105174 Add some functions parameters documentation. 2012-11-23 16:58:10 +01:00
Romuald Conty c239873634 Add missing NFC_EMFCAUTHFAIL error string. 2012-11-23 16:55:45 +01:00
Romuald Conty dd451da4a5 Change *transceive*() API to be closer to *transceive_bytes.
Warning: only prototypes have been changed, implementation does not take care about buffer size.

New issue
Summary: Implement buffer overflow protection on all *transceive*() functions
*transceive*() functions do have an argument for rx buffer but some of them dont use it to protect user from buffer overflow.
2012-11-23 16:54:38 +01:00
Romuald Conty 9f90a04a84 nfc_initiator_transceive_bytes() returns NFC_EMFCAUTHFAIL when AUTH command failed on a Mifare Classic 2012-11-01 01:27:06 +01:00
Romuald Conty 3629219a3b Caller expect nfc_initiator_deselect_target() to be 0 on success. (Fixes Issue 209)
Thanks to Frank Morgner.
2012-10-30 23:22:22 +01:00
Romuald Conty e4ebfccc54 Debian package: nfc-probe have been renamed, nfc-read-forum-tag3 man page added (Fixes Issue 210).
Thanks to UNFORGiVEN512.
2012-10-30 23:11:34 +01:00
Romuald Conty bbf0d819f6 Debian package: remove invalid email address 2012-10-30 23:09:55 +01:00
Romuald Conty 86b49d14ea Ignore generated files in Git repo 2012-10-30 23:09:04 +01:00
Romuald Conty 56f9de23be Autotools now distributes nfc-read-forum-tag3 man page in tarball 2012-10-30 22:59:43 +01:00
Romuald Conty d6c97cb974 Fixes CMake build (Fixes Issue 211).
Thanks to Alex Lian
2012-10-30 22:29:13 +01:00
Romuald Conty f1b55b5390 debian/rules: no more --enable-serial-probe option 2012-10-21 14:12:14 +00:00
Romuald Conty bed1d4ba5e Add -i option to nfc-scan-device to allow intrusive scan and add a manpage for this util. 2012-10-21 14:12:04 +00:00
Romuald Conty 397222c33f Removes --enable-serial-autoprobe option at compile and replace this feature by LIBNFC_INTRUSIVE_SCAN environment variable at run time. 2012-10-21 14:11:38 +00:00
Romuald Conty b5aa91fd62 Use a more appropriated term regarding device detection: from probe to scan
- Rename nfc-probe to nfc-scan-device
 - Rename internal drivers function prototypes: _probe to _scan
 - Revamp _scan function prototype: it now returns device found count
2012-10-21 14:11:17 +00:00
Romuald Conty 6bc9d64fbb Remove unused prototypes in drivers/*.h 2012-10-21 14:10:43 +00:00
Romuald Conty 9afa3c6598 Use copyright format recommended by GNU project.
http://www.gnu.org/prep/maintain/html_node/Copyright-Notices.html
2012-10-21 14:09:16 +00:00
Romuald Conty 6fd29775b2 acr122_usb: Fix compilation and length offset (bug introduced in r1461) 2012-10-04 15:28:30 +00:00
Romuald Conty 2078135c07 README: Add few words about device permissions and udev/devd rules available in package. 2012-10-04 10:12:53 +00:00
Romuald Conty b27f8634d6 acr122_usb: Fixes CCID reply decoding. 2012-10-04 09:35:47 +00:00
Romuald Conty 26dabba7ac Add Touchatag support for experimental acr122_usb driver; Thanks to Gregoire Sage for its contribution. (Fixes Issue 201) 2012-10-03 16:21:11 +00:00
Romuald Conty 88a57a50b3 Fix error code when no reply is not ISO14443B2CT compliant 2012-10-03 16:21:02 +00:00
Romuald Conty 91ce008d62 Removes a FIXME: not relevant anymore 2012-10-03 16:20:50 +00:00
Romuald Conty 1f0ec1b43a Remove unused macro. (Fixes Issue 192) 2012-09-27 07:36:02 +00:00
Romuald Conty 921d64dadc Support FTDI dongle under MacOS 2012-09-27 07:35:55 +00:00
Romuald Conty 310d7eba07 New str_nfc_target() function in API.
This allow to convert a nfc_target struct into allocated string.
2012-09-17 13:47:54 +00:00
Romuald Conty 82e3416619 minor header clean up 2012-09-17 13:47:43 +00:00
Romuald Conty de827ab583 nfc_device_get_information_about() now allocates returned string.
Note: must be freed by free().
2012-09-17 13:47:30 +00:00
Romuald Conty 2aba0f962a documentation: add missing group description 2012-09-17 13:47:18 +00:00
Romuald Conty 3cd6015c81 minor header cleanup 2012-09-17 13:47:11 +00:00
Romuald Conty 9f38ae715d pn53x: allow more delay for Card Presence command (tested on PN533 and PN532 in various contexts). 2012-06-12 16:51:47 +00:00
Romuald Conty ab312299d6 pn53x_reset_settings() now resets CRC, parity, easyframing and crypto1.
These settings are quite specifics and should be reset in other functions that call pn53x_reset_settings() too: i.e. nfc_initiator_init_secure_element()
2012-06-12 16:46:20 +00:00
Romuald Conty b4ef1a3a5d New nfc_initiator_init_secure_element() function to set SAM as wired card (only relevant with a PN532 SAM-equipped) 2012-06-04 00:16:28 +00:00
Romuald Conty 6f10d6e321 pn53x: return all errors when NP_ACTIVATE_FIELD failed 2012-06-04 00:16:17 +00:00
Romuald Conty f47af31fb7 Indent correctly previous commit (make style) 2012-06-03 21:05:26 +00:00
Romuald Conty ce443d50ca Rename abtUid from struct mifare_param_auth into abtAuthUid: this is not the UID while using 7-bytes UID MIFARE Classic tags. 2012-06-03 21:02:54 +00:00
Romuald Conty c973800164 nfc_device_target_is_present() checks if passed target if the current target before sending Card Presence command 2012-06-03 21:02:47 +00:00
Romuald Conty 2b81baa14f Add documentation related to previous commit (NFC_ETGRELEASED on MFC AUTH failure) 2012-06-03 21:02:38 +00:00
Romuald Conty b7a74931f6 Returns a NFC_ETGRELEASED error when MIFARE Classic's authentication failed (instead of NFC_ECHIP): a MIFARE Classic is halted on AUTH command failure. 2012-06-03 21:02:31 +00:00
Romuald Conty c7820c6a77 Log an error when user-Rx buffer is too sort to gain data 2012-06-03 21:02:23 +00:00
Romuald Conty 62c4ffd0b7 Raises up default timeout from 250 to 350ms
PN53x sometimes needs more time to compute usual command (ie. with Diagnose/Card Presence when card become unreachable)
2012-05-30 23:02:56 +00:00
Romuald Conty 13e1e054c2 Minor code fix. 2012-05-30 23:02:48 +00:00
Romuald Conty d7e7979580 Listing passive targets now quit earlier if szTargets count is reached and in that case, leave with the latest tag selected.
That's quite useful when you need to directly use 1 target because in contrast of nfc_initiator_select_passive_target, you don't need to prepare initiator data by hands
2012-05-30 23:02:41 +00:00
Romuald Conty b5c634cb07 drivers/pn53x_usb: use default timeout command instead of infinite 2012-05-30 23:02:34 +00:00
Romuald Conty 26865bbc19 Remove extra whitespaces/tabs before EOL.
find . -name '*.[ch]' | xargs perl -pi -e 's/\t+$//; s/ +$//'

Thanks to Ludovic.
2012-05-29 00:33:22 +00:00
Romuald Conty 167238c60d Fix uninitialized variable szTargetsData 2012-05-27 23:25:52 +00:00
Romuald Conty 8f08431ddf New function nfc_initiator_target_is_present() to test is a previously selected target is in the field. 2012-05-27 22:34:21 +00:00
Romuald Conty 2c9275adde nfc_initiator_transceive_bytes() now take a constant size for Rx buffer to have a cleaner API: no more in/out parameters 2012-05-27 21:06:22 +00:00
Romuald Conty 531702a1fc example/pn532-sam: Fix few bugs in SAM example
- Fix choice input (Dual card mode was not available);
 - Fix segfault when target selection returns no target;
 - Use error label to close the device before exiting;
2012-05-20 23:09:21 +00:00
Romuald Conty cfd95bae2c Fix shadowed declaration warnings 2012-05-17 01:18:24 +00:00
Romuald Conty e4802de965 Add new public functions to grab information in string format:
- New nfc_device_get_information_about()
 - Moved nfc-utils function str_nfc_baud_rate()
 - New str_nfc_modulation_type()
 - Add new device_get_information_about callback to nfc_driver struct
 - Export new symbols
 - Changed internal pn53x firmware text handling: we now store firmware text for further operations
 - print_nfc_target() now uses str_nfc_* functions
 - nfc-probe util now have a verbose which display information on detected devices (Fix verbose set but not used warning ;-) )
2012-05-17 00:48:47 +00:00
Romuald Conty 6710ca943e Fix ACR122S device detection when no ACR122S device available (endless UART receive) 2012-05-17 00:38:54 +00:00
Romuald Conty fb50e3b235 Display right driver name while detecting PCSC 2012-05-17 00:37:00 +00:00
Romuald Conty 45ef3b43c4 Fix unused result warnings and add a new NFC_ESOFT error. 2012-05-16 18:24:16 +00:00
Romuald Conty bfcdb1bd4c Fix more warnings while using -Wswitch-enum and -Wshadow on internal libnfc files 2012-05-16 18:08:42 +00:00
Romuald Conty d6a1249469 current debian package can compile all drivers except acr122_pcsc (PCSC dependencies have already been removed from package) 2012-05-16 18:06:27 +00:00
Romuald Conty 9ea7a9ea27 delete unused log4crc file 2012-05-16 18:02:51 +00:00
Romuald Conty 05acb85372 Use explicit case instead of default in switch()
- Fix warnings while using -Wswitch-enum
 - Fix two minor bugs due to a bad case handle
2012-05-16 17:51:34 +00:00
Romuald Conty 10f24d97aa Any successfull PowerDown command have to change local power mode state 2012-05-16 16:48:06 +00:00
Romuald Conty 7b82a98b72 Improve acr122_usb frame building and add links to documentations 2012-05-15 07:27:28 +00:00
Romuald Conty a56e5f9cd7 Fix nfc-emulation, now works with utils/nfc-emulate-forum-tag4 and Nexus S 2012-05-14 21:20:26 +00:00
Romuald Conty 9383fa66bf Fix emulation based on nfc-emulation.c 2012-05-14 20:47:41 +00:00
Romuald Conty 769fc63bb0 Fix acr122_pcsc driver name. 2012-05-14 20:40:19 +00:00
Romuald Conty 851d035588 drivers/pn532_uart: flush uart input on error to resync uart port 2012-05-10 19:37:55 +00:00
Romuald Conty 4990f57df8 debug messages are sent in stderr stream (Thanks to Spock) 2012-05-02 01:46:44 +00:00
Romuald Conty 8549bc1e4c share some traces with USB devices (Thank to yobibe) 2012-05-01 23:17:24 +00:00
Romuald Conty 82b2cfa883 Smart merge of acr122_usb branch: add acr122_usb driver without removing acr122_pcsc support. 2012-05-01 23:09:57 +00:00
Romuald Conty e7f85811a1 fix *get_supported_modulation and *get_supported_baud_rate protos in nfc_driver and public ones. 2012-03-01 13:52:51 +00:00
Romuald Conty f98437c377 fix pn53x_get_supported_modulation() and pn53x_get_supported_baud_rate() functions 2012-03-01 13:43:04 +00:00
Romuald Conty 3eba0e9b54 Prepare libnfc 1.6.0-rc1 2012-03-01 12:00:23 +00:00
Romuald Conty 03d185b536 Prepare libnfc 1.6.0-rc1 2012-03-01 11:37:16 +00:00
Romuald Conty 9720bc45b4 Prepare libnfc 1.6.0-rc1 2012-03-01 11:24:59 +00:00
Romuald Conty 4878361d27 drivers/acr122s: fix ACR122S initialization (Fixes Issue 185) 2012-02-27 14:10:47 +00:00
Romuald Conty 75e776ffd0 utils/nfc-mfclassic: remove non-conscistent "extract payload" option in nfc-mfclassic and use MIFARE instead of Mifare typo (Thanks to Thomas Hood) 2012-02-15 13:41:38 +00:00
Romuald Conty 70484509af libnfc-1.5-acr122-usb> support for ACR122U only (not Touchatag) 2012-01-27 14:38:14 +00:00
Romuald Conty 24e298626a libnfc-1.5-acr122-usb> fix minor bugs and apply pn53x_usb's patch to be used under FreeBSD too 2012-01-26 21:36:08 +00:00
Romuald Conty e49eb6c660 libnfc-1.5-acr122-usb> import partial work on "ACR122 without PCSC" driver 2012-01-26 15:23:11 +00:00
Romuald Conty a3a0002f8d fix miss-returned error code (ETGREL -> NFC_ETGRELEASED). 2012-01-18 18:08:39 +00:00