Topic: Need help with Mifare Hello World
Hi all,
I am trying to learn more about NFC and Mifare. I copied and edited some example code that interfaces with libnfc. My goal is to write a program that reads the UID from the card, and later extend it to read some data from a card.
However, I am already having trouble just retrieving the UID from the card. I am using an Arygon reader and some Mifare Classic 1K cards.
The call to nfc_initiator_select_tag(...) gives me a nfc_device_t* with the correct UID in, but when I try to send to APDU command for the UID (0xFF, 0xCA, 0x00, 0x00, 0x00) myself, the reader fails to return a respond.
I am running the following code: https://gist.github.com/ace72d39209070516ed9
[~/Desktop] $ gcc -lnfc nfc.c -o nfc && ./nfc
./nfc use libnfc 1.3.4 (r338)
Connected to NFC reader: ARYGON - PN532 v2.103 (0x6e)
The following (NFC) ISO14443A tag was found:
ATQA (SENS_RES): 04 00
UID (NFCID1): 93 72 ae ed
SAK (SEL_RES): 08
Error sending UID request
Sent UID request
Error receiving UID requestAm I missing something?