nfc-emulate-uid: fix wrong UID length in initial nfc_target_t

This commit is contained in:
Romuald Conty 2010-10-12 14:04:30 +00:00
parent d7bffac0e6
commit 202c2a7a8b

View file

@ -115,11 +115,11 @@ main (int argc, char *argv[])
// Note: We have to build a "fake" nfc_target_t in order to do exactly the same that was done before the new nfc_target_init() was introduced. // Note: We have to build a "fake" nfc_target_t in order to do exactly the same that was done before the new nfc_target_init() was introduced.
nfc_target_t nt = { nfc_target_t nt = {
.ntt = NTT_GENERIC_PASSIVE_106, .ntt = NTT_MIFARE,
.nti.nai.abtAtqa = { 0x04, 0x00 }, .nti.nai.abtAtqa = { 0x04, 0x00 },
.nti.nai.abtUid = { 0xde, 0xad, 0xbe, 0xaf, 0x62 }, .nti.nai.abtUid = { 0xde, 0xad, 0xbe, 0xaf },
.nti.nai.btSak = 0x20, .nti.nai.btSak = 0x20,
.nti.nai.szUidLen = 5, .nti.nai.szUidLen = 4,
.nti.nai.szAtsLen = 0, .nti.nai.szAtsLen = 0,
}; };
if (!nfc_target_init (pnd, NTM_PASSIVE, nt, abtRecv, &szRecvBits)) { if (!nfc_target_init (pnd, NTM_PASSIVE, nt, abtRecv, &szRecvBits)) {