Non-standard application of NFC technology in ACS

Types of NFC tags

There are four types of tags described by the NFC forum, all based on RFID protocols. This makes NFC tags partially compatible with many existing RFID systems (eg Mifare and FeliCa). Although these older systems do not support NDEF, they can still recognize NFC tags that are compatible with them.

For example, an RFID reader that is designed to work with Mifare Ultralight tags can read the ID number of an NFC type 2 tag, although it cannot read NDEF encoded information. There is also a fifth type that is compatible with the technology but is not part of the NFC specification.

https://www.youtube.com/watch?v=ytadvertiseru

Types 1, 2 and 4 are based on GOST R ISO/IEC 14443A (consists of four parts: 1, 2, 3, 4), type 3 is based on GOST R ISO/IEC 18092. More details about each of the types can be read under the spoiler.

Type 1 :

  • Based on GOST R ISO/IEC 14443A;
  • Can be either read-only or read/write;
  • Contains 96 bytes to 2 kb of memory;
  • No data collision protection (note – collisions can occur; when two active sources transmit data at the same time);
  • Examples: Innovision Topaz, Broadcom BCM20203.

Type 2:

  • Similar to type 1 based on NXP/PhilipsMifareUltralight tags (GOST R ISO/IEC 14443A);
  • Can be either read-only or read/write;
  • Contains 96 bytes to 2 kb of memory;
  • Communication speed 106 kbps;
  • Anti-collision support;
  • Example: NXP Mifare Ultralight.

Type 3:

  • Based on Sony FeliCa tags (GOST R ISO/IEC 18092 and JIS-X-6319-4) without the encryption and authentication support provided by the FeliCa specification;
  • Can be either read-only or read/write;
  • Communication speed 212 or 424 kbps;
  • Anti-collision support;
  • Example: Sony FeliCa.

Type 4:

  • Similar to Type 1, Type 4 is based on GOST R ISO/IEC 14443A;
  • Can be either read-only or read/write;
  • 2, 4, or 8 KB memory;
  • Communication speed 106, 212 or 424 kbps;
  • Anti-collision support;
  • Example: NXP DESFire, SmartMX-JCOP.

The fifth type is the property of NXPSemiconductors and probably the most common MifareClassictag today (GOST R ISO/IEC 14443A):

  • Memory: 192, 768 or 3584 bytes;
  • Communication speed 106 kbps;
  • Anti-collision support;
  • Example: NXP Mifare Classic 1K, Mifare Classic 4K, Mifare Classic Mini.

Where NFC is used

Many have heard that this technology allows you to quickly and contactlessly pay for goods and services. In fact, its scope is much wider and includes:

  • transferring files, such as photos or audio, from one smartphone to another;
  • access to private data – when NFC is used as an electronic key;
  • for identity verification – when NFC will contain personal information about the owner of the device;
  • to transfer funds from one smartphone to another – only if both devices have NFC;
  • to output video from a smartphone to a TV – for this, it is necessary that both the mobile device and the remote control are equipped with the appropriate chip;
  • for reading special tags – any information can be encrypted in them: contacts of a company or person, address, link to a website, etc.

NFC algorithm

NFC, like RFID, has an initiator and a target in the exchange, but the new technology allows much more than a simple exchange of an identifier and reading or writing information of the target. The most significant difference between the two technologies is that NFC targets are often programmable devices such as smartphones. This means that it is possible to exchange not only static data, but also generate a response to the information requested by the initiator each time.

NFC devices have two interaction modes. If the initiator emits radio frequency waves, and the target receives power at the expense of the initiator, then this mode of interaction is called passive. In active mode, the initiator and target have their own power supplies and are independent of each other. These modes are the same as RFID modes.

NFC devices also have three ways of working. They can work in the mode of reading information from the target or writing to it. They can emulate cards by acting like RFID tags when they are in the field of another NFC or RFID device. Or they can work in peer-to-peer (P2P) mode, in which they exchange data in both directions at once.

The first main difference between NFC and RFID is the peer-to-peer interaction method, which is implemented using GOST R ISO / IEC 18092. P2P data exchange is implemented by two protocols – the logical link control protocol (LLCP) and a simple NDEF data exchange protocol (SNEP – simple NDEF exchange format).

