Romuald Conty
8127a2ca63
Merge branch 'master' of https://code.google.com/p/libnfc
2013-02-01 11:46:26 +01:00
Romuald Conty
b5f8ce91c7
Uses configurable path for libnfc's configuration files
2013-02-01 11:11:39 +01:00
Romuald Conty
cf9e02879a
Enables logging by default when using CMake
2013-02-01 10:32:44 +01:00
Romuald Conty
93e26b1475
Releases libnfc 1.7.0 RC3
2013-01-31 17:53:00 +01:00
Romuald Conty
d26c5b248e
Adds windows files to tarball
2013-01-31 16:17:37 +01:00
Romuald Conty
519dd8f8e2
make style
2013-01-31 16:12:14 +01:00
Romuald Conty
acdde1088c
Renames contrib/win32/nfc_win32.c to contrib/win32/stdlib.c
2013-01-31 16:09:41 +01:00
Romuald Conty
c01b961be0
Fixes CMake under GNU/Linux
2013-01-31 16:04:47 +01:00
Romuald Conty
3fff5985fc
Moves Windows conditional code to dedicated files
2013-01-31 15:58:20 +01:00
Romuald Conty
a303b9e33c
Updates ChangeLog
2013-01-30 01:15:41 +01:00
Romuald Conty
98948172b4
Fixes pn53x_usb timeout while bulk write.
...
Thanks to Tredger for reporting.
Fixes issue 223.
2013-01-30 00:57:06 +01:00
Romuald Conty
cd2b03a08a
Add timeout parameter to nfc_emulate_target() function.
...
Fixes issue 219.
Thanks to raidolinja.
2013-01-30 00:10:24 +01:00
Romuald Conty
4b97700352
Removes exit() calls
...
Fixes issue 220
exit() was used to run abort-driven development while API changed, I forgot to remove them, sorry for that :-)
2013-01-28 13:57:40 +01:00
Romuald Conty
49d7ce61f3
Debian package uses the default configure script
2013-01-20 17:00:57 +01:00
Romuald Conty
ca7d01ade3
Enables pn532_uart driver by default
2013-01-20 17:00:21 +01:00
Romuald Conty
2d53208082
Fix unit tests
...
This commit bring tests to life!
New issue
Summary: test_dep_states test fails
When first device is idle, the second one states "RF Transmission Error" instead of simply not found any available device.
Full cutter log here:
debug libnfc.chip.pn53x InJumpForDEP
debug libnfc.chip.pn53x Timeout values: 300
debug libnfc.bus.uart TX: 00 00 ff 05 fb d4 56 00 00 00 d6 00
debug libnfc.bus.uart RX: 00 00 ff 00 ff 00
debug libnfc.chip.pn53x PN53x ACKed
debug libnfc.bus.uart Timeout!
debug libnfc.chip.pn53x InJumpForDEP
debug libnfc.chip.pn53x Timeout values: 300
debug libnfc.bus.uart TX: 00 00 ff 05 fb d4 56 00 00 00 d6 00
debug libnfc.bus.uart RX: 00 00 ff 00 ff 00
debug libnfc.chip.pn53x PN53x ACKed
debug libnfc.bus.uart RX: 00 00 ff 03 fd
debug libnfc.bus.uart RX: d5 57
debug libnfc.bus.uart RX: 01
debug libnfc.bus.uart RX: d3 00
debug libnfc.chip.pn53x Chip error: "Timeout" (01), returned error: "RF Transmission Error" (-20))
F
===============================================================================
Failure: test_dep_states
Problem with nfc_idle
<0 == res>
expected: <0>
actual: <-20>
diff:
? -20
./test_device_modes_as_dep.c:171: initiator_thread(): cut_assert_equal_int(0, res, cut_test_context_set_current_result_user_message( cut_test_context_current_peek(), cut_test_context_take_printf(cut_test_context_current_peek(), "Problem with nfc_idle")))
===============================================================================
2013-01-18 18:28:45 +01:00
Romuald Conty
443f70dd65
Fix wrong condition to display a warning when user disables autoscan
2013-01-18 18:14:59 +01:00
Romuald Conty
cbdac66fa4
Add quick start examples compliation to "make check"
2013-01-18 16:05:43 +01:00
Romuald Conty
9a3a43cdba
Ignore generated files into test/ directory
2013-01-18 14:36:35 +01:00
Romuald Conty
085fb60777
Fix version fetch using make_release.sh
2013-01-15 18:16:56 +01:00
Romuald Conty
6b5cd55fbf
Always add newer files when releasing
2013-01-15 14:28:34 +01:00
Romuald Conty
f2be582cd5
Fix timeout documentation
2013-01-15 14:22:21 +01:00
Romuald Conty
5d45718fe1
Fix Debian package for 1.7.0-RC1
2013-01-15 14:21:19 +01:00
Romuald Conty
945e1d140d
Bump API version
2013-01-15 13:45:48 +01:00
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