nfc-emulate-uid: nfc_target_init() needs a emulable UID at first. (Fixes Issue 143)

This commit is contained in:
Romuald Conty 2011-02-04 17:43:36 +00:00
parent bb1ebea711
commit fa4f6ca2ad

View file

@ -146,12 +146,13 @@ main (int argc, char *argv[])
.nm.nmt = NMT_ISO14443A, .nm.nmt = NMT_ISO14443A,
.nm.nbr = NBR_UNDEFINED, .nm.nbr = NBR_UNDEFINED,
.nti.nai.abtAtqa = { 0x04, 0x00 }, .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.btSak = 0x20,
.nti.nai.szUidLen = 4, .nti.nai.szUidLen = 4,
.nti.nai.szAtsLen = 0, .nti.nai.szAtsLen = 0,
}; };
if (!nfc_target_init (pnd, &nt, abtRecv, &szRecvBits)) { 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"); ERR ("Could not come out of auto-emulation, no command was received");
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }