Add ISO/IEC 14443 B' aka Type B' modulation partial support
This commit is contained in:
parent
77e522aade
commit
cd6946e751
7 changed files with 172 additions and 1 deletions
|
|
@ -185,6 +185,20 @@ main (int argc, const char *argv[])
|
|||
}
|
||||
}
|
||||
|
||||
nm.nmt = NMT_ISO14443BI;
|
||||
nm.nbr = NBR_106;
|
||||
// List ISO14443B' targets
|
||||
if (nfc_initiator_list_passive_targets (pnd, nm, ant, MAX_TARGET_COUNT, &szTargetFound)) {
|
||||
size_t n;
|
||||
if (verbose || (szTargetFound > 0)) {
|
||||
printf ("%d ISO14443B' passive target(s) found%s\n", (int) szTargetFound, (szTargetFound == 0) ? ".\n" : ":");
|
||||
}
|
||||
for (n = 0; n < szTargetFound; n++) {
|
||||
print_nfc_iso14443bi_info (ant[n].nti.nii, verbose);
|
||||
printf ("\n");
|
||||
}
|
||||
}
|
||||
|
||||
nm.nmt = NMT_JEWEL;
|
||||
nm.nbr = NBR_106;
|
||||
// List Jewel targets
|
||||
|
|
|
|||
|
|
@ -607,6 +607,30 @@ print_nfc_iso14443b_info (const nfc_iso14443b_info_t nbi, bool verbose)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
print_nfc_iso14443bi_info (const nfc_iso14443bi_info_t nii, bool verbose)
|
||||
{
|
||||
printf (" DIV: ");
|
||||
print_hex (nii.abtDIV, 4);
|
||||
if (verbose) {
|
||||
int version = (nii.btVerLog & 0x1e)>>1;
|
||||
printf (" Software Version: ");
|
||||
if (version == 15) {
|
||||
printf ("Undefined\n");
|
||||
} else {
|
||||
printf ("%i\n", version);
|
||||
}
|
||||
|
||||
if ((nii.btVerLog & 0x80) && (nii.btConfig & 0x80)){
|
||||
printf (" Wait Enable: yes");
|
||||
}
|
||||
}
|
||||
if ((nii.btVerLog & 0x80) && (nii.btConfig & 0x40)) {
|
||||
printf (" ATS: ");
|
||||
print_hex (nii.abtAtr, nii.szAtrLen);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
print_nfc_dep_info (const nfc_dep_info_t ndi, bool verbose)
|
||||
{
|
||||
|
|
@ -712,6 +736,10 @@ print_nfc_target (const nfc_target_t nt, bool verbose)
|
|||
printf ("ISO/IEC 14443-4B (%s) target:\n", str_nfc_baud_rate(nt.nm.nbr));
|
||||
print_nfc_iso14443b_info (nt.nti.nbi, verbose);
|
||||
break;
|
||||
case NMT_ISO14443BI:
|
||||
printf ("ISO/IEC 14443-4B' (%s) target:\n", str_nfc_baud_rate(nt.nm.nbr));
|
||||
print_nfc_iso14443bi_info (nt.nti.nii, verbose);
|
||||
break;
|
||||
case NMT_DEP:
|
||||
printf ("D.E.P. (%s) target:\n", str_nfc_baud_rate(nt.nm.nbr));
|
||||
print_nfc_dep_info (nt.nti.ndi, verbose);
|
||||
|
|
|
|||
|
|
@ -88,6 +88,7 @@ void print_hex_par (const byte_t * pbtData, const size_t szBits, const byte_t
|
|||
|
||||
void print_nfc_iso14443a_info (const nfc_iso14443a_info_t nai, bool verbose);
|
||||
void print_nfc_iso14443b_info (const nfc_iso14443b_info_t nbi, bool verbose);
|
||||
void print_nfc_iso14443bi_info (const nfc_iso14443bi_info_t nii, bool verbose);
|
||||
void print_nfc_felica_info (const nfc_felica_info_t nfi, bool verbose);
|
||||
void print_nfc_jewel_info (const nfc_jewel_info_t nji, bool verbose);
|
||||
void print_nfc_dep_info (const nfc_dep_info_t ndi, bool verbose);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue