© 2019 Cloud Collected. All Rights Reserved.
560 Peoples Plaza #312
Newark, DE 19702
NFC operates at 13.56MHz, and is based around an "initiator" and "target" model where the initiator generates a small magnetic field that powers the target, meaning that the target does not require a power source.
This Passive Communication is used to read and write to small, inexpensive 13.56MHz RFID tags based on standards like ISO14443A. Active communication (peer-to-peer) is also possible when both devices are powered, where each device alternately creates its own magentic field, with the secondary device as a target and vice versa in continuous rotation.
There are a number of 13.56MHz RFID card standards, by far the most popular standard is ISO14443A. ISO/IEC 14443 Identification cards, Contactless integrated circuit cards or Proximity cards is an international standard that defines proximity cards used for identification, and the transmission protocols for communicating with them. One such standard is MIFARE.
The MIFARE name is derived from the term Mikron FARE Collection system, which is the trademark of NXP Semiconductors. Tags employ an RFID communication between the card and the reader and so do not require insertion of the card. Instead, the card is passed along the exterior of the reader and the read. Mifare Classic and Mifare Ultralight are probably the most frequently encountered and useful for basic projects, though many tags with improved security and encryption also exist (Mifare DESFire, etc.).
MIFARE Classic cards come in 1K and 4K varieties. While several varieties of chips exist, the two main chipsets used are described in the following accessible documents:
MF1S503x Mifare Classic 1K data sheet
MF1S70yyX MIFARE Classic 4K data sheet
Mifare Classic cards typically have a 4-byte NUID that uniquely (within the numeric limits of the value) identifies the card. It's possible to have a 7 byte IDs as well, but the 4 byte models are far more common for Mifare Classic.
Before you can do access the sector's memory, you first need to "authenticate" according to the security settings stored in the Sector Trailer. By default, any new card will generally be configured to allow full access to every block in the sector using Key A and a value of 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF.
MiFare Ultralight cards typically contain 512 bits (64 bytes) of memory, including 4 bytes (32-bits) of OTP (One Time Programmable) memory where the individual bits can be written but not erased.
MF0ICU1 MiFare Ultralight Functional Specification
MiFare Ultralight cards have a 7-byte UID that uniquely identifies the card.
Active or "Peer-to-Peer" communication is still based around the Initiator/Target model described earlier, but both devices are actively powered and switch roles from being an Initiator or a Target during the communication. When one device is initiating a conversation with the other, it enables it's magnetic field and the receiving device listens in (with it's own magnetic field disabled). Afterwards, the target/recipient device may need to respond and will in turn activate it's own magnetic field and the original device will be configured as the target. Despite two devices being present, only one magnetic field is active at a time, with each device constantly enabling or disabling its own magnetic field.