From d956ffb38624be200c216b93aa538a8c1308ce1c Mon Sep 17 00:00:00 2001 From: Romuald Conty Date: Thu, 6 Jan 2011 14:43:41 +0000 Subject: [PATCH] examples/nfc-emulate-tag: switch off easy framing when we are not emulating a ISO14443-4 target --- examples/nfc-emulate-tag.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/examples/nfc-emulate-tag.c b/examples/nfc-emulate-tag.c index 244f526..d2676a5 100644 --- a/examples/nfc-emulate-tag.c +++ b/examples/nfc-emulate-tag.c @@ -52,7 +52,8 @@ #include #include "nfc-utils.h" -#define MAX_FRAME_LEN 264 +#define MAX_FRAME_LEN (264) +#define SAK_ISO14443_4_COMPLIANT 0x20 static byte_t abtRx[MAX_FRAME_LEN]; static size_t szRx; @@ -216,8 +217,10 @@ main (int argc, char *argv[]) */ printf ("%s will emulate this ISO14443-A tag:\n", argv[0]); - print_nfc_iso14443a_info( nt.nti.nai, false ); + print_nfc_iso14443a_info (nt.nti.nai, true); + // Switch off NDO_EASY_FRAMING if target is not ISO14443-4 + nfc_configure (pnd, NDO_EASY_FRAMING, (nt.nti.nai.btSak & SAK_ISO14443_4_COMPLIANT)); 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)) { nfc_perror (pnd, "nfc_target_emulate_tag");