Commit graph

2049 commits

Author SHA1 Message Date
Markus Werle
980513f4d1
Merge pull request #506 from nfc-tools/fix-cmake-module-path
fix CMAKE_MODULE_PATH for libnfc as a submodule
2018-10-02 12:22:41 +02:00
Markus Werle
d11db46ddd
fix CMAKE_MODULE_PATH for libnfc as a submodule
This fixes #496
2018-10-02 12:14:29 +02:00
Philippe Teuwen
a9af1927e6
Merge pull request #504 from AdamLaurie/master
Fix handling of NTAG OTP and LOCK bytes
2018-09-18 16:36:13 +02:00
Adam Laurie
25ee3a2f76 Add OTP/Capability Bytes handling to NTAG 2018-09-18 11:14:08 +01:00
Adam Laurie
3ba065f00b Remove redundant EV1 types and rely on NTAG types instead 2018-09-17 21:40:48 +01:00
Adam Laurie
40b54a10d7 Fix NTAG OTP and LOCK BYTES (Dynamic LOCK also applies to MF0UL21). Fix MF0UL21 sizing issue. 2018-09-17 16:58:49 +01:00
Adam Laurie
2229b9ed69 Merge remote-tracking branch 'upstream/master' 2018-09-17 14:40:34 +01:00
Adam Laurie
4c914e67e5 Fix handling of NTAG OTP and LOCK bytes 2018-09-17 14:37:09 +01:00
Philippe Teuwen
7c9a2a8062
Merge pull request #503 from AdamLaurie/master
Add support for Ultralight NTAG213/215/216
2018-09-16 22:37:51 +02:00
Adam Laurie
62f27c1c58 Add support for Ultralight NTAG213/215/216 2018-09-15 16:19:35 +01:00
Philippe Teuwen
216145fba5 Merge pull request #440 from rocco8620/patch-1
Wrong variable names
2017-09-03 22:10:44 +02:00
rocco8620
2b96c9f3c5 Wrong variable names
Wrong variable names (missing dots) on line 269, 270, 271
2017-09-03 21:53:17 +02:00
Romain Tartière
2869ae2eb8 Merge pull request #420 from hramrach/master
nfc-poll: print "Waiting for card removing..." before waiting for card removal
2017-07-19 15:02:43 +02:00
Michal Suchanek
f9417586c0 nfc-poll: print "Waiting for card removing..." before waiting 2017-07-14 16:19:26 +02:00
Philippe Teuwen
14f48d0122 Fix mem leak 2017-05-18 10:40:46 +02:00
Philippe Teuwen
00700bc66d Make Travis happy 2017-05-17 15:56:41 +02:00
Philippe Teuwen
dcdbff0705 New NFC modulation type NMT_BARCODE 2017-05-17 13:58:16 +02:00
Philippe Teuwen
9f1a68530a nfc-barcode: add options -r & -n 2017-05-16 14:35:58 +02:00
Philippe Teuwen
9f4290b61b Add nfc-barcode 2017-05-16 13:22:30 +02:00
Philippe Teuwen
c9ac17c9f5 Fix USB descriptors in SCL3711, NXP_PN533 and ASK LoGO also when corrupted by received data
The problem occurs in the following succession of events:

* Emit commands returning an answer larger than 16 bytes
* Re-enumerate USB devices without power cycle, e.g. a warm reboot of the PC

The bug can be reproduced for testing purposes with usbreset.c from
https://askubuntu.com/questions/645/how-do-you-reset-a-usb-device-from-the-command-line#661

$ lsusb|grep NFC
Bus 001 Device 010: ID 04e6:5591 SCM Microsystems, Inc. SCL3711-NFC&RW
$ sudo ./usbreset /dev/bus/usb/001/010
Resetting USB device /dev/bus/usb/001/010
Reset successful
$ echo -e "4a 01 00\n423000" |pn53x-tamashell
$ sudo ./usbreset /dev/bus/usb/001/010
Resetting USB device /dev/bus/usb/001/010
Error in ioctl: No such device
$ lsusb|grep NFC
... device disappeared

In the example above, reading 4 pages of a MFUL corrupted one single byte.
The entire buffer can be corrupted e.g. with fast-reading a MFUL EV1:
$ echo -e "4a 01 00\n423a0013"|pn53x-tamashell
2017-04-20 09:06:47 +02:00
Philippe Teuwen
1bf542b9e2 cosmetic 2017-04-20 09:06:41 +02:00
Philippe Teuwen
767abe50e2 PN533: Abuse the overflow bug to restore USB descriptors in one go 2017-04-20 08:35:46 +02:00
Philippe Teuwen
38164c49ef Fix USB descriptors in SCL3711, NXP_PN533 and ASK LoGO if needed when closing device
The problem occurs in the following succession of events:

* Emit commands larger than 17 bytes
* Re-enumerate USB devices without power cycle, e.g. a warm reboot of the PC

