From fa4f6ca2ada8ba50b1af550a94f610f318724f2c Mon Sep 17 00:00:00 2001 From: Romuald Conty Date: Fri, 4 Feb 2011 17:43:36 +0000 Subject: [PATCH] nfc-emulate-uid: nfc_target_init() needs a emulable UID at first. (Fixes Issue 143) --- examples/nfc-emulate-uid.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/nfc-emulate-uid.c b/examples/nfc-emulate-uid.c index c39528e..f46fa1f 100644 --- a/examples/nfc-emulate-uid.c +++ b/examples/nfc-emulate-uid.c @@ -146,12 +146,13 @@ main (int argc, char *argv[]) .nm.nmt = NMT_ISO14443A, .nm.nbr = NBR_UNDEFINED, .nti.nai.abtAtqa = { 0x04, 0x00 }, - .nti.nai.abtUid = { 0xde, 0xad, 0xbe, 0xef }, + .nti.nai.abtUid = { 0x08, 0xad, 0xbe, 0xef }, .nti.nai.btSak = 0x20, .nti.nai.szUidLen = 4, .nti.nai.szAtsLen = 0, }; if (!nfc_target_init (pnd, &nt, abtRecv, &szRecvBits)) { + nfc_perror (pnd, "nfc_target_init"); ERR ("Could not come out of auto-emulation, no command was received"); exit(EXIT_FAILURE); }