How to activate NFC on your smartphone

  • Security. Since the range of the chip is limited to 10 cm, no one outside this circle will have access to payment data or transferred files.
  • Connection speed. It takes less than one second for a device to connect to another gadget or terminal. In older mobile phones and early smartphones, this procedure took up to 15 seconds.
  • Energy efficiency. The NFC chip uses a minimal amount of power in operation. This is important in modern smartphones, which do not show the highest autonomy.
  • Convenience. With this technology, routine operations are simplified, and you spend less time on them. To establish a connection with another device, a simple second touch is enough.
  • Versatility. NFC technology is compatible with many other contactless solutions and can work (albeit with limitations) even when the smartphone is turned off.

Open the settings menu of the mobile device, select the “Wireless networks” / “Wireless communications” section and find the item of the same name there. Most often, it is hidden in the “More …” tab. To activate the function, simply check the box that allows the exchange of information when the smartphone approaches another device or terminal.

If there is no NFC item in the section with a list of wireless networks, then the smartphone does not have this chip. Many manufacturers of mobile gadgets advertise this feature and place the name about it on batteries or back covers (as in Samsung), or even directly on the body (as in Sony). However, this is more of an exception than the rule.

The above methods are only suitable for Android smartphones. In Apple devices, the NFC chip appeared in the iPhone 6. At first, it was used only for the Apple Pay service, but in the latest smartphone models, the reading mode is additionally supported.

NFC architecture

There are several layers in the NFC architecture. The lowest of them is the physical one, which is implemented by the CPU and other hardware complex through which the interaction takes place. In the middle is the packet data and the transport layer, then the layer data format, and finally the software.

At the physical layer, NFC works according to the algorithm described in GOST for RFID (GOST R ISO / IEC 14443-2-2014), which refers to low-power radio signals with a frequency of 13.56 MHz. Then comes the level that describes the breakdown of the data stream into frames (GOST R ISO / IEC 14443-3-2014). Any radio controllers that are used in a phone, tablet, or connected to a computer or microcontroller are separate hardware components.

They communicate with the main processor through one or more standard serial protocols between devices: universal asynchronous transceiver (UART), serial peripheral interface (SPI), serial data bus for integrated circuit communication (I2C), or universal serial bus (USB) .

Above this are several RFID command protocols based on two specifications. N FC tag reading and writing is based on the original RFID GOST R ISO/IEC 14443A. The Philips/NXP Semiconductors Mifare Classic and Mifare Ultralight and NXP DESFire protocols are compliant with GOST R ISO/IEC 14443A. P2P NFC data exchange is based on GOST R ISO/IEC 18092.

They are depicted in the figure above on a par with other control protocols, since they use the same standard.

Creating Common NDEF Records

NDEF is used to format exchange data between devices and tags. This format typifies all messages that are used in NFC, and it does not matter for the card or for the device. Each NDEF message contains one or more NDEF entries. Each of them contains a unique record type, an identifier, a length, and a field for the information to be reported.

There are several common types of NDEF records:

  1. Plain text entries. Any string can be sent to them, they do not contain instructions for the target, but contain metadata about the language of the text and the encoding.
  2. URI. Such records contain data about Internet links. A target that receives such an entry will open it in an application that can display it. For example, a web browser.
  3. Smart recording. Contains not only web links, but also a text description for them, so that it is clear what is located on this link. Depending on the recording data, the phone can open the information in the desired application, be it SMS or e-mail, or change the phone settings (sound volume, screen brightness, etc.).
  4. Signature. It allows you to prove that the information that has been transmitted or is being transmitted is reliable.

You can use multiple record types in one NDEF message.

You can think of a message as a paragraph and notes as sentences. A paragraph is a specific unit of information that contains one or more sentences. Whereas a sentence is a smaller unit of information that contains just one idea. For example, you can make birthday invitations in the form of a paragraph and write information about the date, time and place of the event in separate sentences, and use NDEF messages to send friends a reminder of this event, where there will be a text message describing the event, a smart entry with a place and a web link on how to get to that location.

Non-standard application of NFC technology in ACS

The second main difference between NFC and RFID is the NFC data exchange format (NDEF). N DEF defines the format of data in messages, which in turn consist of NDEF records. There are several types of records, which will be discussed in more detail below. N DEF makes it possible to use code to control the process of reading and writing NFC tags, peer-to-peer communication, and card emulation.

https://www.youtube.com/watch?v=upload

NDEF contains information about the byte representation of messages that can contain multiple entries. Each entry has a header that contains metadata (type, length, etc.) and information to send. If we return to the analogy with the paragraph, then the paragraph is formed from sentences related to the same topic, and in NDEF messages – it’s good when all entries relate to the same topic.

NDEF messages are mostly short, each exchange consists of one message, each label also contains one message. Since the exchange of NFC data occurs when one device is touched by another or by a label, it will be inconvenient to transmit the text of an entire book in one message, so the length of an NDEF message is comparable to the length of a paragraph, but not the entire book.

An NDEF record contains information to forward and metadata on how to interpret this information. Each entry can be of a different type, which is announced in the title of that entry. The header also describes what place the record occupies in the message, after the header information follows. The figure below shows complete information about the location of bits and bytes of information in the NDEF record.

The space for information in an NDEF record is limited to 2^32-1 bytes, but you can chain records within a message to send larger information. In theory, there are no restrictions on NDEF messages, but in practice, the message size is limited by the capabilities of the devices or tags involved in the exchange of information.

If only devices are involved in the exchange, then the length of the message will be limited by the computing power of the weakest of the devices, but it is worth considering that the devices will have to be kept nearby for a long time to send all the data. When the smartphone and the card interact, the length of the message will be limited by the memory size of the card.

In general, data exchange via NFC is quite fast. The person brings the mobile device to the tag, there is a brief exchange of information, and the person moves on. This technology was not designed for long exchanges of information, because the devices literally have to be a couple of centimeters apart.

In order to transmit a large amount of information, the devices will have to be kept next to each other for a long time, which can be inconvenient. If you need a long interaction between devices, then you can use NFC to quickly exchange data about the capabilities of devices and then turn on one of the more suitable data transfer methods (Bluetooth, Wi-Fi, etc.).

When an Android phone reads an NFC tag, it first processes and recognizes it, and then transfers the data about it to the appropriate application for the subsequent creation of an intent. If more than one application can work with NFC, the application selection menu will appear. The recognition system is defined by three intents, which are listed in order of importance from highest to lowest:

  1. ACTION_NDEF_DISCOVERED: This intent is used to start an activity if the label contains an NDEF message. It has the highest priority and the system will run it first.
  2. ACTION_TECH_DISCOVERED: If no activity is registered for an ACTION_NDEF_DISCOVERED intent, then the recognition system will try to launch an application with that intent. Also, this intent will be fired immediately if the found NDEF message does not match the MIME type or URI, or the label does not contain a message at all.
  3. ACTION_TAG_DISCOVERED: This intent will fire if the previous two intents failed.

In general, the recognition system works as shown in the figure below.

When possible, the ACTION_NDEF_DISCOVERED intent is fired because it is the most specific of the three. Moreover, with its help it will be possible to launch your application.

If an activity is launched due to an NFC intent, then you can get information from the scanned NFC tag from this intent. Intent may contain the following additional fields (depending on the type of scanned tag):

  • EXTRA_TAG (mandatory): Tag object describing the scanned tag.
  • EXTRA_NDEF_MESSAGES (optional): Array of NDEF messages calculated from the label. This extra field is specific to the ACTION_NDEF_DISCOVERED intent only.
  • EXTRA_ID (optional): Low-level label ID.

Below is an example that checks the intent ACTION_NDEF_DISCOVERED and gets NDEF messages from the extra field.

Kotlin

 override fun onNewIntent(intent: Intent) { super.onNewIntent(intent) . if (NfcAdapter.ACTION_NDEF_DISCOVERED == intent.action) { intent.getParcelableArrayExtra(NfcAdapter.EXTRA_NDEF_MESSAGES)?also { rawMessages -{amp}gt; val messages: List = rawMessages.map { it as NdefMessage } // Processing the array of messages. . } }
} 
 @Override
protected void onNewIntent(Intent intent) { super.onNewIntent(intent); . if (NfcAdapter.ACTION_NDEF_DISCOVERED.equals(intent.getAction())) { Parcelable[] rawMessages = intent.getParcelableArrayExtra(NfcAdapter.EXTRA_NDEF_MESSAGES); if (rawMessages != null) { NdefMessage[] messages = new NdefMessage[rawMessages.length]; for (int i = 0; i {amp}lt; rawMessages.length; i ) { messages[i] = (NdefMessage) rawMessages[i]; } // Processing the array of messages. . } }
} 

Kotlin

Non-standard application of NFC technology in ACS

val tag: Tag = intent.getParcelableExtra(NfcAdapter. EXTRA_TAG)

Tag tag = intent.getParcelableExtra(NfcAdapter.EXTRA_TAG);

There are several methods for creating an NDEF entry: createUri(), createExternal() and createMime(). It is better to use one of them in order to avoid errors that may occur when creating a record manually. All examples below should be sent as the first message when writing a tag, or by pairing with another device.

Kotlin

How to transfer data using NFC

This is the most popular way to use technology, so let’s take a closer look at it. You can attach a bank card to an NFC-enabled smartphone and then touch the gadget to payment terminals to pay for goods and services. You do not need to use the card itself – it can easily lie in your wallet or at home. This service will be available in all POS-terminals that support payment by contactless cards.

Non-standard application of NFC technology in ACS

This option is available on smartphones with the Android Beam function on Android devices version 4.0 Ice Cream Sandwich or later. From one smartphone to another, you can send any information: a photo, user contacts, a link to a website or a video. You save a lot of time, because you no longer have to use cloud storage, email or instant messengers for this.

To start transferring data via NFC, follow these steps:

  • unlock both smartphones;
  • activate NFC in them, and Android Beam will start automatically;
  • open the file, contact or other content you want to share;
  • place the smartphones with their covers facing each other at a distance of up to 10 cm;
  • wait for connection.

Sending data will start when you tap the display of the transmitting smartphone. Keep the devices as close as possible to each other until the transfer is over – you will know about this by sound notification.

How to create an NFC tag

Not only to read, but also to create tags, you can use this technology. In this case, its principle of operation is somewhat similar to the creation and reading of QR codes, but without the use of a smartphone photomodule.

The following actions can be the result of reading the tag:

  • sending an SMS message or email;
  • enable or disable Wi-Fi and Bluetooth;
  • connection with another device via Bluetooth protocol;
  • switching the smartphone to “flight mode”;
  • launch of a mobile application;
  • follow the link and many others.

What is Google Pay and Apple Pay?

Today Google Pay, and until February 2018 Android Pay is a system of electronic payments from mobile devices running on Android. Not only smartphones work with it, but also tablets, smart watches and other gadgets. The number of countries in which the service operates is approaching twenty. Russia joined them on May 23, 2017, and among the first were the United States, Great Britain and Singapore.

https://www.youtube.com/watch?v=ytcopyrightru

Android Pay is based on NFC payment, which replaces the PIN chip or magnetic strip on a bank card. There are two ways to add card data to the application: enter it manually or simply take a picture of both sides of the card with the smartphone’s built-in camera.

Making payments with Android Pay is simple: just bring your mobile device to the payment terminal and do not remove it until the transaction is completed. To do this, it is necessary that the cash register be equipped with a modern NFC-enabled terminal.

How does a smartphone know that it is the owner of the gadget who pays for purchases? To do this, different methods of identity verification are used: a password, a fingerprint scanner or an iris scanner. For security reasons, payment card data is not transferred to the merchant – the latter receives only the generated virtual account number.

Apple Pay, a mobile payment system from Apple, works in a similar way. It has been available in Russia since October 2016 (in general, in almost 30 countries of the world) on iPhone 6 and older smartphones. As in the case of Google Pay, it uses the technology of “near contactless communication”, and the principle of operation of both systems is identical except for a few details. After the bank card is digitized by the Apple Pay app, you can pay with it where POS terminals allow it.

With a high probability, NFC technology will continue to develop and be actively introduced into our lives. Analysts predict its popularity not only as a means of payment, but also as a means of disseminating information about objects of culture, healthcare, tourism, as well as a means of access control.

Have you already tried using NFC in your smartphone?

Using NFC

There are many ways to use NFC:

  • Card emulation mode allows you to use this technology for contactless payments, such as Google Wallet, or to pay or receive tickets on public transport.
  • There are several mobile applications that allow you to save the settings for the mobile device on the tags and later use them to quickly change any settings of the mobile device (switch to vibrate mode, turn on or turn off Wi-Fi on the mobile device).
  • NFC-enabled devices are gradually appearing on the market – stereos, TVs that allow you to pair with a phone or tablet for remote control.
  • NFC is used in the healthcare system to store patient ID and personal records.
  • In the field of inventory management, NDEF records can be used to store information about the place of departure of goods, their passage through various intermediate points, and the like.

A smartphone as a multifunctional device with sufficient computing power, large memory capacity and the possibility of mobile data transmission, for example, via the Internet, makes it possible to implement several convenient and effective solutions for use in access control systems on its basis.

The presence of a built-in NFC module in a smartphone or tablet allows you to use them as mobile readers. In this case, both other smartphones with NFC and cards that comply with the ISO 14443A standard, for example, the Mifare family popular in ACS, bank cards with support for PayWave and PayPass technologies, can act as identifiers.

1. Patrol control.

2. Organization of a mobile hotspot.

3. Reconfiguring various devices.

Non-standard application of NFC technology in ACS

Let’s take a closer look at each of these options.

https://www.youtube.com/watch?v=ytcreatorsru

Patrol control is reduced to a guard walking around the territory along a given route (a certain order of passing control points with a certain frequency). This task, as a rule, is solved by installing RFID tags at control points, the data from them is read by a special device made in the form of a baton worn by a security officer.

A smartphone with an NFC chip and specialized software can successfully replace such a wand, and checkpoints can be equipped with NFC tags. Such tags can be made not only in almost any form factor, but also be frost and moisture resistant, which allows them to be used in any climatic conditions.

Since a smartphone has a screen, a built-in camera, a microphone, a GPS module, it can be used to significantly expand the functionality of such a solution by adding additional features, such as:

  • transmission of images, voice messages;
  • use of other types of labels, such as a QR code;
  • instant messaging (using a messenger);
  • real-time device location;
  • setting up various types of notifications to responsible persons about recorded incidents.

Only the capacity of the battery of the device and its body, as a rule, are not suitable for use in difficult conditions (harsh climate, the possibility of falling and other emergency situations) can cause a question. However, the answer to this can be smartphones with increased battery capacity, waterproof and shock-resistant housing.

Similar solutions already exist on the market, and some of them can be used to automate similar tasks from other areas, for example:

  • industry: inspection of units by a technician before the start of the work shift;
  • rail transport and subways: bypassing railroad tracks;
  • retail chains: control of the time of delivery of goods by a forwarder to retail outlets;
  • hotel sector: control of the work of service personnel, etc.

A standard ACS task – restricting physical access and registering employee passes – can be solved in a non-standard way using a smartphone with an NFC chip. With specialized software, such a smartphone can act as a reader and ACS controller at the same time, reading data from identifiers applied by passing people.

Solutions of this kind have been implemented by several ACS manufacturers and are in high demand on the market. There can be several tasks that can be solved with the help of such solutions:

  • Corporate transport – comfortable registration of the passage of employees at the entrance to the territory of the enterprise. The convenience lies in the fact that for registration, no one needs to get off the bus and identify themselves at a stationary reader installed, for example, at the checkpoint, since employees can be registered directly on the bus using the terminal.
  • Remote checkpoint – registration of passages in places where it is impossible to install stationary access points.
  • Outdoor events – convenient organization of temporary access points, where installation of stationary ones is unprofitable.
  • Recording student/pupil attendance – one terminal can be used to record the presence of students in several classrooms of an educational institution.

At the same time, not only Mifare cards, bank and other smart cards that meet the ISO 14443 standard and use paywave or paypass technology, but also others, for example, EM Marine, can be used as identifiers due to the ability to connect external RFID readers implemented in some of the solutions.

Non-standard application of NFC technology in ACS

Recording of events and their subsequent transmission to the ACS server can also be performed both in offline mode (events are stored in the internal memory of the device, transmitted when connected to the server), and in online mode (to check access rights and send events a permanent connection to the server is required).

https://www.youtube.com/watch?v=ytaboutru

Electronic locks occupy a separate place in the ACS market. They are installed in place of conventional mechanical ones and work with the appropriate access rights. Such locks are of two types – online (access rights are stored on the server) and offline (access rights are stored in the identifier’s memory). An NFC-enabled smartphone, if available with a service program, can be used to reconfigure offline locks that are not connected to the server, for example, to update personnel access rights or the access point operation mode.

In the same way, you can make changes not only to the configuration of electronic locks, but also to readers, storage devices, etc.

Despite the existence of the technology itself for about a decade, the use of NFC in ACS is just beginning to gain momentum. Although the use of NFC is not without drawbacks, its use brings convenience and comfort to users, which is quite important in today’s market.

Many experts attach particular importance to the development of this technology and believe that its use can have a rather strong impact on the entire industry as a whole.

Conclusion

NFC technology adds promising functionality to RFID technology. The most significant innovation is the NFC Data Interchange Format (NDEF), which provides the ability to format regular data into one of four NFC tag technologies. N DEF can be used both for data exchange between a device and a tag, and for exchange between devices. This makes NFC suitable not only as a method of identification, but also as a means of exchanging short blocks of data.

https://www.youtube.com/watch?v=https:accounts.google.comServiceLogin

For more information about NFC or NDEF, see Tom Igoe, Don Coleman, and Brian Jepson Beginning NFC. Near Field Communication with Arduino, Android, and PhoneGap.

Leave a Reply

Your email address will not be published. Required fields are marked *