CN115942290A - NFC communication method, device, system and storage medium - Google Patents

NFC communication method, device, system and storage medium Download PDF

Info

Publication number
CN115942290A
CN115942290A CN202211675211.6A CN202211675211A CN115942290A CN 115942290 A CN115942290 A CN 115942290A CN 202211675211 A CN202211675211 A CN 202211675211A CN 115942290 A CN115942290 A CN 115942290A
Authority
CN
China
Prior art keywords
nci
nfc
instruction
processor
data packet
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211675211.6A
Other languages
Chinese (zh)
Inventor
杨星
张辉权
林晖
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Xinguodu Tech Co Ltd
Original Assignee
Shenzhen Xinguodu Tech Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Xinguodu Tech Co Ltd filed Critical Shenzhen Xinguodu Tech Co Ltd
Priority to CN202211675211.6A priority Critical patent/CN115942290A/en
Publication of CN115942290A publication Critical patent/CN115942290A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Mobile Radio Communication Systems (AREA)

Abstract

The application discloses a NFC communication method, equipment, a system and a storage medium, which relate to the technical field of communication and comprise the following steps: receiving a starting instruction of the NFC service, and carrying out NFC initialization according to the starting instruction of the NFC service; receiving an NFC protocol data packet sent by an application processor, and unpacking the NFC protocol data packet to obtain an NCI instruction; the NFC protocol data packet is obtained after the application processor packages an NCI instruction received based on the NFC service; analyzing the NCI through the virtual NCI module to obtain an analysis result corresponding to the NCI; and when the analysis result represents that the radio frequency chip without the NCI interface is required to execute, calling the radio frequency chip to execute a functional instruction corresponding to the analysis result. The communication method and the communication device can realize communication of the radio frequency chip and execute the functional instruction corresponding to the NCI instruction under the condition that the radio frequency chip does not have the NCI logic interface.

Description

