What is NFC? What are the Application Areas?
What is NFC? What are the Application Areas?

What is NFC? What are the Application Areas?

NFC (Near Field Communication) is a wireless communication technology that stands for near field communication. NFC enables data transfer between devices over short distances (usually 4 cm or less). This technology makes it easier for electronic devices to interact with each other and exchange information.

NFC is based on radio frequency identification (RFID) technology and more specifically operates at 13.56 MHz. NFC enables two-way communication between an active device (for example, a smartphone) and a passive device (for example, a tag or card).

The usage areas of NFC are quite wide. Here are some examples where NFC is commonly used:

Mobile Payments: NFC technology makes it possible to pay wirelessly via smartphones or other NFC supported devices. This makes it easy to shop at points that support NFC tags or NFC payment systems.

Smart Cards: NFC is used in smart card applications such as secure access control, pass cards, bus tickets, and electronic wallets. NFC-enabled cards can provide authentication or access control by exchanging data.

File and Data Transfer: NFC enables fast sharing of files, photos, videos or contacts between NFC supported devices. This can be accomplished simply by touching or zooming the two devices together.

Bluetooth Pairing: NFC enables fast and easy pairing of Bluetooth devices. It is possible for two devices to detect each other using NFC and then communicate via Bluetooth.

Smart Home Applications: NFC integrates with home automation systems, allowing functions such as home lighting, security systems, media control to be controlled with a simple touch.

NFC is a widely used communication technology today due to its easy use and wide range of applications.

NFC cards or tags usually have a special code number. This code number represents the unique identity of the device and allows it to be recognized by NFC readers.

What's Inside NFC?


This code number is called "UID" (Unique Identifier) or "Tag ID". NFC is stored in the memory of the card or tag and transmitted to the reader when the device is read. This UID is permanently assigned during the manufacture of the card or tag and is unique.

The UID usually consists of a series of bytes and may vary with different NFC card or tag types. For example, NFC Forum Type 2 tags use a 7-byte UID, while NFC Forum Type 4 cards can have a UID between 4 and 7 bytes.


The UID is used to identify the NFC card or tag and can be used for different functions in various applications. For example, there are usage areas such as recognizing the user in access control systems, defining the account identity in payment systems, or providing product tracking in inventory management.

Besides the UID, other data can be stored on NFC cards or tags. For example, additional memory segments may store information such as user information, private keys, passwords, or application-specific data.

Can information be written to NFC?


It is possible to write information to NFC cards or tags. Since NFC technology has data writing and reading capabilities, information can be stored on NFC cards or tags.

Writing information to NFC cards or tags is done using a suitable NFC writing device or an NFC supported device. These devices support the software and protocols required for NFC communication.

The information that can be written to an NFC card or tag may vary depending on the application scenario. For example, a website address, a phone number, a text message, or connection information to a Wi-Fi network can be written on an NFC tag.

Information writing is performed after verification that the NFC device is capable of writing. The NFC device reads the existing data by reading the card or tag, then writes to the card or tag with the appropriate commands to write the new information.

The amount of data that can be written will depend on the memory capacity of the NFC card or tag used. Some NFC cards or tags have a smaller memory capacity, while others may offer larger storage.

Information writing is used in many applications of NFC technology. For example, NFC tags can write route information at bus stops, or an NFC card can write payment information and authentication data.

However, information writing is usually performed with limited security measures. Therefore, it is important to assess the security risks and take appropriate protection measures if sensitive data is written to NFC cards or tags.

An Application Example and Codes with PN532 NFC Module
Below are the codes for the application that can be done with Arduino UNO:

 

#include <Wire.h>
#include <Adafruit_PN532.h>

#define SDA_PIN 10
#define SCL_PIN 11

Adafruit_PN532 nfc(SDA_PIN, SCL_PIN);

void setup(void) {
   Serial.begin(115200);
   Serial.println("NFC Read Application");

   nfc.begin();
   uint32_t versiondata = nfc.getFirmwareVersion();
   if (!versiondata) {
     Serial.print("NFC module not found!");
     while(1); // If the module is not found, it breaks the loop.
   }
   nfc.SAMConfig(); // Configures the NFC module
   Serial.println("NFC read ready!");
}

void loop(void) {
   uint8_t success;
   uint8_t uid[] = { 0, 0, 0, 0, 0, 0, 0 }; // Defines an array for the UID value
   uint8_t uidLength; // keeps the length of the UID

   success = nfc.readPassiveTargetID(PN532_MIFARE_ISO14443A, uid, &uidLength);

   if (success) {
     Serial.println("Card read!");

     Serial.print("UID Value: ");
     for (uint8_t i = 0; i < uidLength; i++) {
       Serial.print("0x");
       Serial.print(uid[i], HEX);
     }
     Serial.println("");

     delay(1000);
   }
}