The bug can be reproduced for testing purposes with usbreset.c from
https://askubuntu.com/questions/645/how-do-you-reset-a-usb-device-from-the-command-line#661

$ lsusb|grep NFC
Bus 001 Device 010: ID 04e6:5591 SCM Microsystems, Inc. SCL3711-NFC&RW
$ sudo ./usbreset /dev/bus/usb/001/010
Resetting USB device /dev/bus/usb/001/010
Reset successful
$ echo 06000000000000000000000000000000000000 |pn53x-tamashell
$ sudo ./usbreset /dev/bus/usb/001/010
Resetting USB device /dev/bus/usb/001/010
Error in ioctl: No such device
$ lsusb|grep NFC
... device disappeared
2017-04-20 01:46:32 +02:00
Philippe Teuwen
c958b2c25d Enable missing USB desc workaround for NXP_PN533 too 2017-04-19 20:24:55 +02:00
Emmanuel Dreyfus
a06bfe50a5 Workaround missing USB config
After a DESfire operation SCL3711 will sometimes enter a state where
libusb-0.x is unable to fill config field in struct usb_device. The
USB device has to be power-cycled to restore a sane state.

This introduce a work around, by using hardcoded values for endpoints
and packet size when they are unavailable.
2017-04-19 19:46:14 +02:00
Philippe Teuwen
6235a8a26b Update example script to support PCard 2017-04-16 00:05:21 +02:00
Philippe Teuwen
b59f8fb3b4 Add more missing files 2017-04-04 13:31:39 +02:00
Philippe Teuwen
fead8d6849 Add missing files to autotools release process 2017-04-04 11:10:46 +02:00
Philippe Teuwen
e41a42cf96 nfc-mfultralight: avoid compilation warning 2017-04-01 01:03:41 +02:00
Philippe Teuwen
024fca9cb7 make style 2017-04-01 00:46:12 +02:00
Philippe Teuwen
3ec9ecf800 nfc-mfultralight: fix support for MF0UL21 2017-04-01 00:25:14 +02:00
Philippe Teuwen
560f6a6413 nfc-mfultralight: better parameters checks 2017-03-31 23:21:17 +02:00
Philippe Teuwen
abae2bb17b Merge remote-tracking branch 'adam/master'
* adam/master:
  allow partial writes. tidy up usage.
  vary expected dump size based on tag type
  read extra mf-ul EV1 blocks
  show EV1 auth PACK (tag/reader trust secret)
  show EV1 storage size
  add EV1 password auth to nfc-mfultralight
2017-03-31 23:00:15 +02:00
Philippe Teuwen
f2457d0559 Add pn53x-* to CMakeLists 2017-03-31 22:46:11 +02:00
Adam Laurie
a9f3e3a2ac allow partial writes. tidy up usage. 2017-03-23 18:19:59 +00:00
Adam Laurie
963eb074ec vary expected dump size based on tag type 2017-03-23 16:42:10 +00:00
Adam Laurie
c04dd91e98 read extra mf-ul EV1 blocks 2017-03-23 16:04:02 +00:00
Adam Laurie
fe04b85678 show EV1 auth PACK (tag/reader trust secret) 2017-03-23 12:03:34 +00:00
Adam Laurie
3f8bb59f1e show EV1 storage size 2017-03-23 11:05:00 +00:00
Adam Laurie
ca96e50e9b add EV1 password auth to nfc-mfultralight 2017-03-22 23:05:48 +00:00
Philippe Teuwen
32bb627108 Fix typo in drivers blacklist, thanks Godfrey Chung 2017-03-07 10:49:25 +01:00
Philippe Teuwen
86ce8dff52 Test Travis builds 2017-03-03 18:41:13 +01:00
Philippe Teuwen
b65674a8e3 Some systems (e.g. glibc < 2.17) require librt to get clock_gettime -> CMAKE 2017-03-02 23:42:36 +01:00
Philippe Teuwen
2d2a664f6c Some systems (e.g. glibc < 2.17) require librt to get clock_gettime 2017-03-02 22:03:22 +01:00
Philippe Teuwen
9ccfba2125 Update changelog & authors 2017-03-02 16:00:51 +01:00
Philippe Teuwen
787382f4d5 Merge pull request #394 from lab-401/master-4k-magic
Adding support for 4K magic cards
2017-03-02 15:01:05 +01:00
Philippe Teuwen
b7ae7cb5fd Merge remote-tracking branch 'adam/master'
* adam/master:
  Tidier fix for incorrect block write/count as per @doegox
  Fix number of blocks written. Fix number of written blocks reported.
2017-03-01 18:51:35 +01:00
Simon Yorkston
6c44c20ffc Adding support for 4K magic cards 2017-03-01 18:41:16 +01:00
Philippe Teuwen
c51caf424a nfc-mfultralight: fix failed read reporting and add failed pages count 2017-02-27 17:22:42 +01:00
Adam Laurie
e119296680 Tidier fix for incorrect block write/count as per @doegox 2017-02-19 12:42:30 +00:00