Commit graph

2200 commits

Author SHA1 Message Date
Unknown
6921e57fb8 correct typo 2020-06-27 13:33:04 +02:00
Unknown
01bc5693d9 another hardcode value 2020-06-26 19:08:04 +02:00
Unknown
db957aabdf adds write condition check in unlock_card() 2020-06-26 18:29:01 +02:00
Unknown
f7b9b0eafa remove unused stuff for block 0 writing 2020-06-26 13:36:18 +02:00
Unknown
709ef8381f reinit for retrieving new uid after block 0 write 2020-06-26 13:34:50 +02:00
Unknown
3c55b8746b swap 0 block write and other blocks write
when writing to gen2 and possible on gen3, it writes first block 3 wich is the trailing sector before writing to block 0, so the last write to block 0 fails because authenticate to old keyset
2020-06-26 01:50:11 +02:00
Unknown
02f0f6b290 add verbose case
add verbose case
2020-06-26 01:28:57 +02:00
Unknown
7a5e654309 hardcoded values 2020-06-25 23:56:38 +02:00
Unknown
2b21d87e8e add gen2 desc to help
add gen2 desc to help
2020-06-25 23:45:17 +02:00
Unknown
4e922e8194 sends lib log to /dev/null in posix and added option (v) to reactivate
There in an error handling and messaging inside
2020-06-25 23:32:03 +02:00
Unknown
3f4b7a037a add rewrite support for gen2 tags with W command
add rewrite support for gen2 tags with W command
2020-06-25 23:10:06 +02:00
Unknown
dd96571f88 no need to loop, only one block 2020-06-25 19:49:04 +02:00
Unknown
5a87f1f3db Splitting block 0 writing and other block writing, not needed anymore 2020-06-25 19:29:38 +02:00
Adam Laurie
7b6ff73c4b only test DirectWrite write if we need to. only write block 0 if specifically requested to. 2020-06-25 17:45:20 +02:00
Adam Laurie
e560689f60 restore original block count logic and add debuggers for block0 2020-06-25 17:44:20 +02:00
Adam Laurie
a28a537610 partial fix of nfc-mfclassic which only writes first sector of each block and not sector 1,2,3 unles 'unlocked' write - debuggers still in! 2020-06-25 17:43:19 +02:00
Philippe Teuwen
4b7791f845
Merge pull request #605 from ffontaine/master
autotools: make example build optional
2020-06-24 16:18:29 +02:00
Philippe Teuwen
1f6f75af38
Merge pull request #606 from FeitianSmartcardReader/master
Add length check when work with Feitian OEM R502
2020-06-22 11:20:50 +02:00
hongbin@ftsafe.com
435e2ffc81 Add length check to have compatible with R502
improve the code, to have compatible with OEM R502 firmware.
2020-06-22 14:33:15 +08:00
Fabrice Fontaine
874d9605aa autotools: make example build optional
This patch makes example build optional for autotools build system.

