nfc-emulate-ndef: remove one pn53x_set_parameters(). Note: it works a lot better with ARYGON (serial @9600 bauds) than touchatag through PCSC and USB.
This commit is contained in:
parent
ad7a8a59a6
commit
e800765ffc
1 changed files with 5 additions and 5 deletions
|
@ -56,13 +56,10 @@ transmit_bytes (const byte_t * pbtTx, const size_t szTxLen)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Transmit the command bytes
|
// Transmit the command bytes
|
||||||
// FIXME doesn't use a pn53x specific function, use libnfc's API
|
|
||||||
pn53x_set_parameters(pnd,0);
|
|
||||||
if (!nfc_target_send_bytes(pnd, pbtTx, szTxLen)) {
|
if (!nfc_target_send_bytes(pnd, pbtTx, szTxLen)) {
|
||||||
nfc_perror (pnd, "nfc_target_send_bytes");
|
nfc_perror (pnd, "nfc_target_send_bytes");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
pn53x_set_parameters(pnd,SYMBOL_PARAM_fISO14443_4_PICC);
|
|
||||||
|
|
||||||
if (!nfc_target_receive_bytes(pnd,abtRx,&szRxLen)) {
|
if (!nfc_target_receive_bytes(pnd,abtRx,&szRxLen)) {
|
||||||
nfc_perror (pnd, "nfc_target_receive_bytes");
|
nfc_perror (pnd, "nfc_target_receive_bytes");
|
||||||
|
@ -89,8 +86,8 @@ main (int argc, char *argv[])
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
printf ("[+] Connected to NFC device: %s\n", pnd->acName);
|
printf ("Connected to NFC device: %s\n", pnd->acName);
|
||||||
printf ("[+] Emulating NDEF tag now, please touch it with a second NFC device\n");
|
printf ("Emulating NDEF tag now, please touch it with a second NFC device\n");
|
||||||
|
|
||||||
nfc_target_t nt = {
|
nfc_target_t nt = {
|
||||||
.ntt = NTT_MIFARE,
|
.ntt = NTT_MIFARE,
|
||||||
|
@ -101,6 +98,9 @@ main (int argc, char *argv[])
|
||||||
.nti.nai.szAtsLen = 0,
|
.nti.nai.szAtsLen = 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// FIXME doesn't use a pn53x specific function, use libnfc's API
|
||||||
|
pn53x_set_parameters(pnd,SYMBOL_PARAM_fISO14443_4_PICC);
|
||||||
|
|
||||||
if (!nfc_target_init (pnd, NTM_ISO14443_4_PICC, nt, abtRx, &szRxLen)) {
|
if (!nfc_target_init (pnd, NTM_ISO14443_4_PICC, nt, abtRx, &szRxLen)) {
|
||||||
nfc_perror (pnd, "nfc_target_init");
|
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");
|
||||||
|
|
Loading…
Add table
Reference in a new issue