Commit graph

266 commits

Author SHA1 Message Date
Philippe Teuwen
7597055f26 fix typos 2012-05-14 19:44:03 +00:00
Romain Tartiere
e9b2f5729c Fix a bunch of warnings. 2012-05-14 13:47:31 +00:00
Ludovic Rousseau
59d47bc7da Add MIN/MAX declarations in nfc-internal.h and nfc-utils.h
Remove the now useless #include <sys/param.h>
2012-05-13 19:15:44 +00:00
Ludovic Rousseau
a2b022609f Fix some spelling mistakes
Closes Issue #196
2012-05-13 13:10:15 +00:00
Ludovic Rousseau
02cf0b3d60 Fix compiler warning
nfc-list.c:64: warning: no previous prototype for ‘print_usage’
2012-05-13 13:03:47 +00:00
Ludovic Rousseau
2e075df1a9 Fix compiler warnings
nfc-emulate-forum-tag4.c:117: warning: no previous prototype for ‘nfcforum_tag4_io’
nfc-emulate-forum-tag4.c:231: warning: no previous prototype for ‘stop_emulation’
nfc-emulate-forum-tag4.c:241: warning: no previous prototype for ‘ndef_message_load’
nfc-emulate-forum-tag4.c:269: warning: no previous prototype for ‘ndef_message_save’
nfc-emulate-forum-tag4.c:285: warning: no previous prototype for ‘usage’
2012-05-13 12:57:49 +00:00
Ludovic Rousseau
7f9ba48018 Fix compiler warnings
nfc-read-forum-tag3.c:63: warning: no previous prototype for ‘print_usage’
nfc-read-forum-tag3.c:70: warning: no previous prototype for ‘stop_select’
nfc-read-forum-tag3.c:80: warning: no previous prototype for ‘build_felica_frame’
nfc-read-forum-tag3.c:91: warning: no previous prototype for ‘nfc_forum_tag_type3_check’
2012-05-13 12:56:41 +00:00
Ludovic Rousseau
0926f8a7c9 Fix compiler warning
nfc-probe.c:64: warning: no previous prototype for ‘print_usage’
2012-05-13 12:55:26 +00:00
Ludovic Rousseau
b5e688e74a Fix compiler warnings:
nfc-relay-picc.c:76: warning: no previous prototype for ‘intr_hdlr’
nfc-relay-picc.c:85: warning: no previous prototype for ‘print_usage’
nfc-relay-picc.c:96: warning: no previous prototype for ‘print_hex_fd4’
nfc-relay-picc.c:118: warning: no previous prototype for ‘scan_hex_fd3’
nfc-relay-picc.c: In function ‘main’:
nfc-relay-picc.c:190: warning: function declaration isn’t a prototype
2012-05-13 12:53:34 +00:00
Philippe Teuwen
896fa54ece nfc-utils: some changes on the newly introduced fingerprinting method, see log for details
* avoid hardcoded list sizes in #define
* merge card_link data into const_ca
* indexes start at 0, not 1, and use -1 as marker rather than 0
* fix bug in DESFire ATQA
* remove CL1 entries for double size UIDs, in practice we'll always get the latest SAK of the cascade
* remove CL2 tags, cf previous point
* compact const_cs considering the previous points
* keep const_cs strings only where they are informative
* premature halt of inner loop if there is no more SAK index to treat
* change atqa & sak types to uint16_t & uint8_t

* skip redundant matches in the old fingerprinting method
2012-05-02 23:48:06 +00:00
Philippe Teuwen
b10de698dd nfc-utils: new fingerprinting method closer to AN10833, patch proposed by Balazs Bucsay (thanks!) 2012-05-02 23:47:57 +00:00
Philippe Teuwen
93157dd30d nfc-utils.h: rename function oddparity_bytes_ts() to be coherent with nfc-utils.c 2012-05-02 21:18:46 +00:00
Philippe Teuwen
1cf9154296 nfc-utils: fix bug (remaining calls to old OddParity table) 2012-05-02 21:18:31 +00:00
Philippe Teuwen
b84e3d0f20 nfc-utils: smaller oddparity code 2012-05-02 10:02:56 +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
Romain Tartiere
05789e5a68 Fix a couple warnings. 2012-03-01 13:33:13 +00:00
Romuald Conty
3eba0e9b54 Prepare libnfc 1.6.0-rc1 2012-03-01 12:00:23 +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
Audrey Diacre
983d4932f3 documentation: add utils and examples and hide internal files. 2012-01-31 14:28:45 +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
Audrey Diacre
26245add73 Merge libnfc-1.5-new-api branch to trunk (r1168:1303). 2012-01-25 09:56:05 +00:00
Audrey Diacre
5a475cf074 add some whitespaces 2012-01-20 09:17:38 +00:00
Audrey Diacre
4c011279ff add context to nfc_init(), nfc_exit(), nfc_open() and nfc_list_devices() functions. 2012-01-18 16:22:06 +00:00
Romuald Conty
b366b8c027 add nfc_device_get_connstring() function and nfc-probe example to show devices connection strings 2012-01-18 13:17:01 +00:00
Audrey Diacre
207199dc34 examples, test and utils use now nfc_exit() function. 2012-01-18 11:36:18 +00:00
Audrey Diacre
1d55b6f8c6 examples, test and utils use now nfc_init() function. 2012-01-18 11:09:01 +00:00
Audrey Diacre
324af418db rename nfc_connect() function to nfc_open(). 2012-01-17 15:21:56 +00:00
Audrey Diacre
9eb37b3eee rename nfc_disconnect() function to nfc_close(). 2012-01-17 14:52:39 +00:00
Romain Tartiere
2d393bff91 Make these function accept no argument (instead of any). 2012-01-15 11:06:24 +00:00
Audrey Diacre
1ec504e163 nfc_list_devices() function returns now the number of devices found. 2012-01-10 10:35:36 +00:00
Audrey Diacre
00818e048c rx buffer size parameter of nfc_target_init() function is now a const size_t. 2012-01-09 11:26:57 +00:00
Romuald Conty
7df3bb5aeb various minor fixes/enhancements 2012-01-06 13:08:16 +00:00
Romuald Conty
48e92149e4 drop log4c support 2012-01-06 13:05:10 +00:00
Romuald Conty
22bea8d99b nfc_target_receive_*() need to know rx buffer size 2012-01-05 21:35:02 +00:00
Audrey Diacre
601105ef79 fix bad cast done in last revision. 2012-01-05 17:03:38 +00:00
Audrey Diacre
642f9a38f7 nfc_target_receive_bytes() function does not now use pszRx as parameter because this function returns it. 2012-01-05 16:33:55 +00:00
Audrey Diacre
239fd750c4 add timeout on nfc_target_init() and this function returns now received bytes count on success. 2012-01-05 15:10:11 +00:00
Audrey Diacre
c80ebdca25 nfc_abort_command() function returns now 0 on success and libnfc error code on failure and fix some warnings. 2012-01-05 14:49:02 +00:00
Audrey Diacre
5a1f0c2115 check result of nfc_initiator_init() function in examples/ and utils/ 2012-01-05 10:33:50 +00:00
Romuald Conty
125553c72e verbose option back for nfc-list, and newly implemented in nfc-poll 2012-01-04 21:29:43 +00:00
Audrey Diacre
6e7092b160 nfc_initiator_transceive_bits() function does not now use pszRxBits as parameter because this function returns it. 2012-01-04 15:30:42 +00:00
Audrey Diacre
61074f3497 nfc_initiator_transceive_bits() function returns now received bits count on success and libnfc error code on failure. 2012-01-04 11:46:07 +00:00
Audrey Diacre
9c1371dcca nfc_target_send_bytes() function returns now sent bytes count on success and libnfc error code on failure. 2011-12-22 15:59:08 +00:00
Audrey Diacre
ac6f652368 nfc_target_receive_bytes() function returns now received bytes count on success and libnfc error code on failure. 2011-12-22 15:39:51 +00:00
Audrey Diacre
f93bc59504 nfc_initiator_select_passive_target() function returns now the selected passive targets count on success. 2011-12-21 11:33:21 +00:00
Audrey Diacre
c41d7de8ca nfc_initiator_select_dep_target() function returns nox libnf error code and fix some uses of nfc_initiator_transceive_bytes() function. 2011-12-21 09:15:44 +00:00
Audrey Diacre
103485518c nfc_initiator_select_passive_target() function returns now libnfc error code. 2011-12-19 16:27:50 +00:00
Audrey Diacre
ba2a7cfe2e nfc_target_init() function returns now 0 on succes and libnfc error code on failure. 2011-12-19 15:35:37 +00:00
Romuald Conty
bf7c36d9bb less structs and defines publicly exposed
- nfc_device is now an opaque type;
 - PN53x specific errors are not public anymore;
 - nfc_device_name() renamed to nfc_device_get_name() for the sake of consistency;
 - examples/*, utils/* uses the new nfc_device_get_name() function instead of access directly to struct's content;
 - new error defined: NFC_ERFTRANS for notifying about RF transmission error, its used by mifare.c to detect permissions error on mifare;
 - drivers initiator_transceive_bytes() function now returns libnfc's error code on failure (<0), and received bytes count on success (>=0);
 - remove some unused errors.
2011-12-19 00:23:21 +00:00
Audrey Diacre
98355d36a7 nfc_initiator_init returns now error code and nfc_initiator_list_passive_targets returns now the number of targets found or error code. 2011-12-15 11:46:14 +00:00
Audrey Diacre
a615d969fd nfc_properties replace now nfc_options and nfc_configure is replaced by nfc_device_set_property_bool which returns error code. 2011-12-14 16:01:00 +00:00
Audrey Diacre
8b76d55fdc test/test_dep_active: fix multiple active DEP baudrates. 2011-12-14 10:31:08 +00:00
Audrey Diacre
52bc5853d8 Remove whitespace after star symbol for pointers 2011-11-25 15:21:10 +00:00
Audrey Diacre
5c7454a2f7 Timeout is now integer. 2011-11-25 11:37:30 +00:00
Audrey Diacre
784a2f86a2 Change byte_t type to uint8_t (Fixes Issue 147) 2011-11-24 10:54:42 +00:00
Audrey Diacre
ce846931bc Move nfc-emulate-forum-tag2 from utils to examples. 2011-11-24 10:27:02 +00:00
Audrey Diacre
c718fafee7 Massive code clean up: (Fixes Issue 161)
- Remove typedef from internal structs
- Remove _t suffix from types
- Fix tests using connstrings
2011-11-23 15:55:40 +00:00
Audrey Diacre
54b6827971 add missing manpages. 2011-11-22 15:23:18 +00:00
Romuald Conty
2e2d091bfd nfc-list: continue to attempt to reach devices after a connection failure. 2011-10-27 13:46:13 +00:00
Romuald Conty
55daa29a7c Allow to connect to a device using a connection string:
- Provide a nfc_get_default_device() that allow to grab the connstring stored
   in LIBNFC_DEFAULT_DEVICE environnement variable or returns the first
   available device if not set;
 - nfc_connect(NULL) now takes the default device (see
   nfc_get_default_device());
 - Removes nfc_driver_desc_t from public types
 - Defines nfc_connstring as char[1024]
 - examples/*: use nfc_connstring
 - examples/nfc-poll: now uses only the default device (instead of all devices
   availables)
 - Removes parse_args() from nfc-utils.[hc]
2011-10-17 13:03:56 +00:00
Romuald Conty
dc842a844c examples/nfc-read-forum-tag3: add new example to read a NFC Forum Tag Type 3 2011-10-10 00:40:34 +00:00
Romuald Conty
66e3ea6146 nfc-relay-picc.1 was missing from tarball 2011-10-03 11:16:42 +00:00
Romuald Conty
b2666dea15 windows port improved:
- PCSC headers/libs are not a requierement sif you dont select ACR122 driver
 - uart_win32 implementation now handles timeouts
2011-10-01 14:50:53 +00:00
Romuald Conty
d286a3c4b7 make distcheck OK 2011-10-01 13:29:18 +00:00
Romuald Conty
03a6f5e29c Update examples and utils manpages.(Fixes Issue 159) 2011-10-01 12:26:11 +00:00
Romuald Conty
8c7b61eaba move some examples to utils/ since they are not examples anymore :) (Fixes Issue 164) 2011-09-30 11:33:31 +00:00