Hi, i would like to ask if is possible to read UID card number from MIFARE DESFire EV1 card.
In specification is written that is supported, but I used example code from arduino nfc library, but nothing to do. Please can you help me what is wrong and how can I do to read UID?
UID in DESFire has 7B length.
I don't nead to read or write anything more.
I used library rfid-master GITHUB
I am trying to use this code:
#include <SPI.h>
#include <MFRC522.h>
#define SS_PIN 10
#define RST_PIN 9
MFRC522 mfrc522(SS_PIN, RST_PIN); // Create MFRC522 instance.
void setup() {
Serial.begin(9600); // Initialize serial communications with the PC
SPI.begin(); // Init SPI bus
mfrc522.PCD_Init(); // Init MFRC522 card
Serial.println("Scan PICC to see UID and type...");
}
void loop() {
// Look for new cards
if ( ! mfrc522.PICC_IsNewCardPresent()) {
return;
}
// Select one of the cards
if ( ! mfrc522.PICC_ReadCardSerial()) {
return;
}
// Dump debug info about the card. PICC_HaltA() is automatically called.
mfrc522.PICC_DumpToSerial(&(mfrc522.uid));
}
Just this week I finished the mega project: My libraray is the FIRST Desfire EV1 library that has ever been written for the Arduino family. It uses the PN532 board from Adafruit.
This board has the advantage that it has a bigger antenna than usual. This allows to read the card from a larger distance than all those boards with a small antenna like the one on your foto.
The code has only been tested compiling for Teensy 3.2, but it should also work on other Arduino boards.
My code contains all you need to communicate with a Desfire EV1 card. I implemented 2K3DES, 3K3DES and AES encryption.