i have a MIFARE Classic EV1, and I can't write to sector 3 because it is read only. I have already made sure that the keys are correct
Any ideas on how can I write to it?
Related
Im trying read data from NFC tag using MFRC522. I can read ID, SAK, ATQA ,ATS, but im not understand how read blocks data from tag and file JSON.interested in a simple sequence of commands performing a given task.
I have NFC type 4A Mifare plus.Reading ID is performed using functions Anticollision and Select.
According to the Mifare Plus datasheet just Transceive as you would do a a Mifare Classic 1/4K whose datasheet Section 12 says Transceive 30h00h to read block 0
As you don't specify how you are connecting to the MFRC522 and with what language, but you can read the ID, etc you must be familiar in sending commands like Transceive to it and getting data back.
How a JSON file is stored in the blocks is specific to your implementation (though it could be a propriety encoding of NDef only you will know by looking at it)
I would like to build a (cheap) device to identify students at my university using their Student Card (called "ISIC").
My Phone (via its NFC reader on Android) tells me that these cards are :
NXP MIFARE DESFire / NXP MIFARE DESFire EV1
So far, I've tried hooking up an RC522 chip to an arduino board but wasn't able to communicate with the card (libraries are under development but I can't seem to get them working with this setup).
This is what I had in mind :
Raspberry pi 0
PN532 NFC/RFID controller breakout board
v1.6 by adafruit (which seems to be the best choice possible according to the nfc-tools wiki)
Before buying everything, here are my questions :
Has someone ever tried reading that kind of card with this board ?
Is there a cheaper and/or easier solution ?
Thanks a lot !
Depending on the situation I would recommend one of 2 options:
If you can firstly read all cards of your students and correlate the unique-UID (unique ID number for each contactless card) of each card with each student.
If you need to read the information of the card to get the student identification.
For Case 1: If your situation is "1", I would recommend that you just read the UID of each MIFARE DESFire EV1 and as far as you know the card UID of each student you would be able to identify them. Reading the UID of a MIFARE DESFire card is very easy and immediate with any reader or Android Smartphone; but before going forward with this option you should firstly check that the MIFARE DESFire cards are configured to have a non-Random UID.
To do so just read the UID of a single MIFARE DESFire card and check that the 1st byte of the UID:
If 1st byte = 0x08 -> Random UID (4 byte length)
If 1st byte = 0x04 -> You can use this proposal (7 byte length)
If "1st byte = 0x04" then you can just develop an Android application or a C application with a PC/SC reader or Raspberry PI very easily.
For Case 2:Then you need to understand how is the data stored in the MIFARE DESFire cards, if they have encription keys... You can develop applications with Android, Raspberry PI or desktop reader, but you'll need to understand better how does MIFARE DESFire EV1 works and of course the protection keys (if they have).
I hope it helps!
I was recently using a Mifare Classic 1k smartcard. I used the manufacturer block (sector 0, block 0) to identify the card, since the UID of Mifare Classic cards is not really unique.
My application scenario is that I want to read an identifier from the smartcard and compare it to a database, in which every user has a smartcard assigned to them. So a user can log in with their card.
Now I have to use new Mifare DESFire EV1 4k cards. Do these cards also have something like the manufacturer block or just the 7-byte UID? Is it safe to use this UID to identify the card?
You can expect the 7-byte UID of genuine MIFARE DESFire EV1 cards to be unique. Be aware, though, that DESFire EV1 cards can be configured to use a random 4-byte UID. In that case, the UID is randomly generated for each RF activation. The 7-byte UID of such cards can only be obtained using the GetCardUID command (command code 0x51) after authentication.
However, you should be aware (in particular considering your use case) that the UID can easily be cloned and is not suitable to authenticate cards (or their users). See also
Serials on NFC Tags - truly unique? cloneable?
How do NFC tags prevent copying?
If you want something that is compareable to the manufacturer block of MIFARE Classic (i.e. something that reveals information about the product type and the production batch), MIFARE DESFire cards have a GetVersion command (command code 0x60).
Finally, note that the manufacturer block of a MIFARE Classic card does not really provide more uniqueness than the UID on its own. The reason for this is that the first 4 bytes of the manufacturer block are the UID itself. The next byte is the checksum over the UID (so its value is the same for cards with the same UID). The next 3 bytes are the SAK and ATQA values, which are typically '88' and '0400' for all (most?) MIFARE Classic 1K cards. The remaining bytes identify the chip type (hence identical for all cards of same type) and the production batch (hence identical for at least each batch).
I'm attempting to start coding for the new NTAG21X due to be released by the end of the year. There is very limited information available regarding the new tags. Only released to partners :-(
I'm trying to figure out how to use:
password protection on the tag. Will this be a key stored in one of the sectors and how will you go about reading NDEF? Do you pass the password to read?
originality signature. Will it be a sector as on Mifare where you write key and lock the page(s) to protect.
NTAG21x is (will be) a NFC Forum Type 2 Tag (T2T) device, like NTAG203 (hence the "2" in the names). You can expect accessing functionality will be similar to standard T2T (and MIFARE Ultralight) read/write commands (so no MIFARE Classic sectors). Reading of NDEF shall be according to the T2T spec, so no password required. Write protect could be possible (similar to MIFARE Ultralight C).
It would be nice if UID is write-protected so that I can use it to detect card clones.
So, can it be modified?
Yes and no. The standard Mifare Classic has a locked sector 0, where the UID is stored. However, if you Google changeable uid mifare, you'll find several (comparatively expensive) cards for sale with sector 0 unlocked.
As far as I know, the UID-s of the Mifare Classic are'nt guaranteed to be unique, so beware of that problem.