mirror of
https://github.com/nfc-tools/libnfc.git
synced 2026-03-02 05:36:36 +00:00
Change some nfc_target_mode_t to insist on the restrictions offer these mode
This commit is contained in:
@@ -87,7 +87,7 @@ main (int argc, const char *argv[])
|
||||
printf ("NFC device will now act as this D.E.P. target:\n");
|
||||
print_nfc_dep_info ( nt.nti.ndi );
|
||||
printf ("Waiting for initiator request...\n");
|
||||
if(!nfc_target_init (pnd, NTM_DEP, nt, abtRx, &szRx)) {
|
||||
if(!nfc_target_init (pnd, NTM_DEP_ONLY, nt, abtRx, &szRx)) {
|
||||
nfc_perror(pnd, "nfc_target_init");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ main (int argc, char *argv[])
|
||||
.nti.nai.szAtsLen = 0,
|
||||
};
|
||||
|
||||
if (!nfc_target_init (pnd, NTM_ISO14443_4_PICC, nt, abtRx, &szRx)) {
|
||||
if (!nfc_target_init (pnd, NTM_ISO14443_4_PICC_ONLY, nt, abtRx, &szRx)) {
|
||||
nfc_perror (pnd, "nfc_target_init");
|
||||
ERR("Could not come out of auto-emulation, no command was received");
|
||||
return EXIT_FAILURE;
|
||||
|
||||
@@ -118,7 +118,7 @@ nfc_target_emulate_tag(nfc_device_t* pnd, const nfc_target_t nt)
|
||||
byte_t abtTx[MAX_FRAME_LEN];
|
||||
bool loop = true;
|
||||
|
||||
if (!nfc_target_init (pnd, NTM_PASSIVE, nt, abtRx, &szRx)) {
|
||||
if (!nfc_target_init (pnd, NTM_PASSIVE_ONLY, nt, abtRx, &szRx)) {
|
||||
nfc_perror (pnd, "nfc_target_init");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -139,7 +139,7 @@ main (int argc, char *argv[])
|
||||
.nti.nai.szUidLen = 4,
|
||||
.nti.nai.szAtsLen = 0,
|
||||
};
|
||||
if (!nfc_target_init (pnd, NTM_PASSIVE, nt, abtRecv, &szRecvBits)) {
|
||||
if (!nfc_target_init (pnd, NTM_PASSIVE_ONLY, nt, abtRecv, &szRecvBits)) {
|
||||
ERR ("Could not come out of auto-emulation, no command was received");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
@@ -135,7 +135,7 @@ main (int argc, char *argv[])
|
||||
.nti.nai.szAtsLen = 0,
|
||||
};
|
||||
|
||||
if (!nfc_target_init (pndTag, NTM_PASSIVE, nt, abtReaderRx, &szReaderRxBits)) {
|
||||
if (!nfc_target_init (pndTag, NTM_PASSIVE_ONLY, nt, abtReaderRx, &szReaderRxBits)) {
|
||||
ERR ("%s", "Initialization of NFC emulator failed");
|
||||
nfc_disconnect (pndTag);
|
||||
return EXIT_FAILURE;
|
||||
|
||||
Reference in New Issue
Block a user