Add ISO14443-4 modulation to hardware polling only when NDO_AUTO_ISO14443_4A have been enabled and document this features and known issues.

This commit is contained in:
Romuald Conty 2010-10-19 09:34:18 +00:00
parent f75d2d3582
commit f249af6266
6 changed files with 28 additions and 10 deletions

View file

@ -23,7 +23,7 @@ and
are covered by the GNU Lesser General Public License (LGPL), version 3.
.SH AUTHORS
Roel Verdult <roel@libnfc.org>
Romuald Conty <romuald@libnfc.org>>
Romuald Conty <romuald@libnfc.org>
.PP
This manual page was written by Romuald Conty <romuald@libnfc.org>>.
This manual page was written by Romuald Conty <romuald@libnfc.org>.
It is licensed under the terms of the GNU GPL (version 2 or later).

View file

@ -23,7 +23,7 @@ and
are covered by the GNU Lesser General Public License (LGPL), version 3.
.SH AUTHORS
Roel Verdult <roel@libnfc.org>
Romuald Conty <romuald@libnfc.org>>
Romuald Conty <romuald@libnfc.org>
.PP
This manual page was written by Romuald Conty <romuald@libnfc.org>>.
This manual page was written by Romuald Conty <romuald@libnfc.org>.
It is licensed under the terms of the GNU GPL (version 2 or later).

View file

@ -34,7 +34,7 @@ and
are covered by the GNU Lesser General Public License (LGPL), version 3.
.SH AUTHORS
Roel Verdult <roel@libnfc.org>
Romuald Conty <romuald@libnfc.org>>
Romuald Conty <romuald@libnfc.org>
.PP
This manual page was written by Romuald Conty <romuald@libnfc.org>>.
This manual page was written by Romuald Conty <romuald@libnfc.org>.
It is licensed under the terms of the GNU GPL (version 2 or later).

View file

@ -11,6 +11,22 @@ using ISO14443-A, FeliCa, Jewel and ISO14443-B modulations.
This tool relies on a hardware polling feature of the PN532, it will display
available information retrieved from the tag.
.SH IMPORTANT
There are some well-know limits with this example:
- Even with NDO_AUTO_14443_4A enabled (default),
.B nfc-poll
can miss ATS. That due to the way the PN532 use to poll for ISO14443 type A, it
will attempt to find ISO14443-4-only targets, then ISO14443-3. If your
ISO14443-4 target is present when PN532 looks for ISO14443-4-only, ATS will be
retrieved. But if your target enter the field during ISO14443-3, RATS will not
be sent and ATS not retrieved.
-
.B nfc-poll
can show up only one card while two are in field. That's due, again, to the way
the PN532 poll for targets. It will stop polling when one modulation got a
result, so if you have, for example, one ISO14443-3 (eg. Mifare Ultralight) and
one ISO14443-4 (eg. Mifare DESFire), it will probably return only the
ISO14443-4.
.SH BUGS
Please report any bugs on the
.B libnfc
@ -22,7 +38,7 @@ and
.B libnfc-examples
are covered by the GNU Lesser General Public License (LGPL), version 3.
.SH AUTHORS
Romuald Conty <romuald@libnfc.org>>
Romuald Conty <romuald@libnfc.org>
.PP
This manual page was written by Romuald Conty <romuald@libnfc.org>>.
This manual page was written by Romuald Conty <romuald@libnfc.org>.
It is licensed under the terms of the GNU GPL (version 2 or later).

View file

@ -189,7 +189,9 @@ typedef enum {
NDO_ACCEPT_MULTIPLE_FRAMES = 0x31,
/** This option can be used to enable or disable the auto-switching mode to
* ISO14443-4 is device is compliant.
* In initiator mode, it means that NFC chip will send RATS automatically.
* In initiator mode, it means that NFC chip will send RATS automatically when
* select and it will automatically poll for ISO14443-4 card when ISO14443A is
* requested.
* In target mode, with a NFC chip compiliant (ie. PN532), the chip will
* emulate a 14443-4 PICC using hardware capability */
NDO_AUTO_ISO14443_4 = 0x40,

View file

@ -526,7 +526,7 @@ pn53x_initiator_poll_targets (nfc_device_t * pnd,
pn53x_target_type_t apttTargetTypes[32];
for (size_t n=0; n<szModulations; n++) {
apttTargetTypes[szTargetTypes] = pn53x_nm_to_ptt(pnmModulations[n]);
if( apttTargetTypes[szTargetTypes] == PTT_MIFARE ) { // Hack to have ATR
if ((pnd->bAutoIso14443_4) && (apttTargetTypes[szTargetTypes] == PTT_MIFARE)) { // Hack to have ATS
apttTargetTypes[szTargetTypes] = PTT_ISO14443_4A_106;
szTargetTypes++;
apttTargetTypes[szTargetTypes] = PTT_MIFARE;