Philippe Teuwen
4576bad369
Fix ISO14443B' ATS broken by updated API
2013-01-19 00:14:19 +01:00
Philippe Teuwen
04a7d2a3ba
Allow device.optional=true to tolerate missing device
2013-01-18 22:54:44 +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
f2be582cd5
Fix timeout documentation
2013-01-15 14:22:21 +01:00
Romuald Conty
945e1d140d
Bump API version
2013-01-15 13:45:48 +01:00
Romuald Conty
82c41b4fc1
Fixes style: make style
2012-12-09 20:09:55 +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
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
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
Philippe Teuwen
cf6d843c18
Fix pseudo-logging API when no logging is used
2012-12-04 19:14:37 +01:00
Philippe Teuwen
2651cdce2e
Remove last SVN cruft
2012-11-27 18:56:54 +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
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
Philippe Teuwen
fda8d60ce0
Adapt *transmit_bytes_timed API to be closer to *transmit_bytes
2012-11-12 16:54:03 +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
d6c97cb974
Fixes CMake build (Fixes Issue 211).
...
Thanks to Alex Lian
2012-10-30 22:29:13 +01: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
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
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
Ludovic Rousseau
4288cd3c33
Add example path so that doxygen can find the file
2012-09-14 20:08:01 +00:00
Ludovic Rousseau
e40d857ac5
Touchatag PC/SC reader name has changed
...
CCID driver version >= 1.4.6 has changed the order of the readers.
Unfortunately the Touchatag reader uses the exact same PID (USB Product
ID) as many other ACS readers:
#0x072F:0x90CC:ACS ACR122U (ACR122U.txt)
#0x072F:0x90CC:ACS ACR 38U-CCID (ACR38U-CCID.txt)
#0x072F:0x90CC:ACS ACR100 (ACS_ACR100.txt)
#0x072F:0x90CC:ACS ACR38 plugin (ACS_ACR38_plugin.txt)
#0x072F:0x90CC:ACS AET65 (ACS_AET65.txt)
And the name for the device 0x072F:0x90CC is now "ACS AET65"
Fixes bug #202
2012-07-31 08:45:14 +00:00
Philippe Teuwen
c87eab4958
Add support for OpenPCD2
2012-07-01 11:22:45 +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
Philippe Teuwen
4b5b45f14a
Add "usb" keyword support to connstring to specify all usb drivers at once
2012-06-06 01:10:05 +00:00