Commit graph

1683 commits

Author SHA1 Message Date
Romuald Conty
7b82a98b72 Improve acr122_usb frame building and add links to documentations 2012-05-15 07:27:28 +00:00
Philippe Teuwen
028db71d79 utils/nfc-emulate-forum-tag4: add support for v2.0 of the spec 2012-05-14 22:13:19 +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
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
Romain Tartiere
2256d5d3dc Fix usage of possibly uninitialized 'result'.
Can't tell how gcc/clang fail to detect this…
2012-05-14 12:50:04 +00:00
Ludovic Rousseau
dfcabf71f0 Fix compiler warning
uart_posix.c:55:1: warning: initialization discards 'const' qualifier from pointer target type [enabled by default]
2012-05-14 09:23:18 +00:00
Ludovic Rousseau
1ac1196af6 MIN/MAX are already defined in nfc-utils.h and nfc-internal.h 2012-05-13 19:16:52 +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
a14ec0cbaa Fix compiler warnings:
In file included from nfc-internal.c:26:
nfc-internal.h:111:5: warning: "_BYTE_ORDER" is not defined
nfc-internal.h:111:20: warning: "_LITTLE_ENDIAN" is not defined
2012-05-13 15:11:28 +00:00
Ludovic Rousseau
b9e5e96e49 Use "const char *" instead of "char *" for the strings passed to
log_put()

It does not solve any bug but will allow to detect some by the compiler
2012-05-13 14:58:44 +00:00
Ludovic Rousseau
3e678822ce Fix compiler warnings
pn532_uart.c:151: warning: no previous prototype for ‘pn532_connstring_decode’
pn532_uart.c:491: warning: no previous prototype for ‘pn532_uart_abort_command’
2012-05-13 14:51:18 +00:00
Ludovic Rousseau
56f3baf7a9 Fix compiler warnings
pn53x_usb.c:94: warning: no previous prototype for ‘pn53x_usb_bulk_read’
pn53x_usb.c:107: warning: no previous prototype for ‘pn53x_usb_bulk_write’
pn53x_usb.c:139: warning: no previous prototype for ‘pn53x_usb_get_device_model’
pn53x_usb.c:154: warning: no previous prototype for ‘pn53x_usb_get_end_points’
pn53x_usb.c:259: warning: no previous prototype for ‘pn53x_usb_connstring_decode’
pn53x_usb.c:713: warning: no previous prototype for ‘pn53x_usb_set_property_bool’
pn53x_usb.c:742: warning: no previous prototype for ‘pn53x_usb_abort_command’
2012-05-13 14:50:18 +00:00
Ludovic Rousseau
324776353a Fix compiler warnings
arygon.c:174: warning: no previous prototype for ‘arygon_connstring_decode’
arygon.c:360: warning: no previous prototype for ‘arygon_abort’
arygon.c:545: warning: no previous prototype for ‘arygon_abort_command’
2012-05-13 14:48:08 +00:00
Ludovic Rousseau
55322ad802 Fix compiler warnings
acr122s.c:422: warning: no previous prototype for ‘acr122s_connstring_decode’
acr122s.c:703: warning: no previous prototype for ‘acr122s_abort_command’
2012-05-13 14:47:10 +00:00
Ludovic Rousseau
054dc9b7ca Declare internal functions as static
Fixes compiler warnings:
acr122_usb.c:90: warning: no previous prototype for ‘acr122_usb_bulk_read’
acr122_usb.c:107: warning: no previous prototype for ‘acr122_usb_bulk_write’
acr122_usb.c:140: warning: no previous prototype for ‘acr122_usb_get_device_model’
acr122_usb.c:155: warning: no previous prototype for ‘acr122_usb_get_end_points’
acr122_usb.c:252: warning: no previous prototype for ‘acr122_usb_connstring_decode’
acr122_usb.c:306: warning: no previous prototype for ‘acr122_usb_open’
acr122_usb.c:428: warning: no previous prototype for ‘acr122_usb_close’
acr122_usb.c:497: warning: no previous prototype for ‘acr122_build_frame’
acr122_usb.c:660: warning: no previous prototype for ‘acr122_usb_abort_command’
2012-05-13 14:23: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
55ef86da33 Add a missing #include and fix a compiler warning
iso14443-subr.c:99: warning: no previous prototype for ‘iso14443_cascade_uid’
2012-05-13 13:02:37 +00:00
Ludovic Rousseau
2677dfb161 Add a missing #include and fix a compiler warning
nfc-internal.c:29: warning: no previous prototype for ‘prepare_initiator_data’
2012-05-13 13:01:06 +00:00
Ludovic Rousseau
e80d545b38 Fix compiler warning
mirror-subr.c:64: warning: no previous prototype for ‘mirror_bytes’
2012-05-13 12:58:44 +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
b5c1f2d619 Fix compiler warning
nfc-dep-initiator.c:54: warning: no previous prototype for ‘stop_dep_communication’
2012-05-13 12:54:37 +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
Ludovic Rousseau
6abb1c4eab Fix compiler warning
nfc-dep-target.c:53: warning: no previous prototype for ‘stop_dep_communication’
2012-05-13 12:51:57 +00:00
Ludovic Rousseau
edefdf0157 Fix compiler warnings
nfc-emulate-forum-tag2.c:78: warning: no previous prototype for ‘stop_emulation’
nfc-emulate-forum-tag2.c:116: warning: no previous prototype for ‘nfcforum_tag2_io’
2012-05-13 12:50:30 +00:00
Ludovic Rousseau
72ad8f7ad5 Remove an explicit cast and fix a compiler warning
nfc-emulate-uid.c:125: warning: function declaration isn’t a prototype
2012-05-13 12:49:28 +00:00
Ludovic Rousseau
714997fc34 Fix compiler warnings
nfc-emulate-uid.c:70: warning: no previous prototype for ‘intr_hdlr’
nfc-emulate-uid.c:79: warning: no previous prototype for ‘print_usage’
2012-05-13 12:48:28 +00:00
Ludovic Rousseau
96b1643522 Remove an explicit cast and fix a compiler warning
nfc-emulate-tag.c:180: warning: function declaration isn’t a prototype
2012-05-13 12:46:33 +00:00
Ludovic Rousseau
a7325ffded Fix compiler warnings:
nfc-emulate-tag.c:65: warning: no previous prototype for ‘intr_hdlr’
nfc-emulate-tag.c:76: warning: no previous prototype for ‘target_io’
nfc-emulate-tag.c:139: warning: no previous prototype for ‘nfc_target_emulate_tag’
2012-05-13 12:44:13 +00:00
Ludovic Rousseau
b65c133f80 stdin is already defined by stdio.h
Fix compiler warnings:

pn53x-tamashell.c: In function ‘main’:
pn53x-tamashell.c:79: warning: nested extern declaration of ‘__stdinp’
pn53x-tamashell.c:79: warning: redundant redeclaration of ‘__stdinp’
/usr/include/stdio.h:164: warning: previous declaration of ‘__stdinp’
was here
2012-05-13 12:42:51 +00:00
Ludovic Rousseau
e60f4ef870 Fix compiler warning
pn53x-tamashell.c:106: warning: initialization discards qualifiers from
pointer target type
2012-05-13 12:41:17 +00:00
Ludovic Rousseau
b3e21fecd2 Fix compiler warnings
nfc-poll.c:57: warning: no previous prototype for ‘stop_polling’
nfc-poll.c:67: warning: no previous prototype for ‘print_usage’
2012-05-13 12:39:17 +00:00
Ludovic Rousseau
da25554128 Remove an explicit cast and fix a compiler warning
nfc-relay.c:107: warning: function declaration isn’t a prototype
2012-05-13 12:38:18 +00:00
Ludovic Rousseau
43569e22e4 Fix compiler warnings
nfc-relay.c:65: warning: no previous prototype for ‘intr_hdlr’
nfc-relay.c:73: warning: no previous prototype for ‘print_usage’
2012-05-13 12:36:59 +00:00
Ludovic Rousseau
61ba0478cd Fix compiler warning
pn53x-sam.c:56: warning: no previous prototype for ‘wait_one_minute’
2012-05-13 12:32:30 +00:00
Ludovic Rousseau
5c82158a5d Declare internal functions as static
Fixes compiler warnings:
pn53x.c:565: warning: no previous prototype for ‘pn53x_ReadRegister’
pn53x.c:591: warning: no previous prototype for ‘pn53x_WriteRegister’
pn53x.c:748: warning: no previous prototype for ‘pn53x_int_to_timeout’
pn53x.c:1003: warning: no previous prototype for ‘pn53x_initiator_select_passive_target_ext’
pn53x.c:1334: warning: no previous prototype for ‘__pn53x_init_timer’
pn53x.c:1355: warning: no previous prototype for ‘__pn53x_get_timer’
2012-05-13 12:29:39 +00:00
Ludovic Rousseau
59b8ffcdb1 Declare internal functions as static
Fixes compiler warnings:
acr122_pcsc.c:106: warning: no previous prototype for ‘acr122_pcsc_get_scardcontext’
acr122_pcsc.c:118: warning: no previous prototype for ‘acr122_pcsc_free_scardcontext’
acr122_pcsc.c:198: warning: no previous prototype for ‘acr122_pcsc_connstring_decode’
2012-05-13 12:23:42 +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
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
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