Many students are learning NFC I think NFC From the bottom layer to the upper layer, there is a sense of nowhere to start. Here I will share with you my previous studies NFC Normative experience. If there is anything wrong, please criticize and correct it. NFC Forum There is a list of all the specifications. We can see that most of the current specifications have been officially released. Of course, although they are officially released NFC Forum Still on Bug fix . Not listed in the table NFC Forum Some new projects, such NCI ng And Wireless charging .
InNFCBefore learning a certain specificationNFCThe standard overall architecture has a general understanding, so that we can grasp it as a whole. ReferenceNFC ForumThe three architecture diagrams in a public document.NFCThere are three working modes: Card Reader (R/W),Card simulation (CE) And point-to-point (P2P), The three models correspond to different protocol architectures.ProfileSimilarly, there are different protocol combinations for different applications.
Card reader mode or read/write mode:
Analogue, That isNFCPhysical Layer Protocol, Mainly definesNFCDeviceRF featuresSuch as the waveform and intensity of the RF field.
Digital Protocol , Digital protocol. In fact, we can understand it NFCOfMac Layer ProtocolIt defines three types NFC Technology, NFC-A, B, F , Corresponds Typea,TypeB And Felica SpecificationsIncluding initialization and conflict detection. It also definesTransmission Protocol, Such NFC-DEP,ISO-DEP . This digital protocol is actually ISO/iec14443, iso18092 .
here we will explain that there is actually a activity specification : digital . digital defines communication functions such as frame format and encoding, but how to use the frames defined in digital to complete communication, it is defined in activity specification. activity defines a large number of flowcharts and status transition diagrams, used to describe how the content in digital specifications works, in this case, the acitivity specification should be digital .
the preceding protocols are NFC communication basics, in NFC , use these three underlying protocols . It can be said that these three protocols are the foundation of the entire NFC communication, with these three protocols, you can understand NFC in half. Of course, this is also the three most difficult protocols to read in NFC , of course, if you have an understanding of 18092 it's easy to understand, after all, these underlying protocols are the same as non-contact card specifications.
TYPE1-4 tag operation:Defines howType1/0/41/4Medium read/writeNdefMessage. HereType1/2Corresponds2011-0443typea, AndType3CorrespondsSonyOfFelica,Type4Is an openTagStandard, that is2011-0443 typea typeBAndISO 7816-4;
Ndef reference applicaton : Yes NFC Forum Of Raf Some application specifications defined by the Working Group, which are not mandatory and mainly for reference, but are used by many manufacturers. Raf Provides reference specifications to develop applications, such as connection switching ( Connection Handover ) NFC Is Bluetooth or WiFi Establish a connection.
Third party ndef Application : Is developed by a third party based on Ndef Message application. NON-NDEF Application : If it is not based on Ndef Is actually called directly Digital Protocol to encapsulate application data, that is, to directly map application data Digital .
PointPoint Mode:
Analogue/digital/activity As described above.
Llcp : Since Yes P2P Therefore, the management of logical links is necessary. Llcp Layer for Link creation, removal, maintenance, and other functions. It also provides connection-oriented and connectionless services.
Simple ndef Exchange Protocol ( Snep ): In P2P Mode defines how to proceed Ndef Message interaction. Snep The communication mode of is request / Corresponding mode, and Initator Direction Target Send Sneprequest , Target Direction Initiator Response Snep response Message. Snep The request and response messages contain Ndef Format data. Here Ndef In fact Ndef Developers who are working on upper-layer applications should face it directly, as shown in Android , Based on Framework In NFC API Many of them are Ndef Format. Ndef Actually NFC Forum A standard message format defined in P2P Is also used in the card reader mode. Ndef Yesby Record (RTD, Record ) The real user data is stored in RTD . NFC Forum Different RTD Specification, such Text, Uri , Signature And so on. Note that P2P And R/W Is not shown in the figure Ndef Specification.
Protocol bindings , Here NFC Forum Two specifications are proposed. One is: Obex And the other is IP The Protocol ing is to map these protocols Llcp Negotiation in progress. However NFC Forum The two protocols were eventually canceled because they did not play any role. These will be introduced later. File: // C:/example E ~ 1/qwj/locals ~ 1/temp/msohtmlclip1/01/clip_image004.gif
Card simulation mode:
In terms of protocol architecture, this architecture does seem simple, but I personally think the card simulation mode is quite complicated, because Se ( Security Unit, also known Nfcee) And NCI The introduction of Specifications not only Se It can be simulated as a card, DH ( Host ) And Nfcc (NFC Controller ) It can also be simulated as a card. This will be explained in the future. File: // C:/example E ~ 1/qwj/locals ~ 1/temp/msohtmlclip1/01/clip_image006.gif
After introducing the basic NFC After the Protocol framework, I will briefly mention it here. NCI Standard, full name NFC Controller Interface , The main role is DH ( Device Host Host, which can be viewed as a mobile phone AP ) And Nfcc ( It can be seen as a mobile phone NFC Chip, such Pn544 And so on ) Message standardization between our mobile phones CPU No need NFC Chip adaptation, as long CPU And NFC Chip compliance NCI The specifications are fine, of course. NFC The driver of the chip must be adapted. People familiar with Bluetooth should be easy to understand. HCI Interfaces. Their design concepts are consistent. It is said that, Google Is Android Development NCI .