In order to keep the former behavior, example build is enabled by default.

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
[Retrieved (and slightly updated to remove CMakeLists.txt) from:
https://git.buildroot.net/buildroot/tree/package/libnfc/0001-build-systems-make-example-build-optional.patch]
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2020-06-21 23:38:44 +02:00
Philippe Teuwen
53eccd4be4
Merge pull request #603 from FeitianSmartcardReader/master
Update pcsc.c
2020-05-27 19:15:22 +02:00
Feitian Technologies
b02f94d7da
Update pcsc.c
1. Fix bug for Mifare card, before do authentication, need to load PIN/password first
2. Fix bug when to get card ATS
2020-05-28 00:54:20 +08:00
Philippe Teuwen
f02ff51449 Prepare 1.8.0 version 2020-05-22 12:20:17 +02:00
Philippe Teuwen
5c3c468a6a Restore nfc_modulation_type order of v1.7.1 2020-05-22 12:20:17 +02:00
Ludovic Rousseau
63cf0acb0b pcsc: remove unused function pcsc_initiator_deselect_target
pcsc.c:763:12: warning: ‘pcsc_initiator_deselect_target’ defined but not used [-Wunused-function]
 static int pcsc_initiator_deselect_target(struct nfc_device *pnd)
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2020-05-22 10:13:52 +02:00
Ludovic Rousseau
5294c0290f Fix compiler warnings: no previous prototype
Local function should be declared static.

Fix:
pcsc.c:107:1: warning: no previous prototype for ‘pcsc_get_scardcontext’ [-Wmissing-prototypes]
 pcsc_get_scardcontext(void)
 ^~~~~~~~~~~~~~~~~~~~~
pcsc.c:119:1: warning: no previous prototype for ‘pcsc_free_scardcontext’ [-Wmissing-prototypes]
 pcsc_free_scardcontext(void)
 ^~~~~~~~~~~~~~~~~~~~~~
pcsc.c:135:5: warning: no previous prototype for ‘pcsc_transmit’ [-Wmissing-prototypes]
 int pcsc_transmit(struct nfc_device *pnd, const uint8_t *tx, const size_t tx_len, uint8_t *rx, size_t *rx_len)
     ^~~~~~~~~~~~~
pcsc.c:160:5: warning: no previous prototype for ‘pcsc_get_status’ [-Wmissing-prototypes]
 int pcsc_get_status(struct nfc_device *pnd, int *target_present, uint8_t *atr, size_t *atr_len)
     ^~~~~~~~~~~~~~~
pcsc.c:178:5: warning: no previous prototype for ‘pcsc_reconnect’ [-Wmissing-prototypes]
 int pcsc_reconnect(struct nfc_device *pnd, DWORD share_mode, DWORD protocol, DWORD disposition)
     ^~~~~~~~~~~~~~
pcsc.c:194:9: warning: no previous prototype for ‘pcsc_get_icc_type’ [-Wmissing-prototypes]
 uint8_t pcsc_get_icc_type(const struct nfc_device *pnd)
         ^~~~~~~~~~~~~~~~~
pcsc.c:203:6: warning: no previous prototype for ‘is_pcsc_reader_vendor’ [-Wmissing-prototypes]
 bool is_pcsc_reader_vendor(const struct nfc_device *pnd, const char *target_vendor_name)
      ^~~~~~~~~~~~~~~~~~~~~
pcsc.c:219:5: warning: no previous prototype for ‘pcsc_get_atqa’ [-Wmissing-prototypes]
 int pcsc_get_atqa(struct nfc_device *pnd, uint8_t *atqa, size_t atqa_len)
     ^~~~~~~~~~~~~
pcsc.c:245:5: warning: no previous prototype for ‘pcsc_get_ats’ [-Wmissing-prototypes]
 int pcsc_get_ats(struct nfc_device *pnd, uint8_t *ats, size_t ats_len)
     ^~~~~~~~~~~~
[...]
2020-05-22 10:11:52 +02:00
Ludovic Rousseau
fa78e8b883 Doxygen: unset DOT_FONTNAME
Fix warning:
warning: doxygen no longer ships with the FreeSans font.
You may want to clear or change DOT_FONTNAME.
Otherwise you run the risk that the wrong font is being used for dot generated graphs.
2020-05-22 10:02:37 +02:00
Ludovic Rousseau
357ae384af Doxygen: update Doxyfile.in to version 1.8.13
Fix warnings:
warning: Tag `SYMBOL_CACHE_SIZE' at line 299 of file `./Doxyfile' has become obsolete.
         To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u"
warning: Tag `SHOW_DIRECTORIES' at line 487 of file `./Doxyfile' has become obsolete.
         To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u"
warning: Tag `HTML_ALIGN_MEMBERS' at line 823 of file `./Doxyfile' has become obsolete.
         To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u"
warning: Tag `USE_INLINE_TREES' at line 976 of file `./Doxyfile' has become obsolete.
         To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u"
warning: Tag `XML_SCHEMA' at line 1169 of file `./Doxyfile' has become obsolete.
         To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u"
warning: Tag `XML_DTD' at line 1175 of file `./Doxyfile' has become obsolete.
         To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u"
2020-05-22 09:58:44 +02:00
Ludovic Rousseau
c8692aa239 Fix compiler warning: no previous prototype
nfc-mfclassic.c:623:6: warning: no previous prototype for ‘is_directwrite’ [-Wmissing-prototypes]
 bool is_directwrite(void)
      ^~~~~~~~~~~~~~
2020-05-22 09:51:14 +02:00
Ludovic Rousseau
91d7c5d32f Fix compiler warning: old-style function definition
nfc-mfclassic.c:623:6: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
 bool is_directwrite()
      ^~~~~~~~~~~~~~
nfc-mfclassic.c: In function ‘is_directwrite’:
nfc-mfclassic.c:623:6: warning: old-style function definition [-Wold-style-definition]
2020-05-22 09:50:26 +02:00
Philippe Teuwen
4525cd1c32 make style 2020-05-21 15:06:17 +02:00
Philippe Teuwen
f52d04e0a7 remove warnings 2020-05-21 15:05:48 +02:00
Philippe Teuwen
5a059db901 remove warnings 2020-05-21 14:50:30 +02:00
Philippe Teuwen
730f705c0d pcsc.c: fix error and remove warnings 2020-05-21 14:42:45 +02:00
Philippe Teuwen
6b4f6249bd rework README 2020-05-21 14:27:13 +02:00
Philippe Teuwen
d29b3170d9 update changelog 2020-05-21 14:14:43 +02:00
Adam Laurie
4a2c764961 Prepare 1.7.2 version 2020-05-21 12:05:38 +01:00
Adam Laurie
020f5317a6
Merge pull request #601 from h3xx/fix-typo
Fix typo
2020-05-21 11:40:22 +01:00
Philippe Teuwen
675c30eb93
Merge pull request #600 from FeitianSmartcardReader/master
Modify pcsc.c to have support for Mifare classic and Ultralight card
2020-05-14 12:49:43 +02:00
Feitian Technologies
beb8fdd759
Update pcsc.c
Remove call pcsc_get_vendor_name, get the vendor name from struct nfc_device
2020-05-14 11:08:23 +08:00
Dan Church
6f41ea3ad3
Fix typo
Introduced in #598
2020-05-13 09:05:27 -05:00
hongbin@ftsafe.com
8352c80679 Modify pcsc.c to have support for Mifare classic and Ultralight card
Modify pcsc.c and mifare.c files.
1. add code into pcsc.c to have support Mifare classic card.
2. The PCSC reader has SW value, add response data length for PCSC
reader
2020-05-13 12:15:28 +08:00
Adam Laurie
66176016ed bring nfc-list man page up to date 2020-05-12 16:52:47 +01:00
Adam Laurie
f1bb27d1af
Merge pull request #598 from h3xx/add-check-libnfc-nci
Add check for Libnfc-NCI before enabling pn71xx
thanks @h3xx
2020-05-12 12:36:55 +01:00
Adam Laurie
c884f36b94
Merge pull request #597 from nfc-tools/iclass
Iclass from Adam
2020-05-11 20:23:24 +01:00
Dan Church
17e615e8b1
Add check for Libnfc-NCI before enabling pn71xx
If the user specifically requests the driver, throw an error if it
cannot find libnfc-nci.

Also use the value from pkg-config to determine the library name,
instead of hard-coding it.
2020-05-11 13:45:53 -05:00
Philippe Teuwen
a07d879496 rework NMT_END_ENUM 2020-05-11 20:00:04 +02:00
Philippe Teuwen
10f880374c nfc-list bitfield 2020-05-11 19:55:44 +02:00
Philippe Teuwen
96568a1023 fix nfc-list for types B 2020-05-11 19:46:46 +02:00
Adam Laurie
dcc52cd4d5 updates as per @goedox comments 2020-05-11 18:04:57 +01:00