NFC communication method, device, system and storage medium
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method, a device, a system, and a storage medium for NFC communication.
Background
In the related art, a payment intelligent terminal (e.g., a POS terminal) applied to the payment industry is generally configured with an NFC (Near Field Communication) function in a control system (e.g., an android system) of the payment intelligent terminal to implement NCF service in the payment intelligent terminal; in order to implement the NFC function, an NFCC (NFC Controller ) is usually configured in the payment intelligent terminal, and the NFC Controller can be understood as an NFC chip in which a radio frequency chip implements the NFC function, and the NFC chip can implement control over the NFC function, so as to implement data transceiving by using the NFC function; however, the NFC chip only implements data transceiving, and in order to implement communication between different radio frequency chips, a logic Interface capable of establishing communication connection needs to be defined, so that an NCI (NFC Controller Interface) appears, and the NCI defines a logic Interface for communication between the NFC chip and the processor. At present, in a payment intelligent terminal in the payment industry, in order to implement the function of an NCI logical interface, an NCI integrated radio frequency chip is generally configured, which results in an increase in cost of the payment intelligent terminal, and therefore, in order to implement lower cost and related authentication requirements for some payment intelligent terminals, an NCI logical interface is not integrated in a selected radio frequency chip, which results in that the radio frequency chip at the bottom layer cannot communicate with an android system at the top layer through an NFC function. Therefore, how to implement the NCI logic interface function of the radio frequency chip and interface with the top-level android system on the premise of not increasing the cost greatly becomes a technical problem to be solved urgently.
Disclosure of Invention
The present application is directed to solving at least one of the problems in the prior art. Therefore, the present application provides an NFC communication method, device, system, and storage medium, which can implement communication to a radio frequency chip without an NCI logical interface, and execute a function instruction corresponding to an NCI instruction.
The NFC communication method according to the embodiment of the first aspect of the application is applied to a Secure Processor (SP), wherein a virtual NCI module is built in the secure processor, and the method comprises the following steps:
receiving a starting instruction of an NFC service, and carrying out NFC initialization according to the starting instruction of the NFC service;
receiving an NFC protocol data packet sent by an Application Processor (AP), and unpacking the NFC protocol data packet to obtain an NCI instruction; the NFC protocol data packet is obtained after the application processor packages the NCI instruction received based on the NFC service;
analyzing the NCI through a virtual NCI module to obtain an analysis result corresponding to the NCI;
and when the analysis result represents that a radio frequency chip without an NCI interface is required to execute, calling the radio frequency chip to execute a functional instruction corresponding to the analysis result.
According to some embodiments of the present application, the parsing the NCI instruction by the virtual NCI module includes:
if the NCI instruction is a standard instruction, determining the standard definition of the NCI instruction, and analyzing the NCI instruction according to the standard definition through a virtual NCI module;
if the NCI instruction is a custom instruction, calling a definition document of the custom instruction, and analyzing the NCI instruction according to the definition document through a virtual NCI module.
According to some embodiments of the application, the method further comprises:
acquiring a processing result for executing the functional instruction, and packaging the processing result to obtain a result data packet;
and sending the result data packet to the application processor.
According to some embodiments of the application, the method further comprises:
and when the analysis result representation needs to be executed by the virtual NCI module, executing a functional instruction corresponding to the analysis result through the virtual NCI module.
The NFC communication method according to the embodiment of the second aspect of the application is applied to an Application Processor (AP), and comprises the following steps:
receiving a starting instruction of an NFC service, and carrying out NFC initialization according to the starting instruction of the NFC service;
writing an NCI (network communications interface) instruction through the NFCC equipment node of the application processor, and packaging the NCI instruction to obtain an NFC protocol data packet;
forwarding the NFC protocol packet to an SP device node of the application processor, and sending the NFC protocol packet to a Security Processor (SP) through the SP device node.
According to some embodiments of the present application, said wrapping the NCI instruction comprises:
and packaging the NCI instruction through a read-write function preset by the NFCC equipment node.
According to some embodiments of the present application, the sending, by the SP device node, the NFC protocol packet to a Secure Processor (SP), comprises:
and transmitting the NFC protocol data packet to the security processor through the SP equipment node.
The NFC communication device comprises an application processor and a safety processor, wherein the application processor and the safety processor respectively receive a starting instruction of an NFC service and carry out NFC initialization according to the starting instruction of the NFC service;
writing an NCI (network communications interface) instruction into the application processor through the NFCC equipment node of the application processor, and packaging the NCI instruction to obtain an NFC protocol data packet; forwarding the NFC protocol data packet to an SP device node of the application processor, and sending the NFC protocol data packet to the security processor through the SP device node;
the safety processor receives the NFC protocol data packet sent by the application processor, and unpacks the NFC protocol data packet to obtain an NCI instruction; analyzing the NCI through a virtual NCI module to obtain an analysis result corresponding to the NCI; and when the analysis result represents that a radio frequency chip without an NCI interface is required to execute, calling the radio frequency chip to execute a functional instruction corresponding to the analysis result.
An NFC communication system according to an embodiment of a fourth aspect of the present application includes:
at least one memory;
at least one processor;
at least one program;
the programs are stored in the memory, and the processor executes at least one of the programs to implement the methods as described in the embodiments of the first and second aspects.
The computer-readable storage medium according to an embodiment of the fifth aspect of the present application stores computer-executable instructions for causing a computer to perform the method according to the embodiment of the first aspect and the embodiment of the second aspect.
According to the NFC communication method provided by the embodiment of the application, the following beneficial effects are achieved: firstly, a security processor receives a starting instruction of an NFC service and carries out NFC initialization according to the starting instruction of the NFC service; secondly, the safety processor receives the NFC protocol data packet sent by the application processor, and unpacks the NFC protocol data packet to obtain an NCI instruction; the NFC protocol data packet is obtained after the application processor packages an NCI instruction received based on the NFC service; then, analyzing the NCI through the virtual NCI module to obtain an analysis result corresponding to the NCI; and when the analysis result represents that the radio frequency chip without the NCI interface is required to execute, the safety processor calls the radio frequency chip to execute the functional instruction corresponding to the analysis result. According to the NFC communication method, the NCI instruction is written in by using the NFCC equipment node of the application processor, the NFC protocol data packet is sent to the safety processor by using the SP equipment node of the application processor, the safety processor receives and unpacks the NFC protocol data packet to obtain the NCI instruction, the NCI instruction is further analyzed to obtain the functional instruction, and the safety processor calls the radio frequency chip according to the functional instruction to execute the corresponding functional instruction; therefore, the secure processor can send the NFC protocol data packet through the SP device node of the application processor under the condition that the radio frequency chip does not have the NCI logical interface, and a receiving function of the NFC protocol data packet is built in the secure processor, and the secure processor is provided with the virtual NCI module, and the virtual NCI module can call the radio frequency chip to perform related processing according to an analysis result, thereby implementing communication of the radio frequency chip without the NCI logical interface. Therefore, the NFC communication method can realize communication to the radio frequency chip and execute the functional instruction corresponding to the NCI instruction under the condition that the radio frequency chip does not have the NCI logic interface.
Additional aspects and advantages of the present application will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the present application.
Drawings
The present application is further described with reference to the following figures and examples, in which:
FIG. 1 is a schematic diagram of a communication between an application processor and an RF chip according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a communication between an application processor and an RF chip according to another embodiment of the present application;
fig. 3 is a flowchart illustrating an NFC communication method according to an embodiment of the present application;
fig. 4 is a schematic flowchart of an NFC communication method according to another embodiment of the present application;
fig. 5 is a schematic communication diagram of an application processor, a security processor and a radio frequency chip according to another embodiment of the present application;
fig. 6 is a schematic structural diagram of an NFC communication device according to an embodiment of the present application
Fig. 7 is a schematic structural diagram of an NFC communication system according to an embodiment of the present application.
Reference numerals:
application processor 100, secure processor 110, virtual NCI module 120, memory 200, processor 300.
Detailed Description
Reference will now be made in detail to the embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein like reference numerals refer to the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the drawings are exemplary only for the purpose of explaining the present application and are not to be construed as limiting the present application.
It should be noted that although functional block divisions are provided in the system drawings and logical orders are shown in the flowcharts, in some cases, the steps shown and described may be performed in different orders than the block divisions in the systems or in the flowcharts. The terms etc. in the description and claims and the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
In the description of the present application, the meaning of a plurality is one or more, the meaning of a plurality is two or more, and the above, below, exceeding, etc. are understood as excluding the present number, and the above, below, within, etc. are understood as including the present number. If the first and second are described for the purpose of distinguishing technical features, they are not to be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated or implicitly indicating the precedence of the technical features indicated.
In the description of the present application, unless otherwise expressly limited, terms such as set, mounted, connected and the like should be construed broadly, and those skilled in the art can reasonably determine the specific meaning of the terms in the present application by combining the detailed contents of the technical solutions.
In the description of the present application, reference to the description of "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples", or "some examples", etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present application. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
The following explains some terms:
near field communication: the NFC technology is a Communication technology, and devices (such as mobile phones) using the NFC technology can exchange data when approaching each other, and is integrated and evolved from a non-contact Radio Frequency Identification (RFID) and an interconnection and interworking technology, and by integrating functions of an induction card reader, an induction card and point-to-point Communication on a single chip, applications such as mobile payment, electronic ticketing, door access, mobile identity identification, anti-counterfeiting and the like are realized by using a mobile terminal.
An NFC chip: the NFC mobile phone is internally provided with the NFC chip, and compared with the RFID which is originally used only as a label, the NFC mobile phone has the advantage that the data bidirectional transmission function is added, so that the NFC mobile phone is more suitable for electronic money payment; in particular RFID, mutual authentication and dynamic encryption and one-time-keys (OTP) can be implemented on NFC. NFC technology supports a variety of applications including mobile payment and transactions, peer-to-peer communications, and information access on the move. Through the NFC mobile phone, people can be connected with entertainment services and transactions which are expected to be obtained by the people at any place and any time through any equipment, so that payment is completed, poster information is obtained, and the like. NFC devices can be used as contactless smart cards, reader terminals for smart cards, and data transmission links for device-to-device applications, which can be mainly classified into the following four basic types: for payment and ticketing, for electronic tickets, for smart media, and for exchanging, transmitting data.
An NFC controller: the English name is NFC Controller, NFCC for short. The use of NFC enables wireless transmission of data over relatively short distances. In many applications, such as mobile phones, NFC controllers act as proxy servers for communication between host processors, secure elements, and contactless front-ends.
NFC-enabled mobile devices typically contain a host processor and an NFC controller operably coupled to the host processor. The NFC controller is configured to control near field communication between the NFC device and an external device, such as an NFC reader. NFC-enabled mobile devices may operate in a so-called card mode, which means that they may emulate a smart card. In some applications, it is crucial that the communication between the NFC reader and the NFC enabled mobile device is stable and reliable.
NCI (NFC Controller Interface): is a specification made by NFC Forum in 2012, and its main concern is how DH (Device Host) controls and interacts with NFCC. The NCI is a specification formulated according to NFC, and a set of interaction interfaces is formulated in the specification, so that a Host Device (Device Host, for example, a mobile phone, where an NFC chip is integrated into a certain mobile phone, and then the mobile phone is the Device Host, DH for short) can interact with the NFC chip using the socket. That is, the NCI defines the interaction interface between the NFCC to the DH.
In the related art, NCI defines an interface between NFCC to DH. The NFCC refers to an entity that implements NFC data transceiving and runs an NFC protocol stack. The DH is responsible for management of the NFCC, such as initialization, configuration, power management, etc. Taking a mobile phone with an NFC function as an example, NFCC refers to an NFC chip in the mobile phone for implementing the NFC function, and DH is a processor of the mobile phone. The NCI defines a logical interface for communication between the NFC chip of the handset and the processor.
Currently, in order to support the NFC function of the payment smart terminal, the radio frequency chip manufacturer usually solidifies the NCI function into the firmware of the contactless chip (i.e., the radio frequency chip) and provides the NCI function in the form of a radio frequency chip supporting the NCI function. In the non-payment industry, the NFC function of an intelligent terminal is basically externally connected to a radio frequency chip with an NCI function interface, and as shown in fig. 1, an application processor (AP for short) in the intelligent terminal is provided with an NFCC device node for communicating with the radio frequency chip with the NCI function interface.
In the payment industry, since EMV L1 authentication is required (the authentication requires that the payment device meets the protocol and the electrical test), and meanwhile, in order to reduce the cost and the authentication and debugging flexibility, a radio frequency chip without NCI function is almost selected, as shown in fig. 2, in the payment intelligent terminal, an application processor is provided with an SP device node specially communicating with a Security Processor (SP), however, only basic functions can be realized through the SP device node and the radio frequency chip, which results in that a logic interface corresponding to a mature standard NFC function of a control system (such as an android system) in the payment intelligent terminal cannot be docked with the radio frequency chip, and a mature standard NFC function and a corresponding logic interface cannot be used to execute richer function instructions.
Based on this, embodiments of the present application provide an NFC communication method, device, system, and storage medium, which can implement communication on a radio frequency chip without a logic interface, and execute a function instruction corresponding to an NCI instruction.
The NFC communication method of the embodiment of the present application is described below with reference to fig. 3 to 5.
It is understood that, referring to fig. 3 and 5, an NFC communication method is provided, which is applied to a secure processor 110 (SP), wherein a virtual NCI module 120 is built in the secure processor 110, and the method includes:
step S100, receiving a starting instruction of the NFC service, and initializing the NFC according to the starting instruction of the NFC service;
step S110, receiving an NFC protocol data packet sent by the application processor 100 (AP), and unpacking the NFC protocol data packet to obtain an NCI instruction; the NFC protocol data packet is obtained by the application processor 100 packing the NCI instruction received based on the NFC service;
step S120, analyzing the NCI instruction through the virtual NCI module 120 to obtain an analysis result corresponding to the NCI instruction;
and step S130, when the analysis result represents that the radio frequency chip without the NCI interface is required to execute, calling the radio frequency chip to execute the functional instruction corresponding to the analysis result.
It should be noted that the virtual NCI module 120 is NCI firmware loaded inside the secure processor 110, and the NCI firmware can be loaded on any processor capable of being loaded.
It should be noted that an NCI instruction may be understood as an instruction for implementing a function corresponding to the instruction through an NCI interface.
It should be noted that the NCI interface may be understood as a programmed interface written inside the radio frequency chip, and can implement instruction distribution and transfer of the NFC service.
It is understood that the parsing of the NCI instruction by the virtual NCI module 120 includes:
if the NCI instruction is a standard instruction, determining the standard definition of the NCI instruction, and analyzing the NCI instruction according to the standard definition through the virtual NCI module 120;
if the NCI instruction is a custom instruction, calling a definition document of the custom instruction, and analyzing the NCI instruction according to the definition document through the virtual NCI module 120.
It should be noted that the standard document includes a standard function instruction corresponding to the standard instruction, and the custom document includes a custom function instruction corresponding to the custom instruction.
It is understood that the method further comprises:
acquiring a processing result of the execution function instruction, and packaging the processing result to obtain a result data packet;
the result packet is sent to the application processor 100.
It is understood that the method further comprises:
when the representation of the analysis result needs to be executed by the virtual NCI module, the virtual NCI module is used for executing the functional instruction corresponding to the analysis result.
It can be understood that, referring to fig. 3 and 4, there is provided an NFC communication method applied to an application processor 100 (AP), the method including:
step S200, receiving a starting instruction of the NFC service, and initializing the NFC according to the starting instruction of the NFC service;
step S210, writing an NCI instruction through the NFCC device node of the application processor 100, and packaging the NCI instruction to obtain an NFC protocol data packet;
step S220, the NFC protocol packet is forwarded to the SP device node of the application processor 100, and the NFC protocol packet is sent to the secure processor 110 (SP) through the SP device node.
According to some embodiments of the present application, packing the NCI instructions comprises:
and packaging the NCI instruction through a read-write function preset by the NFCC equipment node.
The read/write function is understood to be a function for writing or reading the NCI instruction, and is built in the program.
It is understood that sending the NFC protocol packet to the secure processor 110 (SP) by the SP device node includes:
the NFC protocol packet is transmitted through to the secure processor 110 by the SP device node.
Firstly, the secure processor 110 receives a start instruction of the NFC service, and performs NFC initialization according to the start instruction of the NFC service; secondly, the secure processor 110 receives the NFC protocol data packet sent by the application processor 100, and unpacks the NFC protocol data packet to obtain an NCI instruction; the NFC protocol data packet is obtained by the application processor 100 packing the NCI instruction received based on the NFC service; then, the virtual NCI module 120 analyzes the NCI instruction to obtain an analysis result corresponding to the NCI instruction; when the analysis result represents that the radio frequency chip without the NCI interface is required to execute, the secure processor 110 calls the radio frequency chip to execute the functional instruction corresponding to the analysis result. According to the NFC communication method, the NCI instruction is written in by using the NFCC equipment node of the application processor 100, the NFC protocol data packet is sent to the security processor 110 by using the SP equipment node of the application processor 100, the security processor 110 receives and unpacks the NFC protocol data packet to obtain the NCI instruction, the NCI instruction is further analyzed to obtain the functional instruction, and the security processor 110 calls the radio frequency chip according to the functional instruction to execute the corresponding functional instruction; therefore, the secure processor 110 can send the NFC protocol data packet through the SP device node of the application processor 100 under the condition that the radio frequency chip has no NCI logical interface, and the secure processor 110 has a receiving function of the NFC protocol data packet built therein, and the secure processor 110 is provided with the virtual NCI module 120, and the virtual NCI module 120 can call the radio frequency chip to perform related processing according to the analysis result, thereby realizing communication of the radio frequency chip without the NCI logical interface. Therefore, the NFC communication method can realize communication to the radio frequency chip and execute the functional instruction corresponding to the NCI instruction under the condition that the radio frequency chip does not have the NCI logic interface.
The NFC communication method of the present application is further described below with reference to fig. 5.
According to the NFC communication method, a virtual NCI module 120 is added between a payment intelligent terminal and a radio frequency chip without an NCI logic interface, the virtual NCI module 120 realizes the butt joint of the NCI logic interface and an android system on the upper side, the butt joint of different application programs (APP) installed in android systems in different payment intelligent terminals can be realized on the lower side, for the top layer, as long as developed APPs conform to the framework of the android system, the radio frequency chips can be called through the virtual NCI module 120 when FC service is started, and corresponding functional instructions are further realized, namely, the NCI logic interface is no longer solidified into the radio frequency chip, but is loaded and provided in a software mode, so that more APPs can be adapted, the APPs do not need to be modified correspondingly to adapt to the radio frequency chip, because related functions are realized through the virtual NCI module 120 on the bottom layer, and the APPs only need to normally start the NFC service.
The following describes the interaction process of the application processor 100, the secure processor 110 and the rf chip.
Step 1: the NFC service of the payment smart terminal is started, and the NCI command is used to perform writing and reading, that is, to read the NCI command or write data corresponding to the NCI command, through the NFCC device node of the application processor 100.
In this step, data is normally written and read to and from the NFCC device node without changing the original communication mode of the NFC service.
Step 2: the data received and transmitted by the NFCC device node is encapsulated and forwarded to the SP device node of the application processor 100.
In the step, the read-write function is adjusted, the read-write data is encapsulated into a transmission data format of the SP equipment node and then is forwarded to the SP equipment node.
And step 3: the SP device node transparently passes the encapsulated NFC protocol data packet to the virtual NCI module 120 in the SP.
And 4, step 4: the secure processor 110 unpacks the received NFC protocol data packet and sends back the processing result packet.
In this step, the security processor 110 transmits the unpacked NCI instruction to the virtual NCI module 120, and the virtual NCI module 120 is stored in the security processor 110 in the form of firmware, where the NCI firmware is used to perform NCI command parsing processing. During the parsing process, the virtual NCI module 120 parses and responds to a standard NCI command or a customized NCI command of an NFC service (NFC services of different manufacturers may have a special NCI command): and analyzing the standard NCI instruction according to the NCI instruction definition in the standard document, and analyzing the user-defined NCI instruction according to the user-defined document of the manufacturer. After the virtual NCI module 120 completes the processing, the SP firmware performs packet loopback on the processing result of the virtual NCI module 120, that is, the data is routed to the NFCC device node through the SP device node for loopback because the data of the current NFCC device node is routed to the SP device node instead of the real NFCC.
It should be noted that the virtual NCI module 120 may also be loaded in the application processor 100, and may also implement the corresponding functions.
And 5: the virtual NCI module 120 calls a radio frequency chip without an NCI logic interface, and further calls a communication interface of the radio frequency chip to realize related functions of the NCI command.
It should be noted that the virtual NCI module 120 provides three functions: firstly, the NCI command sent by the control system in the payment intelligent terminal is processed to respond to the function not provided by the radio frequency chip, the NFC service initialization of the control system is met, and the correct execution of the subsequent NCI command is realized; secondly, calling the existing interface of the radio frequency chip, such as turning on and off the field intensity, executing a card inquiry and transmitting an APUD instruction; thirdly, the automatic card inquiry function is executed. The NCI logic interface is not arranged in the solidified radio frequency chip, and for a control system, the NFC service normally realizes the NFC function, but for the hardware selection of the payment intelligent terminal, the radio frequency chip with lower cost can be selected, larger selection right can be obtained, the NFC intelligent terminal is not limited to the production party of the same radio frequency chip, and the payment intelligent terminal has better cost advantage.
It should be noted that, if only the basic payment service is performed, the application processor 100 directly controls the rf chip without the NCI logic interface.
The NFC communication device according to the embodiment of the present application is described below with reference to fig. 6.
It can be understood that, as shown in fig. 6, an NFC communication device is provided, which includes an application processor 100 and a secure processor 110, where the application processor 100 and the secure processor 110 respectively receive a start instruction of an NFC service, and perform NFC initialization according to the start instruction of the NFC service;
the application processor 100 writes an NCI instruction through the NFCC device node of the application processor 100, and packages the NCI instruction to obtain an NFC protocol data packet; forwarding the NFC protocol packet to an SP device node of the application processor 100, and sending the NFC protocol packet to the security processor 110 through the SP device node;
the secure processor 110 receives the NFC protocol data packet sent by the application processor 100, and unpacks the NFC protocol data packet to obtain an NCI instruction; analyzing the NCI instruction through the virtual NCI module 120 to obtain an analysis result corresponding to the NCI instruction; and when the analysis result represents that the radio frequency chip without the NCI interface is required to execute, calling the radio frequency chip to execute the functional instruction corresponding to the analysis result.
An NFC communication system according to an embodiment of the present application is described below with reference to fig. 7.
As can be appreciated, as shown in fig. 7, the NFC communication system includes:
at least one memory 200;
at least one processor 300;
at least one program;
programs are stored in the memory 200, and the processor 300 executes at least one program to implement the NFC communication method described above. Fig. 7 illustrates an example of a processor 300.
The processor 300 and the memory 200 may be connected by a bus or other means, and fig. 7 illustrates a connection by a bus as an example.
The memory 200 is a non-transitory computer readable storage medium, and can be used to store non-transitory software programs, non-transitory computer executable programs, and signals, such as program instructions/signals corresponding to the NFC communication system in the embodiment of the present application. The processor 300 executes various functional applications and data processing, i.e., the NFC communication method of the above-described method embodiments, by executing the non-transitory software programs, instructions, and signals stored in the memory 200.
The memory 200 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data related to the NFC communication method described above, and the like. Further, the memory 200 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, memory 200 optionally includes memory located remotely from processor 300, which may be connected to the NFC communications system via a network. Examples of such networks include, but are not limited to, the internet of things, software defined networks, sensor networks, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The one or more signals are stored in the memory 200 and when executed by the one or more processors 300 perform the NFC communication method in any of the method embodiments described above. For example, the methods in fig. 3 and 4 described above are performed.
A computer-readable storage medium according to an embodiment of the present application is described below with reference to fig. 7.
As shown in fig. 7, a computer-readable storage medium stores computer-executable instructions, which are executed by one or more processors 300, for example, by one of the processors 300 in fig. 7, may cause the one or more processors 300 to execute the NFC communication method in the above-described method embodiment. For example, the methods in fig. 3 and 4 described above are performed.
The above-described system embodiments are merely illustrative, and the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
From the above description of embodiments, those of ordinary skill in the art will appreciate that all or some of the steps, systems, and methods disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media and communication media. The term computer storage media includes both volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information as is well known to those of ordinary skill in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by a computer. In addition, communication media typically embodies computer readable signals, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media as known to those skilled in the art.
The embodiments of the present application have been described in detail with reference to the drawings, but the present application is not limited to the embodiments, and various changes can be made within the knowledge of those skilled in the art without departing from the gist of the present application. Furthermore, the embodiments and features of the embodiments of the present application may be combined with each other without conflict.

Claims (10)

  1. NFC communication method, characterized in that it applies to a Secure Processor (SP) which has a virtual NCI module built in it, the method comprising:
    receiving a starting instruction of an NFC service, and carrying out NFC initialization according to the starting instruction of the NFC service;
    receiving an NFC protocol data packet sent by an Application Processor (AP), and unpacking the NFC protocol data packet to obtain an NCI instruction; the NFC protocol data packet is obtained after the application processor packages the NCI instruction received based on the NFC service;
    analyzing the NCI through a virtual NCI module to obtain an analysis result corresponding to the NCI;
    and when the analysis result represents that a radio frequency chip without an NCI interface is required to execute, calling the radio frequency chip to execute a functional instruction corresponding to the analysis result.
  2. 2. The NFC communication method according to claim 1, wherein the parsing, by the virtual NCI module, the NCI directive includes:
    if the NCI instruction is a standard instruction, determining the standard definition of the NCI instruction, and analyzing the NCI instruction according to the standard definition through a virtual NCI module;
    if the NCI instruction is a custom instruction, calling a definition document of the custom instruction, and analyzing the NCI instruction according to the definition document through a virtual NCI module.
  3. 3. The NFC communication method of claim 1, further comprising:
    acquiring a processing result for executing the functional instruction, and packaging the processing result to obtain a result data packet;
    and sending the result data packet to the application processor.
  4. 4. The NFC communication method according to any one of claims 1 to 3, characterized in that the method further comprises:
    and when the analysis result representation needs to be executed by the virtual NCI module, executing a functional instruction corresponding to the analysis result through the virtual NCI module.
  5. An NFC communications method, applied to an Application Processor (AP), the method comprising:
    receiving a starting instruction of an NFC service, and carrying out NFC initialization according to the starting instruction of the NFC service;
    writing an NCI (network communications interface) instruction through the NFCC equipment node of the application processor, and packaging the NCI instruction to obtain an NFC protocol data packet;
    forwarding the NFC protocol packet to an SP device node of the application processor, and sending the NFC protocol packet to a Security Processor (SP) through the SP device node.
  6. 6. The NFC communication method of claim 5, wherein the packaging the NCI commands comprises:
    and packaging the NCI instruction through a read-write function preset by the NFCC equipment node.
  7. 7. The NFC communication method of claim 5, wherein the sending, by the SP device node, the NFC protocol packet to a Secure Processor (SP) comprises:
    and transmitting the NFC protocol data packet to the security processor through the SP equipment node.
  8. The NFC communication equipment is characterized by comprising an application processor and a safety processor, wherein the application processor and the safety processor respectively receive a starting instruction of NFC service and carry out NFC initialization according to the starting instruction of the NFC service;
    writing an NCI (network communications interface) instruction into the application processor through the NFCC equipment node of the application processor, and packaging the NCI instruction to obtain an NFC protocol data packet; forwarding the NFC protocol data packet to an SP device node of the application processor, and sending the NFC protocol data packet to the security processor through the SP device node;
    the safety processor receives the NFC protocol data packet sent by the application processor, and unpacks the NFC protocol data packet to obtain an NCI instruction; analyzing the NCI through a virtual NCI module to obtain an analysis result corresponding to the NCI; and when the analysis result represents that a radio frequency chip without an NCI interface is required to execute, calling the radio frequency chip to execute a functional instruction corresponding to the analysis result.
  9. An NFC communications system, comprising:
    at least one memory;
    at least one processor;
    at least one program;
    the programs are stored in the memory, and the processor executes at least one of the programs to implement the method of any one of claims 1 to 7.
  10. 10. Computer-readable storage medium, characterized in that it stores computer-executable instructions for causing a computer to perform the method according to any one of claims 1 to 7.
CN202211675211.6A 2022-12-26 2022-12-26 NFC communication method, device, system and storage medium Pending CN115942290A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211675211.6A CN115942290A (en) 2022-12-26 2022-12-26 NFC communication method, device, system and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211675211.6A CN115942290A (en) 2022-12-26 2022-12-26 NFC communication method, device, system and storage medium

Publications (1)

Publication Number Publication Date
CN115942290A true CN115942290A (en) 2023-04-07

Family

ID=86553889

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211675211.6A Pending CN115942290A (en) 2022-12-26 2022-12-26 NFC communication method, device, system and storage medium

Country Status (1)

Country Link
CN (1) CN115942290A (en)

Similar Documents

Publication Publication Date Title
US9420409B2 (en) Near field communication device
US9439220B2 (en) Multiple NFC card applications in multiple execution environments
US7299983B2 (en) Wireless communication device providing a contactless interface for a smart card reader
JP5349681B2 (en) Enhanced near field communication terminal, smart card and communication method thereof
EP2106107B1 (en) Method and apparatus for automatic near field communication application selection in an electronic device
EP2590107B1 (en) Method of managing incoming commands related to contactless applications within a wireless apparatus such as a NFC enabled mobile phone
US9673870B2 (en) Near-field communications and routing
US10243619B2 (en) NFC “split stack” architecture
US9262711B2 (en) NFC tag, communication method and system
US10708744B2 (en) NFC-based communication method and apparatus
CN112069848B (en) Card selection method, chip, terminal and storage medium for NFC card simulation mode
JP2018531565A6 (en) NFC “split stack” architecture
US20130179499A1 (en) Method, apparatus and system for displaying radio frequency identification application information
CA2935284C (en) Mobile communication device and cloud-based computer system
CN104850873A (en) Communication apparatus, information processing apparatus, and control method for the same
KR20200002807A (en) Communication device and method
CN115942290A (en) NFC communication method, device, system and storage medium
US20160165382A1 (en) Electronic entity for a mobile terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination