We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Using the nfc_initiator_transceive_bytes function to send HLTA command to the mifare classic tag will fail and report an 'Input / Output Error'.
nfc_initiator_transceive_bytes
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <nfc/nfc.h> #include <mifare.h> int main() { nfc_context* context; nfc_device* reader; nfc_target card; nfc_init(&context); reader = nfc_open(context, "pn532_uart:com5"); nfc_initiator_init(reader); nfc_modulation nm = { .nmt = NMT_ISO14443A, .nbr = NBR_106 }; int selected = nfc_initiator_select_passive_target(reader, nm, NULL, 0, &card); if (selected > 0) { mifare_param mp; uint8_t cmd[] = {0x50, 0x00}; memcpy(mp.mpa.abtAuthUid, card.nti.nai.abtUid, 4); memset(mp.mpa.abtKey, 0xff, sizeof(mp.mpa.abtKey)); if (nfc_initiator_mifare_cmd(reader, MC_AUTH_A, 0, &mp) == false) { printf("auth: %s\n", nfc_strerror(reader)); return EXIT_FAILURE; } if (nfc_initiator_transceive_bytes(reader, cmd, sizeof(cmd), NULL, 0, -1) < 0) { printf("halt: %s\n", nfc_strerror(reader)); return EXIT_FAILURE; } } nfc_close(reader); nfc_exit(context); return EXIT_SUCCESS; }
output:
error libnfc.driver.pn532_uart Application level error detected halt: Input / Output Error
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Using the
nfc_initiator_transceive_bytes
function to send HLTA command to the mifare classic tag will fail and report an 'Input / Output Error'.output:
The text was updated successfully, but these errors were encountered: