examples/nfc-emulate-tag: minor comments improvements.
This commit is contained in:
parent
3052568597
commit
c457c45f55
1 changed files with 6 additions and 6 deletions
|
@ -89,9 +89,9 @@ target_io( nfc_target_t * pnt, const byte_t * pbtInput, const size_t szInput, by
|
||||||
strcpy((char*)pbtOutput, "You read block ");
|
strcpy((char*)pbtOutput, "You read block ");
|
||||||
pbtOutput[15] = pbtInput[1];
|
pbtOutput[15] = pbtInput[1];
|
||||||
break;
|
break;
|
||||||
case 0x50: // Deselect / HALT
|
case 0x50: // HLTA (ISO14443-3)
|
||||||
if (!quiet_output) {
|
if (!quiet_output) {
|
||||||
printf("Target halted me. Bye!\n");
|
printf("Initiator HLTA me. Bye!\n");
|
||||||
}
|
}
|
||||||
loop = false;
|
loop = false;
|
||||||
break;
|
break;
|
||||||
|
@ -104,7 +104,7 @@ target_io( nfc_target_t * pnt, const byte_t * pbtInput, const size_t szInput, by
|
||||||
// Next commands will be without CRC
|
// Next commands will be without CRC
|
||||||
init_mfc_auth = true;
|
init_mfc_auth = true;
|
||||||
break;
|
break;
|
||||||
case 0xe0: // RATS
|
case 0xe0: // RATS (ISO14443-4)
|
||||||
// Send ATS
|
// Send ATS
|
||||||
*pszOutput = pnt->nti.nai.szAtsLen + 1;
|
*pszOutput = pnt->nti.nai.szAtsLen + 1;
|
||||||
pbtOutput[0] = pnt->nti.nai.szAtsLen + 1; // ISO14443-4 says that ATS contains ATS_Lenght as first byte
|
pbtOutput[0] = pnt->nti.nai.szAtsLen + 1; // ISO14443-4 says that ATS contains ATS_Lenght as first byte
|
||||||
|
@ -114,7 +114,7 @@ target_io( nfc_target_t * pnt, const byte_t * pbtInput, const size_t szInput, by
|
||||||
break;
|
break;
|
||||||
case 0xc2: // S-block DESELECT
|
case 0xc2: // S-block DESELECT
|
||||||
if (!quiet_output) {
|
if (!quiet_output) {
|
||||||
printf("Target released me. Bye!\n");
|
printf("Initiator DESELECT me. Bye!\n");
|
||||||
}
|
}
|
||||||
loop = false;
|
loop = false;
|
||||||
break;
|
break;
|
||||||
|
@ -188,7 +188,7 @@ main (int argc, char *argv[])
|
||||||
|
|
||||||
if (pnd == NULL) {
|
if (pnd == NULL) {
|
||||||
ERR("Unable to connect to NFC device");
|
ERR("Unable to connect to NFC device");
|
||||||
return EXIT_FAILURE;
|
exit (EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
printf ("Connected to NFC device: %s\n", pnd->acName);
|
printf ("Connected to NFC device: %s\n", pnd->acName);
|
||||||
|
@ -250,7 +250,7 @@ main (int argc, char *argv[])
|
||||||
printf ("NFC device (configured as target) is now emulating the tag, please touch it with a second NFC device (initiator)\n");
|
printf ("NFC device (configured as target) is now emulating the tag, please touch it with a second NFC device (initiator)\n");
|
||||||
if (!nfc_target_emulate_tag (pnd, &nt)) {
|
if (!nfc_target_emulate_tag (pnd, &nt)) {
|
||||||
nfc_perror (pnd, "nfc_target_emulate_tag");
|
nfc_perror (pnd, "nfc_target_emulate_tag");
|
||||||
return EXIT_FAILURE;
|
exit (EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
nfc_disconnect(pnd);
|
nfc_disconnect(pnd);
|
||||||
|
|
Loading…
Add table
Reference in a new issue