The invention relates to the field of communication technology, and in particular, to a switch device that can be connected to NFC chip and can switch a plurality of secure elements and a method thereof.
Currently, with the rapid development of mobile payment, the technology of NFC (Near Field Communication) is being more and more widely used.
In the NFC technology, a NFC having an antenna and being responsible for a non-contact function is equipped in a cell phone, and a secure element (simplified as SE) communicates with the NFC chip via a SWP (Single Wire Protocol) interface. In this way, the NFC chip can forward command interactive data between the antenna and an external non-contact terminal to the secure element via the SWP for processing. During this process, the NFC chip functions as a protocol converter which converts an external non-contact protocol into a SWP protocol to be transmitted to the secure element. There is only one SWP interface between the NFC chip and the secure element, and one NFC chip can be only connected to one secure element.
In order to meet this requirement, a switch mechanism is used in the prior art, in which the SWP connection between one SE and the NFC chip is switched manually. Such a technology requires that when a user interacts with an external device, it is required to know in advance which secure element the external device will interact with, and then a switch is made manually so that the NFC chip is connected to that secure element. If one device is required to communicate with the plurality of secure elements simultaneously, such frequency manual switches will be very inconvenient. Meanwhile, currently, such a switch mechanism mainly supports a connection of two secure elements and when a plurality of secure elements are connected, such a switch mechanism also cannot provide support very well.
In view of the above problem, the invention aims to provide a switch device for automatically connecting to NFC chip and capable of switching a plurality of secure elements.
Specifically, the invention aims to provide a switch device that can be connected to a plurality of secure element devices so that one NFC chip can be connected to a plurality of secure element devices simultaneously and communicate with them, and that one secure element can be automatically selected based on configuration so as to interact with an external non-contact terminal via the NFC chip.
The switch device for automatically connecting to NFC chip and capable of switching a plurality of secure elements according to the invention is disposed between the NFC chip and the secure elements, characterized by comprising:
Preferably, the slave port is communicatively connected to the NFC chip via a SWP protocol, and the master ports are communicatively connected to the plurality of secure elements via the SWP protocol.
Preferably, the number of the slave ports is one, and the master ports can be communicatively connected to the plurality of secure elements respectively.
Preferably, the slave port has a connecting function of the secure element in the SWP protocol connecting process, and the master ports have the connecting function of the NFC in the SWP protocol connecting process.
Preferably, for each secure element, connection information and application information related to the secure element is stored in the registry unit in a one-on-one correspondence.
The invention provides a switch method for enabling a switch device to be automatically connected to NFC chip and capable of switching a plurality of secure elements, characterized by comprising the following steps:
Preferably, in the first channel establishing step, after the NFC chip and the switch device are activated, the first channel is established between the NFC chip and the switch device, and registry information in a converter is configured so that for each secure element, connection information and application information related to the secure element is stored in a one-on-one correspondence.
Preferably, the second channel establishing step comprises the following sub-steps:
Preferably, the information interacting step comprises the following sub-steps:
According to the switch device and the switch method of the invention, SWP connection of a plurality of secure elements can be supported, a corresponding secure element can be automatically selected according to a command sent from the card reader, and communication can be activated. Moreover, all the SWP-SE devices are managed collectively by one switch device so that the management of various SWP-SE devices is made easier, and it is easy to expand or delete SWP-SE or the like in one mobile terminal.
Some of the many embodiments of the invention will be described below with the purpose of providing a basic understanding of the invention rather than identifying key elements or crucial elements of the invention or limiting the scope of protection.
The switch device of the invention allows a plurality of secure elements to be connected and can automatically select a secure element as actually required for processing.
The main technical concept of the invention is that in order to connect a plurality of secure elements to the same one NFC chip, a SWP switcher is added between the NFC chip and the secure elements. The SWP switcher is responsible for establishing SWP connection with a plurality of secure elements, which are then connected to the NFC chip via the SWP switcher.
The switch device of the invention will be described below.
As shown in
The switch device 300 comprises a slave port 301, a master controller 302, a registry 303 and master ports 304.
The slave port 301 is a port for communicatively connecting to the NFC chip 200. The master ports 304 are ports for communicatively connecting to the plurality of secure elements 400 respectively. Connection information of each secure element and application information of all the applications in each secure element are stored in the registry 303. The master controller 302 is used for controlling the switch device 300 to establish a first SWP channel (the SWP channel between the NFC 200 and the slave port 301 in
Specifically, the NFC chip 200 is connected to the switch device 300 via SWP. For the NFC chip 200, the switch device 300 can be considered as a secure element. Therefore, the SWP switcher has to possess the connecting function of secure element in the SWP protocol connecting process (herein, the connecting function refers to a process of establishing SWP protocol communication with the secure element, and reference is made to international standard ETSI TS 102.613 and 102.622). One slave port 301 is required for connecting the SWP switcher with the NFC chip 200. The function possessed by the slave port 301 is consistent with the SWP interface in the secure element.
The switch device 300 has a plurality of SWP interfaces. For each secure element, the original SWP interface is kept unchanged. These secure elements 400 are connected to the switch device 300. For these secure elements 400, the switch device 300 is equivalent to a NFC chip. Therefore, the SWP switcher possesses the connecting function of NFC in the SWP protocol connecting process. A specific secure element can be SWP activated, which can be accomplished by the master ports 304.
The function accomplished by the master controller 302 is to control the switch device 300 to establish a SWP channel with the NFC chip 200 and receive a command sent from the NFC chip 200 via this channel. The switch device 300 establishes a SWP channel with a specific secure element, and sends the command received previously from the NFC chip 200 to this secure element. Meanwhile, a result generated by this secure element is sent to the NFC chip 200 in an opposite direction.
Relevant connection information (e.g., card reader mode, card mode, etc.) of all the secure elements 400 connected to the switch device 300 and all the application information in each secure element are recorded in the registry 303 of the switch device 300, wherein one secure element corresponds to one item in the registry.
The master controller 302 establishes a connection mode with the NFC chip 200 according to information in the registry 303, and decides which secure element to activate when the master controller 302 receives a specific application selecting command. The mobile terminal 100 or the SE 400 can set and manage the registry 303 via the established SWP channel. Herein, the above connection information refers to card reader mode, card mode and P2P mode that each SE corresponds to, and the application information refers to information required in a real achieving process such as AID of application that each SE corresponds to.
When the application program in the card reader 500 is to establish communication with a certain application in a certain secure element, firstly, the card reader 500 sends a APDU command (Application Protocol Data Unit, which is a set of application protocols used in a smart card, referring to international standard ISO7816-4) to the NFC chip 200 via the SWP connection channel. After receiving the APDU command, the NFC chip 200 forwards it to the switch device 300. After the slave port 301 of the switch device 300 receives the command, the master controller 302 controls the slave port 301 to look up this secure element and application information thereof in the registry 302, thus determining which secure element the APDU should be forwarded to. In this way, the master controller 302 controls transmission of the APDU command to this secure element, which processes the APDU command and returns the result of processing to the switch device 300 after processing.
The switch method for achieving automatic connection and switching secure elements using the switch device 300 of the invention will be described below.
The switch method of the invention is a method which enables an automatic connection to the NFC chip 200 using the switch device 300 and can switch a plurality of secure elements 400, and mainly comprises the following steps:
The second channel establishing step S103 comprises the following sub-steps:
Further, the information interacting step S104 comprises the following sub-steps:
According to the switch device and the switch method of the invention, SWP connection of a plurality of secure elements can be supported, a corresponding secure element can be automatically selected according to a command sent from the card reader, and communication can be activated. Moreover, all the SWP-SE devices are managed collectively by one switch device so that the management of various SWP-SE devices is made easier, and it is easy to expand or delete SWP-SE or the like in one mobile terminal.
The above embodiments mainly describe the switch device and switch method that enable automatic connection with the NFC chip and can switch a plurality of secure elements. While only some of the specific embodiments have been described, those skilled in the art will understand that the invention can be carried out in many other forms without departing from the spirit and scope thereof. Therefore, the examples and embodiments given herein should be considered as illustrative rather than limiting. The invention may cover various modifications and substitutes without departing from the spirit and scope of the invention defined by appended claims.
Number | Date | Country | Kind |
---|---|---|---|
201310414374.3 | Sep 2013 | CN | national |
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/CN2014/086268 | 9/11/2014 | WO | 00 |