NCI规范,全称NFC Controller interface,主要的作用是将DH(Device host,主机,在手机中可以看做是手机的AP)
和NFCC(可以看做手机中的NFC芯片,如PN544等)之间的消息标准化,让我们的手机CPU不用对每一个厂家的NFC芯片都做适配,
只要CPU和NFC芯片都遵守NCI规范就可以了,当然了NFC芯片的驱动还是要适配的。
DH:DeviceHost 一般就是只NFC设备上cpu,如手机的cpu芯片
Abbreviation Description
AID Application IDentifier
CRC Cyclic Redundancy Check
DH Device Host
GID Group Identifier
HCI Host Controller Interface
HCP Host Controller Protocol
ISO International Organization for Standardization
LSB Least Significant Byte
lsb least significant bit
MSB Most Significant Byte
msb most significant bit
MT Message Type
NCI NFC Controller Interface
NDEF NFC Data Exchange Format
NFC Near Field Communication
NFCC NFC Controller
NFCEE NFC Execution Environment
OID Opcode Identifier
PBF Packet Boundary Flag
RF Radio Frequency
RFU Reserved for Future Use
SAR Segmentation and Reassembly
Glossary :词汇表。
Application IDentifier (AID):
Defined in [ISO/IEC_7816-4], this is a specific type of Dedicated File (DF)
name which is used in a SELECT command to identify applications.
在[ISO/ IEC_7816-4]中定义,这是通过一个SELECT命令用于标识应用程序的名字的一种专用文件的特定类型.
Battery Off State 断电状态
State where an internal battery or external power source is not available.
内置电池或者外部电源不可使用的状态.
For example, the battery is removed or empty, so the Device Host (DH) is switched
off. The NFC Forum Device can only act in Listen Mode when the NFC Controller (NFCC)
and certain NFC Execution Environments (NFCEEs) may be powered by a Remote NFC Device
via magnetic coupling.
例如由于电池被移除了或者电池没电了,导致主机设备被关闭了(手机没电关机)。
那么这个NFC设备只能工作在listen的模式下,当NFC Controlle和NFCEEs 被远端的NFC设备通过磁场供电时。
Big Endian 大端
A method of recording or transmitting numerical data of more than 2 bytes,
with the highest byte placed at the beginning.
Little endian 和Big endian 是CPU 存放数据的两种不同顺序。对于整型、长整型等数据类型,
Big endian 认为第一个字节是最高位字节(按照从低地址到高地址的顺序存放数据的高位字节到低位字节);
而Little endian 则相反,它认为第一个字节是最低位字节(按照从低地址到高地址的顺序存放数据的低位字节到高位字节)。
一种记录或传输超过2个字节的数字数据的方法,最高字节置于开头。
Command Message 命令信息
A request sent from the Device Host (DH) to the NFC Controller (NFCC) for action by the NFCC.
从主机设备Device Host往NFC Controller发送的命令,以便来控制NFCC的行为
Connection Identifier (Conn ID) 链接ID
A unique 4-bit identifier for a Logical Connection.
逻辑连接的唯一4位标识符。
Control Message 控制信息
A generic name when referring to a Command, Response, or Notification Message, but not a Data Message.
一个统称关于命令command、应答Response以及通知消息Notification,但注意不包含数据信息的描述。
Cyclic Redundancy Check (CRC) 循环冗余校验,其实就是设置校验位,乙方中间丢失了那个数据什么的。
A checksum appended within the data segment before transmission, and verified afterward by the recipient to detect Transmission Errors.
在传输之前附加在数据段内的校验和,之后由接收者验证以检测传输错误。
Data Message
A message containing data carried over a Logical Connection. Logical Connection??
逻辑连接承载的数据负载消息。
Destination Type 目的地类型.
Identifies an entity (NFCC, NFCEE, or Remote NFC Endpoint) for which a Dynamic Logical Connection is intended.
标识要实现动态逻辑连接的实体(NFCC,NFCEE或远程Tag)。
Device Host (DH) 主机设备
An Execution Environment responsible for the overall management of the NFC Forum Device and any peripherals.
This includes the management (e.g., initialization, configuration, power management, etc.) of the NFC Controller peripheral.
负责NFC标准设备和任何外围设备的整体管理的运行环境。就比如在Android手机上的时候,其实就是致我们手机的(主要是CPU部分和等)
这包括NFC Controller的外围设备的管理(例如,初始化,配置,电源管理等)。
DH-NFCEE
An environment residing on or connected to the DH, where NFC applications are executed.
There is logically only one DH-NFCEE, but it may be composed of more than one environment (for example,
applications on the DH and applications on a peripheral connected to the DH). The manner in which the DH manages
the DH-NFCEE is implementation-specific.
内置在或连接到DH的用于执行NFC应用的环境。
在逻辑上只有一个DH-NFCEE,但它可能由多个环境组成(例如,DH上的应用程序和连接到DH的外设上的应用程序)。
DH管理DH-NFCEE的方式是实现特定的。
Dynamic Logical Connection 动态逻辑连接
A Logical Connection that is created and closed dynamically as needed.
根据是否需要来动态的创建的链接。
HCI Network
A Network as described within [ETSI_102622] consisting of a host controller and one or more hosts.
[ETSI_102622]中描述的由主机控制器和一个或多个主机组成的网络。
ISO-DEP Protocol
Half-duplex block transmission protocol defined in [DIGITAL].
半在[DIGITAL]中定义的双工块传输协议。
Listen Mode
The mode of an NFC Forum Device where it does not generate a carrier.
In this mode, the NFC Forum Device listens for the RF field of another device.
一个NFC标准设备在它不产生载波的模式,在这种模式下,NFC标准设备监听其他设备的RF场。就是卡模拟模式。
Little Endian 小段
A method of recording or transmitting numerical data of more than 2 bytes, with the lowest byte placed at the beginning.
一种记录或传输超过2个字节的数字数据的方法,其中最低字节位于开头。
Logical Connection 逻辑连接
A communication channel between the Device Host (DH) and the NFC Controller (NFCC) that
is used for data communication toward either the NFCC itself, an NFCEE, or a Remote NFC Endpoint.
设备主机(DH)和NFC控制器(NFCC)之间的通信通道,用于向NFCC本身,NFCEE或远程NFC端点的数据通信。
就是直接软件配置一下就能建立连接的那个,不是实际需要连上线的。
Message 消息
A generic term for a Command, Response, Notification, or Data object communicated between the DH and NFCC.
DH和NFCC之间通信的命令,响应,通知或数据对象的通用术语.
NCI
The logical interface between a Device Host (DH) and an NFC Controller (NFCC).
设备主机(DH)和NFC控制器(NFCC)之间的逻辑接口。
NCI Core
Defines the basic NCI functionality required between the Device Host (DH) and NFC Controller (NFCC).
定义设备主机(DH)和NFC控制器(NFCC)之间所需的基本NCI功能。
NCI Transport
The physical connection (e.g., SPI, I2C, UART, USB, etc.) and any associated link level protocol between
the DH and NFCC. Each supported NCI Transport has a Transport Mapping which defines the characteristics of the NCI Transport.
An NCI Transport provides the ability to reliably transfer data without intimate knowledge of the data being transferred.
The NCI specification defines multiple Transport Mappings.
物理连接(例如,SPI,I2C,UART,USB等)以及DH和NFCC之间的任何相关的链路级协议。
每个支持的NCI Transport都有一个传输映射,定义了NCI Transport的特性。
NCI传输提供了可靠地传输数据的能力,而无需对传输的数据的深入了解。
NCI规范定义了多个传输映射。
NFC Controller (NFCC) NFC控制器
The logical entity responsible for the transmission of data over the NFC Radio Interface.
The NFC Controller has a connection to the Device Host (DH) and may have connections to
additional NFC Execution Environments (NFCEEs). Those connections are out of scope of this
specification, but the impacts to the NCI are in scope.
负责通过NFC RF传送数据的逻辑单元。NFC控制器具有对设备主机(DH)的连接,并且可以具有附加的NFC执行环境(NFCEEs)连接。
这些连接在NCI规范的范围之外,但对NCI产生的影响在本规范范围之内。
NFC Execution Environment (NFCEE) NFC执行环境
An environment, either built into the NFCC or connected to the NFCC, where NFC applications are executed.
The NFCEE may be included in entities with various form factors, some of which can be removable or replaceable.
一个内置在NFCC或连接到NFCC,的运行环境,在它之中NFC应用被执行。该NFCEE可以被包括在各种形式的因素,其中一些可以是可移除的或可替换的实体。
NFC Radio Interface NFC无线接口
A contactless radio interface using NFC technology to communicate with a Remote NFC Endpoint.
一种使用NFC技术与远程NFC端点通信的非接触式无线接口。
NFC-DEP Initiator
The role of an NFC Forum Device reached when an NFC Forum Device in Poll Mode has gone through a number of Activities.
In this mode, the NFC Forum Device communicates using the NFC-DEP protocol.
NFC标准设备的一种类型,是指N连接到另一个处于在Poll模式下执行了一些列行为的标准设备的设备. 也就是发起端
在这种模式下,NFC标准设备通信使用NFC-DEP协议。
NFC-DEP Target
The role of an NFC Forum Device, reached when the NFC Forum Device in Listen Mode has gone through a number of Activities.
In this mode, the NFC Forum Device communicates using the NFC-DEP protocol.
和上面相对于,是target设备.
NFCEE Discovery Process
Functionality that allows detection of NFCEEs that are physically connected to the NFCC.
允许检测物理连接到NFCC的功能。
NFCEE Interface
A logical entity on the NFCC that communicates with the DH on one side and an NFCEE on the other side.
NFCC上的一个逻辑实体,与DH一端进行通信,另一侧与NFCEE进行通信。
NFCEE Protocol
A protocol used in the communication between the NFCC and an NFCEE.
在NFCC和NFCEE之间的通信中使用的协议。
Notification Message 通知信息
Can only be sent by an NFCC to the DH. It is sent asynchronously and typically contains informational parameters.
通知信息只能由NFCC发送给设备主机DH。 它是异步发送的,通常包含信息参数。
Packet
A structure that is used to transmit a Message over the NCI Transport.
There are both Control Packets (for transporting Control Messages) and Data Packets (for transporting Data Messages).
用于通过NCI传输传输消息的结构。 有两个控制包(用于传输控制消息)和数据包(用于传输数据消息)。
Poll Mode poll模式
The mode of an NFC Forum Device when it generates a carrier and probes (“polls”) for other devices.
当NFC标准设备具有载波能力就是获取并检测别的设备的能力的时候(就是产生RF能量场),它就处于这个模式,也就是我们所说的P2P模式,发起者。
Remote NFC Endpoint
Refers to a remote device, card, or tag, connected wirelessly over the NFC Radio Interface to the local NFC Forum Device.
指通过NFC无线接口无线连接到本地NFC设备的远程设备、卡或标签。
Response Message
Sent by the NFCC for each Command Message received from the DH. The Response Message may contain status
information pertaining to the results of the Command Message.
由NFCC发送,对应于从DH收到的每个命令消息,响应消息可能包含有关命令消息结果的状态信息。
RF Discovery Process
Functionality that allows detection of a Remote NFC Endpoint and detection by a Remote NFC Endpoint.
The DH can configure the RF Discovery Process, which then runs autonomously within the NFCC.
允许检测远程NFC端点并建立链接和远程NFC端点检测的功能。
卫生部可以配置射频发现过程,然后在NFCC内自主运行。
RF Interface
Logical entities that may contain some protocol logic (e.g., an ISO-DEP RF Interface or an NFC-DEP RF Interface)
or may be a transparent conduit (e.g., a Frame RF Interface). The DH can only communicate with a Remote NFC Endpoint
via an RF Interface, designated as the “Active RF Interface”. The NFCC contains multiple RF Interfaces.
可以包含一些协议逻辑(例如,ISO-DEP RF接口或NFC-DEP RF接口)的逻辑实体或者可以是透明导线(例如,帧RF接口)。
DH只能通过RF接口与远程NFC端点通信,指定为“主动RF接口”。 NFCC包含多个RF接口。
RF Protocol
A protocol used in the communication between the NFCC and a Remote NFC Endpoint.
在NFCC和远程NFC端点之间的通信中使用的协议。
Static RF Connection
A Logical Connection with a fixed Connection Identifier that always exists after NFCC initialization and is never closed.
It is used by the DH to communicate with a Remote NFC Endpoint via an active RF Interface.
与固定连接标识符的逻辑连接,在NFCC初始化后始终存在,并且从未关闭。它由DH使用,通过有源RF接口与远程NFC端点进行通信。
Switched On State
In this state, the DH, the NFCC, and all connected NFCEEs are switched on and powered either by internal battery or external power source.
The NFC Forum device can act in both Poll and Listen Modes. NCI is only applicable in Switched On State.
在这种状态下,DH,NFCC和所有连接的NFCEE都由内部电池或外部电源供电。 NFC设备可以同时处理poll和listen模式。 NCI仅适用于开关状态。
Switched Off State
In this state, the DH is switched off, and the NFCC and all connected NFCEEs are powered either by internal battery or external power source.
The NFC Forum Device can only act in Listen Mode.
在这种状态下,DH关闭,NFCC和所有连接的NFCEE由内部电池或外部电源供电。 此时NFC论备只能处于listen模式下工作.
UICC
A Smart Card that conforms to the specifications written and maintained by the TC ETSI Smart Card Platform. It is a platform
符合TC ETSI智能卡平台编写和维护的规格的智能卡。
在libnfc-nci的src文件夹下:nfa文件夹下在mk中被定义为NFA
nfa :nfc adaption nfc适配接口
原文:https://blog.csdn.net/zy00000000001/article/details/70662352