what is the relationship between NFC and NDEF
Asked Answered
P

2

7

What exactly is the relationship between NFC and NDEF? Does any NFC device always have to have data in NDEF format? Or is it possible to have NFC but not NDEF (although I think vice versa is not possible is it?) ? What would an empty NFC card be like? Would it still have the NDEF header information but no payload? Or is it possible for the tag to be completely empty, that is, not have any header information either? In that case, would this still be detectable by an android phone or a card reader? What exactly makes a tag to be detected by a reader?

Phlegethon answered 2/8, 2013 at 9:53 Comment(1)
read about NFC here, it answers to all of your questions developer.android.com/guide/topics/connectivity/nfc/index.htmlBactria
R
18

In NFC communication there are mainly three modes of operation

  1. Reader/Writer Mode (PCD)
  2. Peer-to-Peer Mode (NFC)
  3. Tag/Card Emulation Mode (PICC)



The base of NFC is antenna coupling, whenever an NFC device approaches another one antenna coupling occurs, there is a Multiprotocol RF front-end IC chip connected to the reader/writer device, the other device can be a reader/writer device or simply a NFC tag (an nfc tag is nothing but an antenna and a data storage). Communication takes place only when the ISO?IEC 18092 & ISO/IEC 14443 protocols are passed, otherwise no communication will take place.

What exactly is the relationship between NFC and NDEF?

In android all NFC devices are detected and processed as PICC devices, android.nfc package provides access to Near Field Communication (NFC) functionality, allowing applications to read NDEF message in NFC tags

Does any NFC device always have to have data in NDEF format?

Yes and no, In this mode the NFC device emulates an ISO 14443 smart card or a smart card chip integrated in the mobile devices is connected to the antenna of the NFC module. A legacy reader cannot distinguish a mobile phone operating in tag emulation mode from an ordinary smart card.

This is an advantage of NFC technology as already existing reader infrastructures do not need to be replaced. The smart card chip used for tag emulation is also referred to as secure element.

Is it possible to have NFC but not NDEF?

Yes, it is fairly covered here : Advanced NFC

What would an empty NFC card be like? Would it still have the NDEF header information but no payload? Or is it possible for the tag to be completely empty, that is, not have any header information either?

NDEF is made of four parts
3-bit TNF (Type Name Format)
Indicates how to interpret the variable length type field.
Variable length type
Describes the type of the record. If using TNF_WELL_KNOWN, use this field to specify the Record Type Definition (RTD).
Variable length ID
A unique identifier for the record. This field is not used often, but if you need to uniquely identify a tag, you can create an ID for it.
Variable length payload
The actual data payload that you want to read or write. An NDEF message can contain one or none or multiple NDEF records, so don't assume the full payload is in the first NDEF record of the NDEF message.

In that case, would this still be detectable by an android phone or a card reader? What exactly makes a tag to be detected by a reader?

The tag dispatch system uses the Type Name Format(TNF) and type fields to try to map a MIME type or URI to the NDEF message. If successful, it encapsulates that information inside of a ACTION_NDEF_DISCOVERED intent along with the actual payload. However, there are cases when the tag dispatch system cannot determine the type of data based on the first NDEF record. This happens when the NDEF data cannot be mapped to a MIME type or URI, or when the NFC tag does not contain NDEF data to begin with. In such cases, a Tag object that has information about the tag's technologies and the payload are encapsulated inside of a ACTION_TECH_DISCOVERED intent instead.

For an empty message the TNF will be TNF_EMPTY(Indicates the record is empty. Type, id and payload fields are empty in a TNF_EMPTY record.) in such cases it falls back to ACTION_TECH_DISCOVERED.

Refer these links

Rematch answered 2/8, 2013 at 10:40 Comment(3)
Let me see if I get the gist of it: the fact that a tag gets discovered has nothing to do with the data on it, but the actual design of the tag and reader hardware themselves. If a tag device has been designed appropriately, it will get detected, and if it is detected, the reader will attempt to read it. If the reader is an android phone and it reads an NDEF message, ACTION_NDEF_DISCOVERED intent is generated. But if it turns out that it was not NDEF, then ACTION_NDEF_DISCOVERED is generated? Is this true? Please correct me if I am wrong.Phlegethon
In android there are provision for all types of NFC communication, but by default it uses PICC mode, if you made a device with another mode of communication you may need a separate application with further programming, else it will be discarded. For the above said further programming you might need to check the link I posted under the name Advanced NFCRematch
Hope you understand now ?Rematch
F
4

NFC is a set of telecommunication standards, NDEF is a data format. So NFC and NDEF exist independantly of each other, for example an NDEF message can be a file.

The NDEF records directly define a message, so there is no such thing as an empty NDEF message (it would be 0 bytes). Many types of tags can however be formatted 'to be NDEF' because concepts like access keys and data areas must be agreed upon before writing the actual NDEF data, or the stored NDEF data would not be readable to a third party (defying the whole point of using standards).

Tags are never empty in themselves (like hard drives), but the data written to them can say that the amount of useful data is zero.

Passive (tags) NFC devices are powered by active (phone / reader) NFC devices. That is, active devices turn a magnetic field on an off (polling), which lets passive devices harvest power for their internal circuits and communication antennas.

Flessel answered 3/8, 2013 at 22:38 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.