WO2012068910A1 - 外接卡的访问方法和系统 - Google Patents

外接卡的访问方法和系统 Download PDF

Info

Publication number
WO2012068910A1
WO2012068910A1 PCT/CN2011/078592 CN2011078592W WO2012068910A1 WO 2012068910 A1 WO2012068910 A1 WO 2012068910A1 CN 2011078592 W CN2011078592 W CN 2011078592W WO 2012068910 A1 WO2012068910 A1 WO 2012068910A1
Authority
WO
WIPO (PCT)
Prior art keywords
external card
card
spi
interface
external
Prior art date
Application number
PCT/CN2011/078592
Other languages
English (en)
French (fr)
Inventor
梁国和
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2012068910A1 publication Critical patent/WO2012068910A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
    • G06F13/4291Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus using a clocked protocol
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2213/00Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F2213/38Universal adapter
    • G06F2213/3804Memory card connected to a computer port directly or by means of a reader/writer

Definitions

  • the present invention relates to the field of communications, and in particular to a method and system for accessing an external card.
  • 3G Third Generation
  • services based on external cards are increasingly valued by all parties, and terminals are increasingly demanding external cards.
  • SIM Subscriber Identity Module
  • SD Secure Digital
  • the external card is also widely used as a security module, such as in the field of electronic payment.
  • SIM Subscriber Identity Module
  • SD Secure Digital
  • Increasing external card services require external cards to have high-speed transfer rates and common operational interfaces as well as storage space sharing.
  • terminals generally include multi-application processors.
  • some smart phones include a base belt (BB) and an application processor.
  • the terminal here can be a mobile terminal, or other control devices that are connected to an external card and control the external card, such as a laptop with an external card slot, and a handheld computer with an external card slot (Personal Digital Assistant) , referred to as PDA).
  • PDA Personal Digital Assistant
  • the external card is controlled by the terminal's BB, and the application processor must pass the BB if it needs to access the external card.
  • the application processor accesses the BB, and then the BB accesses the SIM through the IS07816 interface, and then transfers the data to the application processor through an internal interface (such as I2C), and after one or more data forwarding storage, the efficiency is low.
  • a primary object of the present invention is to provide a method and system for accessing an external card to at least solve the above problems.
  • a method for accessing an external card comprising: the terminal connecting to an external card using a serial peripheral interface SPI interface; the application processor of the terminal accessing the SPI interface External card.
  • the method further includes: the baseband chip BB of the terminal accessing the external card through the SPI interface and/or the IS07816 interface.
  • the method further includes: switching, by the SPI bus control device of the terminal, the SPI bus between the BB and the application processor, and performing switching of the input clock when performing the switching, where
  • the SPI bus control device is coupled to the BB and the application processor for implementing sharing of the SPI bus.
  • the method further includes: determining, according to a type of service on the external card, a manner in which the BB and/or the application processor access the external card, where the manner includes at least one of the following: Whether the BB or the application processor is allowed to access the service, and the interface used by the BB to access the service.
  • determining, by the type of service on the external card, that the BB and/or the application processor access the external card comprises at least one of: the BB accessing the external connection through the IS07816 interface
  • the SPI interface accesses a predetermined service on the add-in card and does not allow the BB to access the predetermined service.
  • the application processor accessing the external card through the SPI interface comprises: an analog front end chip NFC CLF accessing a near field communication FC application of the external card through the SPI interface.
  • the FC CLF accessing the external card through the SPI interface includes: the FC CLF accessing an NFC service of the NFC application by using the SPI interface, where the NFC service does not allow the terminal in the terminal BB access.
  • the FC CLF accesses the display application of the FC application through the SPI interface; and/or the BB in the terminal accesses the display application of the NFC application through the SPI interface and/or the IS07816 interface.
  • the method further includes: the BB and/or the application processor operating in a master mode, the external card operating in a slave mode; and the plurality of connected external cards by triggering a chip select input pin Select an external card to transfer data.
  • an access system for an external card including a terminal and an external card, the terminal is connected to the external card by using an SPI interface; the terminal includes an application processor, where The application processor accesses the external card through the SPI interface.
  • the terminal further includes a BB, wherein the BB accesses the external card through the SPI interface and/or the IS07816 interface.
  • the terminal further includes the FC CLF, wherein the FC CLF accesses an FC application of the external card through the SPI interface.
  • the terminal is connected to the external card by using the serial peripheral interface SPI interface; the application processor of the terminal accesses the external card through the SPI interface.
  • FIG. 1 is a schematic diagram of an SPI interface for implementing SIM card access according to an embodiment of the present invention
  • FIG. 2 is a flowchart of a method for accessing an external card according to an embodiment of the present invention
  • 4 is a schematic diagram of a terminal and an external card supporting an SPI bus controller according to an embodiment of the present invention
  • FIG. 5 is a functional block diagram of a SPI bus controller according to an embodiment of the present invention
  • FIG. 7 is a schematic diagram of a preferred application processor accessing an external card through an SPI interface according to an embodiment of the present invention
  • FIG. 8 is a schematic diagram of accessing an external card through an SPI interface according to an embodiment of the present invention
  • FIG. 9 is a schematic diagram of an FC terminal according to an embodiment of the present invention
  • FIG. 10 is a schematic diagram of a multi-external card connected to an NFC terminal according to an embodiment of the present invention
  • FIG. 11 is an FC terminal service according to an embodiment of the present invention
  • FIG. 12 is a schematic diagram of a multi-external card connected to an NFC terminal according to an embodiment of the present invention
  • FIG. 13 is a multi-external card according to an embodiment of the present invention
  • FIG. 1 is a schematic diagram of an SPI interface for implementing SIM card access according to an embodiment of the present invention.
  • the SPI interface is implemented by C4, C8, C6 contacts, and multiplexed CLK contacts, through an SPI interface.
  • the function can completely replace the current IS07816 interface and USB interface, the original IS07816 interface is reserved for compatibility.
  • Step S202 A terminal connects to an external card by using a serial peripheral interface SPI interface; Step S204, The application processor of the terminal accesses the external card through the SPI interface.
  • the application processor directly accesses the external card through the SPI interface, which reduces the access delay and improves the efficiency compared with the prior art application processor accessing the external card through the BB.
  • the BB of the terminal can also access the external card through the SPI interface and/or the IS07816 interface, wherein the IS07816 interface access is reserved for compatibility.
  • the SPI bus control device may be added to share the SPI bus of the BB and the application processor, and the SPI bus control device (For example, the control signal can be used to switch the SPI bus between the BB and the application processor, and when the switching is performed, the input clock is switched.
  • the manner in which the BB and/or the application processor accesses the external card may be determined according to the type of the service on the external card, wherein the manner of accessing the external card may include at least one of the following: whether to allow BB or application processing Access to the service, the interface used by the BB to access the service.
  • BB can access the telecommunication service on the external card through IS07816, the application processor can access the storage service on the external card through the SPI interface, the BB can access the storage service on the external card through the SPI interface, and the application processor can access through the SPI interface.
  • the scheduled service on the add-in card does not allow the BB to access the scheduled service.
  • an external card access system including a terminal and an external card.
  • the terminal is connected to the external card by using an SPI interface, and the terminal includes an application processor, wherein the application processor accesses the external card through the SPI interface.
  • FIG. 3 is a schematic diagram of an access system of an external card according to an embodiment of the present invention. As shown in FIG. 3, the terminal further includes a BB, wherein the BB accesses the external card through the SPI interface and/or the IS07816 interface.
  • the application processor directly accesses the data in the external card through the SPI interface in parallel with the BB, that is, the application processor accesses the external card without passing through the BB.
  • This simplifies the data transfer process that is, the data access can be completed by directly accessing the SPI interface, reducing the data flow between the BB and the application processor, thereby reducing the delay.
  • the external card contacts are limited, if the SPI of the application processor is directly connected to the external card, the contacts will be occupied. Therefore, in the embodiment, the SPI bus multiplexing method is adopted.
  • the application processor and BB may belong to different chips and use different clock frequency sources, so it is guaranteed to ensure clock synchronization during SPI switching.
  • the sharing of the SPI bus is achieved by adding an SPI bus controller device.
  • the SPI bus control device is the SPI bus control function component of the application processor or BB external card.
  • the control signal can be added to complete functions such as SPI switching between the application processor and the BB. The preferred components of the device are described below.
  • the device may include a logic switch and a clock control system part, wherein the logic switch mainly performs SPI signal multiplexing and control, for example, the application processor or the BB can simultaneously complete the service negotiation by using the internal communication interface, and complete the BB and the application processor by using the control signal. Switch between SPI buses. Clock control system control, used to switch the input clock when the BB and application processor SPI are switched. Preferably, the input clock is cut In the case of switching, the BB can be kept as consistent as the clock of the application processor, so as to avoid the interruption of the communication of the original IS07816 interface of the external card (for example, SIM) due to the switching.
  • the logic switch mainly performs SPI signal multiplexing and control
  • the application processor or the BB can simultaneously complete the service negotiation by using the internal communication interface, and complete the BB and the application processor by using the control signal. Switch between SPI buses. Clock control, used to switch the input clock when the BB and application processor SPI are switched.
  • the input clock is cut
  • the external interface of the SPI bus controller device includes at least: an SPI input group, an SPI output, a control signal, and the like.
  • the SPI input group includes SPI output such as BB or application processor; the control signal completes the SPI bus switch between the BB and the application processor; and the SPI output is connected to the external card as the external card SPI input signal.
  • the BB communicates with the SIM card via the SPI interface and is compatible with the IS07816 interface.
  • the application processor accesses the external card through the SPI interface.
  • the BB and the application processor complete the SPI interface switching and control through the internal communication interface.
  • the BB and the application processor SPI can operate in the master mode, and the external cards such as the SIM and the SD card can operate in the slave control mode.
  • the terminal selects the external card that receives the data by triggering the chip select input pin of the slave device to realize SPI sharing between multiple external cards.
  • the SPI is a standard interface
  • the physical difference of the external card can be shielded, and the external card resource sharing can be performed, for example, the external card storage resource sharing among the multiple processors.
  • both the BB and the application processor can directly access the external card, there may be a problem of security and access efficiency.
  • service control can be performed according to the service type of the external card to solve these problems. This will be explained below.
  • the SIM card may include at least: a telecommunication service, a storage service, a special service (such as a mobile payment service), and the like; and the SD card may include: a storage service, a special service (such as a mobile payment service), and the like.
  • FIG. 6 is a schematic diagram of an application processor and a BB accessing different services in an external card according to an embodiment of the present invention. As shown in FIG. 6, the service control may be performed according to the service type of the external card. That is, depending on the service, the terminal can access the external card differently.
  • BB can access the SIM card telecom service through the IS07816 interface; the application processor and the BB can access the storage service on the SIM or SD card through the SPI interface to achieve resource sharing; and the special service application processor can access the external connection through the SPI interface.
  • the special service on the card however, this special service does not allow BB access for reasons such as security and / or efficiency.
  • the following is a description of the system in which the application processor and the BB are connected in parallel through the SPI interface to access the external card as a whole.
  • the system is divided into two parts: a terminal and an external card.
  • the terminal is divided into two parts: the BB and the application processor, and the application processor can be multiple.
  • the BB can communicate with the application processor via an internal communication interface.
  • the external card in this embodiment may include a SIM card, an SD card, and of course other cards. This will be explained below.
  • the BB communicates with the SIM card via the SPI interface and is compatible with the IS07816 interface.
  • the application processor accesses the external card through the SPI interface.
  • the BB and the application processor complete the SPI interface switching and control through the internal communication interface.
  • the BB and the application processor SPI work in the master mode, and the external cards such as SIM and SD card work in the slave control mode.
  • the terminal selects the external card that receives the data by triggering the chip select input pin of the slave device to implement SPI sharing between multiple external cards.
  • the application processor accesses the SIM card via the SPI interface, via C4, C8, C6 contacts, and multiplexed CLK contacts.
  • the system in this embodiment has the following advantages:
  • the application processor in the terminal accesses the external card data through the SPI bus controller without passing through the BB, so that data access can be completed through one SPI interface access, and the transmission efficiency is improved.
  • the BB and the external card retain the previous interface for compatibility (for example, the IS07816 interface).
  • the BB and the external card can also communicate via the SPI interface.
  • the bus controller can be used to implement SPI bus multiplexing.
  • the SPI bus controller is the SPI bus control function component of the application processor or BB external card.
  • the SPI bus controller completes the multiplexing and control of the SPI bus.
  • 5 is a functional block diagram of an SPI bus controller according to an embodiment of the present invention. The bus controller is described below in conjunction with FIG. 5.
  • the SPI bus controller is an SPI bus control of an application processor or a BB external card.
  • the device includes logic switching and clock control systems. Among them, the logic switch mainly completes BB and application processor SPI control and multiplexing.
  • the application processor or BB is used as the master mode, and the external cards such as SIM and SD card work in the slave control mode.
  • the application processor or BB can simultaneously complete the service negotiation by using the internal communication interface, and complete the SPI bus switching between the BB and the application processor through the control signal.
  • the clock control system mainly performs the switching of the input clock when the BB and the application processor SPI are switched. At the same time, it is ensured that the clock of the BB and the application processor are kept as consistent as possible, so as to avoid interruption of communication of the original IS07816 interface of the SIM due to the switching.
  • the device's external interface includes: SPI input group, SPI output, control signal and other parts.
  • the SPI input group includes SPI outputs such as BB or application processor; the control signal completes the SPI bus switch between the BB and the application processor; the SPI output is connected to the external card as the external card SPI input signal.
  • FIG. 7 is a schematic diagram of a preferred application processor accessing an external card through an SPI interface according to an embodiment of the present invention. Another preferred embodiment will be described below with reference to FIG.
  • the terminal side includes three parts: a BB, an application processor, and an SPI bus controller. Among them, the SPI bus controller completes the multiplexing and control of the SPI bus.
  • the BB and the application processor can communicate via the internal communication interface I2C interface.
  • the BB and the external card can be retained by the previous interface (for example, the IS07816 interface).
  • the BB and the external card can also communicate via the SPI interface, and the SPI interface is also controlled by the SPI bus controller.
  • the application processor accesses the SIM card through the SPI interface, wherein access to the SPI interface can be achieved through C4, C8, C6 contacts, and multiplexed CLK contacts.
  • the application processor and BB are used as the main control mode, and the external cards such as SIM and SD card work in the slave control mode, and the internal communication interface can be used to complete the service negotiation, and the SPI bus switching between the BB and the application processor is completed through the control signal.
  • two SIM cards and two SD cards are connected to the SPI interface of the mobile terminal.
  • the terminal selects the external card that receives the data by triggering the chip select input pin of the slave device, and the external card will not be selected. Participate in SPI transmission.
  • the implementation of the SIM and SD card SPI will be described below.
  • the SIM card provides four contacts. In addition to C4, C8 requires two contacts, in the preferred embodiment a clock CLK (C3) is used as the clock line. SWP (C6) is used as the chip select signal line.
  • CLK clock
  • SWP chip select signal line.
  • the SD card operates in SPI mode, data input (P2), data output (dataout) (P7), CLK (P5), CS (PI) and the serial output (MOSI) of the SP bus I controller, respectively.
  • the serial input (MOSO), serial clock (SCK), and chip select signal (CS) are connected.
  • the SPI uses four main signals: Master Output/Slave Input (MOSI), Master Input/Master Output (MISO), Serial SCLK or SCK, and Peripheral Chip (CS). Some have a chip selection dedicated to the SPI interface, called slave selection (SS).
  • Each SPI system consists of one master system and multiple slave systems.
  • the master system provides the SPI clock signal.
  • the SPI bus controller device performs SPI bus control.
  • the device includes two parts: a logic switch and a clock control system.
  • the logic switch mainly completes BB and application processor SPI control and multiplexing. Apply the processor or BB as the master mode, and the SIM card, SD card and other external cards work in slave control mode.
  • the application processor or BB can simultaneously complete the service negotiation with the internal communication interface, and complete the SPI bus switching between the BB and the application processor through the control signal.
  • the clock control system mainly performs the switching of the input clock when the BB and the application processor SPI switch. At the same time, it is ensured that the clock of the BB and the application processor are kept as consistent as possible, so as to avoid the interruption of the communication of the original IS07816 interface of the SIM due to the handover.
  • the clock signal SCLK is controlled by the clock control system of the SPI bus controller after the logic switch of the SPI bus controller.
  • the external interface of the SPI bus controller unit includes: 2 SPI input groups, 4 SPI outputs, control signals, and so on.
  • the SPI input group includes SPI outputs such as BB and application processor; the control signal completes the SPI bus switch between the BB and the application processor; and the SPI output is connected to the external card as an external card SPI input signal.
  • an SPI bus controller is added, and the hardware difference of the external card can be shielded through the SPI interface, and an interface for the application processor to access the external card is provided. It can improve efficiency and share resources and services.
  • the FC terminal refers to a terminal with an NFC function, including an analog front end chip (NFC CLF), an NFC antenna, and a security chip.
  • the security chip can use an internal security chip or an external card.
  • the external card refers to various cards connected to the terminal by an external connection, including a SIM card, an SD card, and the like.
  • FIG. 8 is a schematic diagram of an FC terminal according to the prior art. As shown in FIG. 8, the FC terminal performs security related services through the SWP and the SIM card, and completes service display through the IS07816 interface.
  • the SWP occupies the C6 contact of the SIM card, making it impossible for the SIM card to perform new service expansion.
  • the service display can be technically included in the STK/SCWS/client mode. Due to the limitation of the IS07816 interface, the service display user experience is poor.
  • the FC terminal will face multiple external card application scenarios, but in the prior art, the external card communication interface follows different protocols. Therefore, even if it is also an FC security chip, resources cannot be shared due to differences in external cards, such as FC CLF or NFC antenna sharing.
  • access to the external card through the SPI interface is achieved by the C4, C8, C6 contacts and the multiplexed CLK contacts. However, it occupies the C6 contact reserved for the FC application.
  • the near field communication FC application of the external card is accessed through the SPI interface using the analog front end chip FC CLF to solve the problem.
  • the SIM card may include at least a telecommunication service, a storage service, an FC application, and the like; the SD card may be classified into a storage service, an FC application, and the like.
  • NFC applications include at least NFC services and display applications.
  • the FC service refers to the completion of specific NFC function applications, such as the card transaction application in mobile payment.
  • the display application is a pointer-to-terminal display capability, and provides value-added services based on FC applications, such as transaction record display.
  • FIG. 11 is a schematic diagram of FC terminal service control according to an embodiment of the present invention.
  • the external card service control system shown in FIG. 11 can ensure data security and transmission efficiency of the NFC terminal. Description will be made below with reference to FIG.
  • the FC CLF can access the NFC service of the NFC application through the SPI interface, but the FC service does not allow BB access in the terminal. For display applications in NFC applications, both FC CLF and BB can be used via the SPI interface. Access.
  • BB accesses SIM telecom services through IS07816 to ensure the importance and compatibility of telecom services.
  • NFC services can only be accessed through the SPI interface through FC CLF.
  • BB is not allowed for security and efficiency reasons. Access, avoiding the security risks caused by BB access to NFC services.
  • Display applications can be implemented via technologies such as SCWS/STK/Client. The display application passes the display and interaction requirements to the terminal, and calls related resources to complete the display and interaction of the FC application.
  • 9 is a schematic diagram of an FC terminal according to an embodiment of the present invention. As shown in FIG. 9, both NFC CLF and BB can interact with a display application.
  • STK is accessed through IS07816; SCWS/client has high requirements on the terminal and interacts with the SPI interface.
  • the FC CLF directly accesses the external card through the SPI high-speed interface without passing through the SWP interface (C6 contact). Communication is completed through a high-speed SPI interface to improve transmission efficiency. Because SPI is a standard interface, you can shield the physical differences of external cards and share various resources.
  • the BB can also be connected to the SIM card through the IS07816 (of course, the display application can also be accessed through the interface), and the FC CLF and the BB may belong to different chips and use different clock frequency sources, so the FC CLF accesses the external card through the SPI.
  • FIG. 10 is a schematic diagram of a connection between a multi-external card and an NFC terminal according to an embodiment of the present invention.
  • operation of a plurality of external cards can be realized through a set of FC CLF and NFC antennas.
  • the FC terminal uses multiple external cards as the slave control system and is selected by the chip select signal. In this way, high-speed data transmission of dual-card/multi-card can be realized through the SPI interface.
  • the system is divided into two parts: the FC terminal and the external card.
  • the FC terminal can be further divided into BB.
  • BB and FC CLF can communicate via the internal communication interface.
  • the NFC CLF communicates with the external card directly through the SPI interface. Communication between the BB and the external card can be done by preserving the previous interface (such as the IS07816 interface).
  • the FC terminal accesses the SIM card through the SPI interface.
  • the FC terminal can also add a clock control system, and the clock control system mainly completes the input clock synchronization control when the FC CLF accesses the external card, thereby avoiding the interruption of the communication of the original IS07816 interface of the SIM.
  • FIG. 12 is a schematic diagram of a multi-external card connected to an NFC terminal according to an embodiment of the present invention, which will be described below with reference to FIG.
  • the FC terminal controls a plurality of external cards to work in cooperation through the SPI chip select bus.
  • an FC terminal that communicates with multiple external cards can be realized through a set of FC chips and NFC antennas, and at the same time, multiple external connections
  • the card can be used to meet the needs of users who use FC applications from multiple operators at the same time or FC applications with different external cards of the same carrier.
  • the FC terminal directly accesses the data of the external card through the SPI high-speed interface without passing through the SWP interface. It is implemented by C4, C8, C6 contacts, and multiplexed CLK contacts.
  • the FC terminal functions as the master control mode, and external cards such as SIM and SD cards work in the slave control mode. Connect multiple SIM cards or SD cards to the terminal SPI interface.
  • the terminal selects the external card that receives the data by triggering the chip select input pin of the slave device.
  • the external card that is not selected will not participate in the SPI transmission.
  • the FC terminal is used as the main control system, and the plurality of external cards are used as the slave control system, and the plurality of external data cards are selected by the slave selection (SS) signal, so that the high-speed data of the dual-card/multi-card can be realized through the SPI interface. transmission.
  • the FC terminal adds a clock control system, and the clock control system mainly completes the input clock synchronization control when the FC CLF accesses the external card, thereby avoiding the interruption of the communication of the original IS07816 interface of the SIM.
  • the FC acceptance terminal includes terminals such as POS machines, readers, and gates. Moreover, in the FC terminal of the multiple external cards, by setting an FC CLF and the FC antenna, the card swiping operation of the plurality of external cards can be realized, and the application is automatically cut. As shown in FIG. 13, the process includes the following steps: Step S1302 The FC terminal having multiple external cards is close to the receiving terminal, and the receiving terminal and the FC antenna of the terminal perform communication processing.
  • the applications supported by the external cards of different operators may be different, and the communication methods supported by the FC receiving terminals may be different.
  • Step S1304 the NFC CLF controls the SPI bus of the external card through the chip select signal, selects the application interaction on the external card, and selects the external card with the legal application.
  • Step S1306 Determine whether the external card currently supported by the terminal has a legitimate application. Specifically, although the terminal has multiple external cards, only one external card (which is set by default) is connected to the NFC CLF in the terminal through the chip selection signal. When receiving the communication request of the external receiving terminal, first determine whether the current external card is Have a legitimate application. If the result of the determination is YES, step S1308 is performed, otherwise, execution proceeds to S1310. Step S1308, recording a legitimate application on the external card, including multiple applications on the same external card.
  • step S1310 it is determined whether there are other external cards with legitimate applications. If the result of the determination is no, step S1312 is performed, otherwise, the process proceeds to S1304. In the case of no user intervention, the next search for the external card with the legitimate application is performed until all the external cards in the terminal are found. In step S1312, after all the external card application attempts are completed, it is determined whether there are multiple external cards with legitimate applications. If yes, go to step S1314, otherwise go to step S1320. In step S1314, a user selection interface is provided, and the external card of the communication is selected by the user. In step S1316, it is determined whether the user selects whether it is an application that is currently connected to the FC CLF external card.
  • Step S1320 selecting the corresponding external card SPI by chip selection.
  • step S1320 the card transaction is performed, and the card is swiped.
  • the above modules or steps of the present invention can be implemented by a general-purpose computing device, which can be concentrated on a single computing device or distributed over a network composed of multiple computing devices.
  • the invention is not limited to any specific combination of hardware and software.
  • the above is only the preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes can be made to the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and scope of the present invention are intended to be included within the scope of the present invention.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Telephone Function (AREA)
  • Telephonic Communication Services (AREA)

Description

外接卡的访问方法和系统 技术领域 本发明涉及通信领域, 具体而言, 涉及一种外接卡的访问方法和系统。 背景技术 随着第三代 (3rd Generation , 简称为 3G) 时代的到来, 基于外接卡的业务越来 越受到各方重视, 终端对于外接卡的要求也越来越高。 除了传统用户识别模块卡 ( Subscriber Identity Module, 简称为 SIM) 电信功能以及安全数码 ( Secure Digital, 简称 SD)卡存储功能外,外接卡作为安全模块也得到广泛的应用,如在电子支付领域。 日益增长的外接卡业务要求外接卡必须拥有高速的传输速率及通用操作接口以及和存 储空间共享。 目前终端一般都包括多应用处理器,例如,有的智能手机包括基带芯片(base belt, 简称为 BB)与应用处理器。 即便是单芯片方案, 也会有多媒体处理器等业务应用处理 器。 这里的终端可以是移动终端, 也可以是其他与外接卡连接并控制外接卡的各种控 制设备,如带有外接卡插槽的笔记本电脑、带有外接卡插槽的掌上电脑 (Personal Digital Assistant, 简称为 PDA) 等。 通常,外接卡由终端的 BB控制,应用处理器如果需要访问外接卡,必须通过 BB。 这种, 应用处理器访问通过 BB, 然后, BB通过 IS07816接口访问 SIM, 再将数据通 过内部接口 (如 I2C) 转送到应用处理器的方式, 经过了一次或多次数据转发存储, 效率较低, 并存在延时问题。 另外, 由于历史原因外接卡的通信接口遵循不同的协议。 即便是同样的业务因外接卡的不同而不能共享资源。 发明内容 本发明的主要目的在于提供一种外接卡的访问方法和系统,以至少解决上述问题。 根据本发明的一个方面, 提供了一种外接卡的访问方法, 该方法包括: 终端使用 串行外围设备接口 SPI接口与外接卡连接; 所述终端的应用处理器通过所述 SPI接口 访问所述外接卡。 优选地, 上述方法还包括: 所述终端的基带芯片 BB 通过所述 SPI 接口和 /或 IS07816接口访问所述外接卡。 优选地, 上述方法还包括: 所述终端的 SPI总线控制装置进行所述 BB与所述应 用处理器之间的 SPI总线的切换, 并在进行所述切换时, 进行输入时钟的切换, 其中, 所述 SPI总线控制装置与所述 BB和所述应用处理器连接, 用于实现所述 SPI总线的 共享。 优选地, 上述方法还包括: 根据所述外接卡上的业务的类型, 确定所述 BB和 /或 所述应用处理器访问所述外接卡的方式, 其中, 所述方式包括以下至少之一: 是否允 许所述 BB或所述应用处理器访问所述业务、 所述 BB访问所述业务所采用的接口。 优选地, 根据所述外接卡上的业务的类型确定所述 BB和 /或所述应用处理器访问 所述外接卡的方式包括以下至少之一: 所述 BB通过所述 IS07816接口访问所述外接 卡上的电信业务; 所述应用处理器通过所述 SPI接口访问所述外接卡上的存储业务; 所述 BB通过所述 SPI接口访问所述外接卡上的存储业务; 所述应用处理器通过所述 SPI接口访问所述外接卡上的预定业务, 并且不允许所述 BB访问所述预定业务。 优选地, 所述应用处理器通过所述 SPI接口访问所述外接卡包括: 模拟前端芯片 NFC CLF通过所述 SPI接口访问所述外接卡的近场通信 FC应用。 优选地, 所述 FC CLF通过所述 SPI接口访问所述外接卡包括: 所述 FC CLF 通过所述 SPI接口访问所述 NFC应用的 NFC业务, 其中, 所述 NFC业务不允许所述 终端中的 BB访问。 优选地,所述 FC CLF通过所述 SPI接口访问所述 FC应用的显示应用;和 /或, 所述终端中的 BB通过所述 SPI接口和 /或 IS07816接口访问所述 NFC应用的显示应 用。 优选地, 遍历所有的外接卡, 在多个外接卡中存在合法的 FC应用的情况下, 将 存在合法的 FC应用的外接卡向用户提示, 并且在接收到用户所选择的外接卡之后, 所述 FC CLF访问所述用户所选择的外接卡上的 FC应用。 优选地, 上述方法还包括: 所述 BB和 /或所述应用处理器工作在主控模式, 所述 外接卡工作在从控模式; 通过触发片选输入引脚来从多个连接的外接卡中选择传输数 据的外接卡。 根据本发明的另一方面, 还提供了一种外接卡的访问系统, 包括终端和外接卡, 所述终端使用 SPI接口与所述外接卡连接; 所述终端包括应用处理器, 其中, 所述应 用处理器通过所述 SPI接口访问所述外接卡。 优选地, 所述终端还包括 BB, 其中, 所述 BB通过所述 SPI接口和 /或 IS07816 接口访问所述外接卡。 优选地, 所述终端还包括所述 FC CLF, 其中所述 FC CLF通过所述 SPI接口 访问所述外接卡的 FC应用。 通过本发明, 采用终端使用串行外围设备接口 SPI接口与外接卡连接; 终端的应 用处理器通过 SPI接口访问外接卡。 解决了现有技术中应用处理器需要通过 BB访问 外接卡所导致的时延问题, 提高了应用处理器访问外接卡的速度。 附图说明 此处所说明的附图用来提供对本发明的进一步理解, 构成本申请的一部分, 本发 明的示意性实施例及其说明用于解释本发明, 并不构成对本发明的不当限定。 在附图 中: 图 1是根据本发明实施例的 SPI接口实现 SIM卡访问的示意图; 图 2是根据本发明实施例的外接卡的访问方法的流程图; 图 3是根据本发明实施例的外接卡的访问系统的示意图; 图 4是根据本发明实施例的支持 SPI总线控制器的终端和外接卡的示意图; 图 5是根据本发明的实施例 SPI总线控制器功能框图; 图 6是根据本发明实施例的应用处理器和 BB访问外接卡中不同业务的示意图; 图 7是根据本发明实施例的优选的应用处理器通过 SPI接口访问外接卡的示意图; 图 8是根据现有技术的 FC终端的示意图; 图 9是根据本发明实施例的 FC终端的示意图; 图 10是根据本发明实施例的多外接卡与 NFC终端连接的示意图; 图 11是根据本发明实施例的 FC终端业务控制的示意图; 图 12是根据本发明实施例的多外接卡与 NFC终端相连的示意图; 图 13是根据本发明实施例的多外接卡时应用切换的流程图。 具体实施方式 下文中将参考附图并结合实施例来详细说明本发明。 需要说明的是, 在不冲突的 情况下, 本申请中的实施例及实施例中的特征可以相互组合。 在以下实施例中,使用了专利 201010176222.0提出的通过 SPI接口访问 SIM卡的 方法, 下面结合图 1对该专利进行简单的说明, 该专利中涉及到的其他内容可以参照 该专利, 在此不再赘述, 图 1是根据本发明实施例的 SPI接口实现 SIM卡访问的示意 图, 如图 1所示, 该 SPI接口通过 C4、 C8、 C6触点、 以及复用的 CLK触点实现, 通 过 SPI接口访问 SIM卡,在功能上可以完全替代目前的 IS07816接口及 USB接口, 原 有 IS07816接口为实现兼容功能而保留。 但是, 在该专利 201010176222.0中, 应用处 理器访问外接卡还要通过 BB芯片串行访问外接卡, 因此, 在该专利中也存在现有技 术中应用处理器需要通过 BB访问外接卡所导致的时延的问题。 图 2是根据本发明实施例的外接卡的访问方法的流程图, 如图 2所示, 该流程包 括如下步骤: 步骤 S202, 终端使用串行外围设备接口 SPI接口与外接卡连接; 步骤 S204, 终端的应用处理器通过该 SPI接口访问外接卡。 通过上述步骤, 使应用处理器通过 SPI接口直接访问外接卡, 与现有技术中的应 用处理器通过 BB来访问外接卡的方式相比, 减少了访问的时延, 提高了效率。 优选地, 终端的 BB也可以通过 SPI接口和 /或 IS07816接口访问外接卡, 其中, 保留 IS07816接口访问可以起到兼容的作用。 优选地, 在实施时, 当 BB和应用处理器均可以通过 SPI对外接卡进行访问时, 可以增加 SPI总线控制装置来实现 BB和应用处理器的 SPI总线的共享, 并且, 该 SPI 总线控制装置 (例如, 可以通过控制信号) 进行 BB与应用处理器之间的 SPI总线的 切换, 在进行切换时, 进行输入时钟的切换。 优选地, 为了安全, 可以根据外接卡上的业务的类型, 确定 BB和 /或应用处理器 访问外接卡的方式, 其中, 访问外接卡的方式可以包括以下至少之一: 是否允许 BB 或应用处理器访问业务、 BB访问业务所采用的接口。 例如, BB可以通过 IS07816访问外接卡上的电信业务、应用处理器可以通过 SPI 接口访问外接卡上的存储业务、 BB可以通过 SPI接口访问外接卡上的存储业务、应用 处理器可以通过 SPI接口访问外接卡上的预定业务但是不允许 BB访问该预定业务。 优选地, 外接卡可以有多个, 此时, BB 和 /或应用处理器工作在主控模式, 外接 卡工作在从控模式, 可以通过触发片选输入引脚来从多个连接的外接卡中选择传输数 据的外接卡。 在本实施例中还提供了一种外接卡的访问系统,包括终端和外接卡,终端使用 SPI 接口与外接卡连接, 该终端包括应用处理器, 其中, 应用处理器通过 SPI接口访问外 接卡。 图 3是根据本发明实施例的外接卡的访问系统的示意图, 如图 3所示, 终端还包 括 BB, 其中, BB通过 SPI接口禾口 /或 IS07816接口访问外接卡。 下面结合优选实施例以 SIM卡、 SD卡为例进行说明。 在本优选实施例中, 应用处理器与 BB并行的通过 SPI接口直接访问外接卡中的 数据, 即应用处理器对外接卡的访问不经过 BB。这样可以简化数据传输流程, 即可以 通过直接访问 SPI接口就可以完成数据的访问,减少了 BB与应用处理器间的数据流, 进而减少了时延。 因为外接卡触点有限, 如果将应用处理器的 SPI直接接到外接卡上将占用触点。 因此在本实施例中采用了 SPI总线复用的方式。 另外, 在实施时, 应用处理器与 BB 可能分属不同芯片采用不同的时钟频率源, 因此要保证在 SPI切换过程中保证时钟同 步。 在本实施例中,通过增加 SPI总线控制器装置来实现 SPI总线的共享。 SPI总线控 制装置是应用处理器或 BB对外接卡的 SPI总线控制功能组件。优选的,在采用了 SPI 总线复用方式的情况下, 可以增加控制信号以完成应用处理器与 BB间的 SPI切换等 功能。 下面对该装置优选的组成部分进行说明。 该装置可以包括逻辑开关和时钟控制系统部分, 其中, 逻辑开关主要完成 SPI信 号复用及控制, 例如, 应用处理器或 BB 同时可用内部通信接口完成业务协商, 通过 控制信号完成 BB与应用处理器之间的 SPI总线切换。 时钟控制系统控制, 用于在完 成 BB与应用处理器 SPI切换时, 进行输入时钟的切换。 优选地, 在进行输入时钟切 换时可以尽量保持 BB与应用处理器的时钟的一致, 避免因切换导致外接卡 (例如, SIM) 原有 IS07816接口通信的中断。
SPI总线控制器装置的外部接口至少包括: SPI输入组、 SPI输出、 控制信号等部 分。其中 SPI输入组包括 BB或应用处理器等 SPI输出;控制信号完成 BB与应用处理 器之间的 SPI总线切换; SPI输出与外接卡相连, 作为外接卡 SPI输入信号。 BB通过 SPI接口和 SIM卡通信, 同时兼容 IS07816接口。 应用处理器则通过 SPI接口访问外 接卡。 BB与应用处理器通过内部通信接口完成 SPI接口切换及控制。 优选地, BB和应用处理器 SPI可以工作在主控模式, SIM、 SD卡等外接卡可以 工作在从控制模式下。 在连接多个外接卡的情况下, 终端通过触发从设备的片选输入 引脚来选择接收数据的外接卡, 实现多个外接卡之间的 SPI共享。 通过上述实施例, 不但可以兼容原有的 IS07816接口, 同时因 SPI是标准接口, 可以屏蔽外接卡的物理差异, 做到外接卡资源共享, 例如, 多处理器间的外接卡存储 资源共享。 在 BB和应用处理器均可以直接访问外接卡的情况下, 有可能存在安全以及访问 效率的问题, 此时, 在本实施例中可以根据外接卡的业务种类进行业务控制, 以解决 这些问题。 下面对此进行说明。
SIM卡至少可以包括: 电信业务、 存储业务、 特殊业务 (如移动支付业务) 等; 而 SD卡可以包括: 存储业务、 特殊业务 (如移动支付业务) 等。 图 6是根据本发明实施例的应用处理器和 BB访问外接卡中不同业务的示意图, 如图 6所示, 可以根据外接卡的业务类型进行业务控制。 即, 根据业务的不同, 终端 对于外接卡的访问方式可以不同。 例如, BB可以通过 IS07816接口访问 SIM卡电信 业务; 应用处理器和 BB都可以通过 SPI接口访问 SIM或 SD卡上的存储业务, 以实 现资源共享; 具有特殊业务应用处理器可通过 SPI接口访问外接卡上的特殊业务, 但 是, 该特殊业务因安全和 /或效率等原因不允许 BB访问。 下面将应用处理器与 BB并行的通过 SPI接口访问外接卡作为一个整体的系统进 行说明。 该系统分为终端和外接卡两部分, 其中, 终端分为 BB与应用处理器两部分, 应用处理器可以为多个。 BB可以与应用处理器通过内部通信接口进行通信。本实施例 中的外接卡可以包括 SIM卡、 SD卡, 当然也可以是其它卡。 下面对此进行说明。 BB通过 SPI接口与 SIM卡通信, 同时兼容 IS07816接口。应用处理器则通过 SPI 接口访问外接卡。 BB与应用处理器通过内部通信接口完成 SPI接口切换及控制。 BB 和应用处理器 SPI工作在主控模式, SIM、 SD卡等外接卡工作在从控制模式下。 终端 通过触发从设备的片选输入引脚来选择接收数据的外接卡,实现多个外接卡之间的 SPI 共享。 应用处理器通过 SPI接口访问 SIM卡, 通过 C4, C8, C6触点, 和复用的 CLK 触点实现。 其在功能上可以完全替代目前的 IS07816接口及 USB接口, 原有 7816接 口为实现兼容功能保留。 具体参见专利 201010176222.0, 在此不再赘述。 本实施例中的系统有如下优势: 终端中的应用处理器通过 SPI总线控制器访问外 接卡数据, 而不经过 BB, 这样通过一次 SPI接口访问就可以完成数据的访问, 提高了 传输效率。 BB与外接卡保留了以前的接口以实现兼容(例如, IS07816接口), 当然, BB与外接卡之间也可通过 SPI接口通信。 在上述系统中, 可以使用总线控制器来实现 SPI总线复用, 图 4是根据本发明实 施例的支持 SPI总线控制器的终端和外接卡的示意图, 如图 4所示, 终端具有 SPI总 线控制器。 SPI总线控制器是应用处理器或 BB对外接卡的 SPI总线控制功能组件。其 中 SPI总线控制器完成 SPI总线的复用和控制。 图 5是根据本发明的实施例 SPI总线控制器功能框图, 下面结合图 5对总线控制 器进行说明, 如图 5所示, SPI总线控制器是应用处理器或 BB对外接卡的 SPI总线控 制功能组件, 该装置包括逻辑开关及时钟控制系统等部分。 其中, 逻辑开关主要完成 BB及应用处理器 SPI控制及复用。 应用处理器或 BB作为主控模式, SIM、 SD卡等 外接卡工作在从控制模式下。应用处理器或 BB同时可用内部通信接口完成业务协商, 通过控制信号完成 BB与应用处理器之间的 SPI总线切换。时钟控制系统主要完成 BB 与应用处理器 SPI切换时, 输入时钟的切换。 同时保证 BB与应用处理器的时钟尽量 的保持一致, 避免因切换导致 SIM原有 IS07816接口通信的中断。该装置外部接口包 括: SPI输入组、 SPI输出、 控制信号等部分。 其中 SPI输入组包括 BB或应用处理器 等 SPI输出; 控制信号完成 BB与应用处理器之间的 SPI总线切换; SPI输出与外接卡 相连, 作为外接卡 SPI输入信号。 图 7是根据本发明实施例的优选的应用处理器通过 SPI接口访问外接卡的示意图, 下面结合图 7对另外一个优选实施例进行说明。 在本优选实施例中, 终端侧包括 BB、应用处理器、 SPI总线控制器三部分。其中, SPI总线控制器完成 SPI总线的复用和控制。 BB与应用处理器可以通过内部通信接口 I2C接口进行通信。 BB与外接卡可以通过保留以前的接口 (例如, IS07816接口)。 BB与外接卡之间也可通过 SPI接口通信, 其 SPI接口也由 SPI总线控制器控制。应用 处理器通过 SPI接口访问 SIM卡, 其中, 对 SPI接口的访问可以通过 C4, C8, C6触 点, 和复用的 CLK触点来实现。 应用处理器和 BB作为主控模式, SIM、 SD卡等外接卡工作在从控制模式下, 同 时可用内部通信接口完成业务协商, 通过控制信号完成 BB 与应用处理器之间的 SPI 总线切换。 例如, 将 2个 SIM卡及 2个 SD卡连到移动终端 SPI接口上, 此时, 终端 通过触发从设备的片选输入引脚来选择接收数据的外接卡, 没有被选中外接卡将不会 参与 SPI传输。 下面对 SIM和 SD卡 SPI的实现进行说明。
SIM卡提供四个触点。 除了 C4, C8外还需要两个触点, 在本优选实施例中采用 时钟 CLK (C3 )作为时钟线。 SWP (C6)作为片选信号线。 SD卡工作在 SPI模式下, 数据输入 (datain) (P2), 数据输出 (dataout) (P7), CLK (P5 ), CS (PI ) 分别与 SP总线 I控制器的串行输出 (MOSI)、 串行输入 (MOSO)、 串行时钟 (SCK), 片选 信号 (CS) 相连。
SPI主要使用 4个信号:主机输出 /从机输入(MOSI)、主机输入 /主机输出(MISO)、 串行 SCLK或 SCK和外设芯片 (CS)。 有些有 SPI接口专用的芯片选择, 称为从机选 择(SS)。每个 SPI系统由一个主控系统和多个从控系统组成。主控系统提供 SPI的时 钟信号。 在本优选实施例中, SPI总线控制器装置完成 SPI总线控制。 该装置包括逻辑开 关及时钟控制系统两部分。 逻辑开关主要完成 BB及应用处理器 SPI控制及复用。 应 用处理器或 BB作为主控模式, SIM、 SD卡等外接卡工作在从控制模式下。 应用处理 器或 BB同时可用内部通信接口完成业务协商, 通过控制信号完成 BB与应用处理器 之间的 SPI总线切换。 时钟控制系统主要完成 BB与应用处理器 SPI切换时, 输入时 钟的切换。 同时保证 BB与应用处理器的时钟尽量的保持一致, 避免因切换导致 SIM 原有 IS07816接口通信的中断。 其中, 时钟信号 SCLK通过 SPI总线控制器的逻辑开 关后, 还要经过 SPI总线控制器的时钟控制系统控制。
SPI总线控制器装置外部接口包括: 2个 SPI输入组、 4个 SPI输出、 控制信号等 部分。其中 SPI输入组包括 BB和应用处理器等 SPI输出;控制信号完成 BB与应用处 理器之间的 SPI总线切换; SPI输出与外接卡相连作为外接卡 SPI输入信号。 通过本优选实施例, 增加了一个 SPI总线控制器, 通过 SPI接口可以屏蔽外接卡 的硬件差异, 提供应用处理器访问外接卡的接口。 既可以提高效率, 又可以实现资源 及业务的共享。 由于上述实施例占用了 SIM卡中 C6触点, 那么原来需要使用 C6触点的功能将 不能实现, 例如, 近场通信 (Near Field Communication, 简称为 NFC) 终端, 以下的 实施例涉及到了这种情况下的处理方式,为了更好的进行说明,首先对 FC进行介绍。 FC终端是指具有 NFC功能的终端, 包括模拟前端芯片 (NFC CLF)、 NFC天线 和安全芯片等部分。 其中安全芯片可以采用内部安全芯片, 也可以采用外接卡方式。 在本实施例中, 外接卡是指通过外接方式与终端相连的各种卡片, 包括 SIM卡、 SD 卡等。 如 FC采用 SIM卡作为安全芯片, NFC应用放置在 SIM卡中, C6触点预留 给 FC。 NFC CLF集成在终端主板上。射频前端芯片通过 UART/I2C等接口与终端通 信, 通过简单有线协议(Single Wire Protocol, 简称为 SWP)协议与 SIM卡中 FC应 用通信。 其中 SIM卡 C6触点作为 SWP承载。 FC终端对外接卡一般由终端 BB芯片控制。图 8是根据现有技术的 FC终端的 示意图,如图 8所示, FC终端通过 SWP与 SIM卡进行安全相关业务,通过 IS07816 接口完成业务显示。 但 SWP占用了 SIM卡的 C6触点, 使 SIM卡无法进行新业务扩 展。 而业务显示在技术上可以包括 STK/SCWS/客户端模式等, 因 IS07816接口所限, 业务显示用户体验较差。 并且, FC终端会面临多个外接卡应用场景, 但是在现有技 术中, 外接卡通信接口遵循不同协议。 因此, 即便是同样为 FC安全芯片, 也因外接 卡差异而不能共享资源, 如 FC CLF或 NFC天线共享。 在上述实施例中, 通过 C4, C8, C6触点和复用的 CLK触点实现了通过 SPI接口 访问外接卡。 但是, 占用了预留给 FC应用的 C6触点。 在以下实施例中, 采用模拟 前端芯片 FC CLF通过 SPI接口访问外接卡的近场通信 FC应用来解决该问题。 当然, 外接卡中的业务的种类不同, 可以根据不同的业务种类选择不同的访问方 式, SIM卡至少可以包括电信业务、 存储业务、 FC应用等; SD卡可以分为存储业 务、 FC应用等。 NFC应用至少包括 NFC业务和显示应用。 FC业务指完成特定 NFC 功能应用, 如移动支付中的刷卡交易应用。 显示应用是指针对终端显示能力, 提供基 于 FC应用的增值业务, 如交易记录显示等。 考虑到 FC业务的安全性要求很高, 如果 BB通过 SPI可以自由访问外接卡的话, 可能存在安全隐患。 因此, 在本实施例 中, 可以根据外接卡业务分类进行控制。 图 11是根据本发明实施例的 FC终端业务控制的示意图, 图 11所示的外接卡业 务控制系统,可以保证 NFC终端数据安全及传输效率。下面结合图 11进行说明。 FC CLF可以通过 SPI接口访问 NFC应用的 NFC业务, 但是, 该 FC业务不允许终端中 的 BB访问。对于 NFC应用中的显示应用, FC CLF和 BB均可以通过 SPI接口进行 访问。例如, BB通过 IS07816访问 SIM电信业务, 以保证电信业务重要性及兼容性; 又例如,为了保证 FC业务安全性, NFC业务只能通过 FC CLF通过 SPI接口访问, 因安全及效率原因不允许 BB访问, 避免了因 BB访问 NFC业务存在的安全隐患。 显 示应用可以通过 SCWS/STK/客户端等技术实现。显示应用将显示及交互要求传递给终 端, 调用相关资源完成 FC应用的显示及交互。 图 9是根据本发明实施例的 FC终 端的示意图, 如图 9所示, NFC CLF和 BB都可与显示应用进行交互。 例如, STK通 过 IS07816访问; SCWS/客户端对终端要求高, 采用 SPI接口交互。 通过上述实施例, FC CLF通过 SPI高速接口直接访问外接卡, 而不经过 SWP 接口 (C6触点)。 通过高速 SPI接口完成通信, 提高传输效率。 因 SPI是标准接口, 可以屏蔽外接卡的物理差异, 做到各种资源共享。 优选的, BB还可以通过 IS07816与 SIM卡相连 (当然也可以通过该接口访问显 示应用), FC CLF与 BB可能分属不同芯片而采用不同的时钟频率源, 因此在 FC CLF通过 SPI访问外接卡时, 需要保证时钟同步。 在本实施例中增加了时钟控制系统 解决该问题, 时钟控制系统控制主要完成 FC CLF控制外接卡时输入时钟同步控制, 这样的处理也可以避免 SIM卡原有 IS07816接口通信的中断。 图 10是根据本发明实施例的多外接卡与 NFC终端连接的示意图, 如图 10所示, 通过一套 FC CLF及 NFC天线, 可实现对多个外接卡的操作。 FC终端作为主控系 统, 将多个外接卡作为从控系统, 分别通过片选信号选中。 这样通过 SPI接口, 可以 实现双卡 /多卡的高速数据传输。 如图 10所示, 该系统分为 FC终端和外接卡两部分, FC终端又可分为 BB、
NFC CLF及 FC天线等部分, BB与 FC CLF可以通过内部通信接口进行通信。 NFC CLF与外接卡直接通过 SPI接口通信。 BB与外接卡之间可以通过保留以前的接口(如 IS07816接口) 进行通信。 FC终端通过 SPI接口访问 SIM卡。 优选的, FC终端还可以增加时钟控制系统, 时钟控制系统主要完成 FC CLF 访问外接卡时输入时钟同步控制, 从而避免 SIM原有 IS07816接口通信的中断。 图 12是根据本发明实施例的多外接卡与 NFC终端相连的示意图, 下面结合图 12 进行说明。 如图 12所示, FC终端通过 SPI片选总线控制多个外接卡协同工作。 这样, 通 过一套 FC芯片与 NFC天线可以实现与多外接卡通信的 FC终端, 同时, 多个外接 卡可用来满足用户同时使用多家运营商的 FC 应用或者同一运营商不同外接卡的 FC应用的需求。 FC终端通过 SPI高速接口直接访问外接卡的数据, 而不经过 SWP接口。 通过 C4, C8, C6触点, 和复用的 CLK触点实现。 FC终端作为主控模式, SIM、 SD卡 等外接卡工作在从控制模式。 将多个 SIM卡或 SD卡连到终端 SPI接口上, 这时终端 通过触发从设备的片选输入引脚来选择接收数据的外接卡, 没有被选中外接卡将不会 参与 SPI传输。 优选地, 将 FC终端作为主控系统, 将多个外接卡作为从控系统, 通过从机选择 ( SS)信号选中多外接数据卡, 这样, 通过 SPI接口可以实现双卡 /多卡的高速数据传 输。 优选的, FC终端增加时钟控制系统, 时钟控制系统主要完成 FC CLF访问外 接卡时输入时钟同步控制, 避免导致 SIM原有 IS07816接口通信的中断。 图 13是根据本发明实施例的多外接卡时应用切换的流程图, 以下结合图 13进行 说明。 FC受理终端包括 POS机、 阅读器、 闸机等终端。 并且, 多外接卡的 FC终端 中, 通过设置一个 FC CLF及 FC天线, 即可实现对多个外接卡的刷卡操作, 实现 应用自动切, 如图 13所示, 该流程包括如下步骤: 步骤 S1302, 具有多外接卡的 FC终端接近受理终端, 受理终端与终端的 FC 天线之间进行通信处理。这里,不同运营商外接卡中支持的应用程序可能不同,而 FC 的受理终端所支持的通信方式可能也会因此而不同。 步骤 S1304, NFC CLF通过片选信号控制外接卡的 SPI总线, 选择外接卡上应用 交互, 选择具有合法应用外接卡。 步骤 S1306, 判断终端中当前支持的外接卡是否具有合法应用。 具体的, 终端虽 然具有多个外接卡, 通过片选信号仅选用一个外接卡 (默认设置的) 与终端中的 NFC CLF接通, 接收到外部受理终端的通信要求时, 首先确定当前外接卡是否具有合法应 用。 如果判断结果为是, 则执行步骤 S1308, 否则, 则执行到 S1310。 步骤 S1308, 记录外接卡上的合法应用, 包括同一外接卡上的多个应用。 步骤 S1310, 判断是否还有具有合法应用的其他外接卡。 判断结果为否, 则执行 步骤 S1312, 否则, 则执行到 S1304。 在无用户干预的情况下, 进行下一具有合法应 用的外接卡的查找, 直到查找完终端中的所有外接卡。 步骤 S1312, 所有外接卡应用尝试结束后, 判断是否存在多个具有合法应用的外 接卡。 如果是则执行步骤 S1314, 否则执行步骤 S1320。 步骤 S1314, 提供用户选择界面, 通过用户来选择通信的外接卡。 步骤 S1316, 判断用户选择是否是当前接通到 FC CLF的外接卡的应用。 如果是 则执行步骤 S1320, 否则, 执行步骤 S1318。 步骤 S1318, 通过片选选择对应外接卡 SPI。 步骤 S1320, 进行刷卡交易, 完成刷卡。 在上述实施例中,通过在终端设置一个 FC CLF及天线, 即可实现对多个外接卡 的刷卡操作, 实现结构简单, 成本较低。 显然, 本领域的技术人员应该明白, 上述的本发明的各模块或各步骤可以用通用 的计算装置来实现, 它们可以集中在单个的计算装置上, 或者分布在多个计算装置所 组成的网络上, 可选地, 它们可以用计算装置可执行的程序代码来实现, 从而可以将 它们存储在存储装置中由计算装置来执行,或者将它们分别制作成各个集成电路模块, 或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。 这样, 本发明不限 制于任何特定的硬件和软件结合。 以上所述仅为本发明的优选实施例而已, 并不用于限制本发明, 对于本领域的技 术人员来说, 本发明可以有各种更改和变化。 凡在本发明的精神和原则之内, 所作的 任何修改、 等同替换、 改进等, 均应包含在本发明的保护范围之内。

Claims

权 利 要 求 书
1. 一种外接卡的访问方法, 包括:
终端使用串行外围设备接口 SPI接口与外接卡连接;
所述终端的应用处理器通过所述 SPI接口访问所述外接卡。
2. 根据权利要求 1所述的方法, 其中, 还包括:
所述终端的基带芯片 BB通过所述 SPI接口和 /或 IS07816接口访问所述外 接卡。
3. 根据权利要求 2所述的方法, 其中, 还包括:
所述终端的 SPI总线控制装置进行所述 BB与所述应用处理器之间的 SPI 总线的切换, 并在进行所述切换时, 进行输入时钟的切换, 其中, 所述 SPI总 线控制装置与所述 BB和所述应用处理器连接,用于实现所述 SPI总线的共享。
4. 根据权利要求 2所述的方法, 其中, 还包括:
根据所述外接卡上的业务的类型, 确定所述 BB和 /或所述应用处理器访问 所述外接卡的方式, 其中, 所述方式包括以下至少之一: 是否允许所述 BB和 / 或所述应用处理器访问所述业务、 所述 BB访问所述业务所采用的接口。
5. 根据权利要求 4所述的方法, 其中, 根据所述外接卡上的业务的类型确定所述 BB和 /或所述应用处理器访问所述外接卡的方式包括以下至少之一:
所述 BB通过所述 IS07816接口访问所述外接卡上的电信业务; 所述应用处理器通过所述 SPI接口访问所述外接卡上的存储业务; 所述 BB通过所述 SPI接口访问所述外接卡上的存储业务;
所述应用处理器通过所述 SPI接口访问所述外接卡上的预定业务, 并且不 允许所述 BB访问所述预定业务。
6. 根据权利要求 1所述的方法, 其中, 所述应用处理器通过所述 SPI接口访问所 述外接卡包括:
模拟前端芯片 FC CLF 通过所述 SPI 接口访问所述外接卡的近场通信 FC应用。
7. 根据权利要求 6所述的方法,其中,所述 NFC CLF通过所述 SPI接口访问所述 外接卡包括:
所述 FC CLF通过所述 SPI接口访问所述 NFC应用的 NFC业务, 其中, 所述 FC业务不允许所述终端中的 BB访问。
8. 根据权利要求 6所述的方法, 其中,
所述 FC CLF通过所述 SPI接口访问所述 NFC应用的显示应用; 和 /或, 所述终端中的 BB通过所述 SPI接口和 /或 IS07816接口访问所述 FC应 用的显示应用。
9. 根据权利要求 6至 8中任一项所述的方法, 其中, 遍历所有的外接卡, 在多个 外接卡中存在合法的 FC应用的情况下, 将存在合法的 FC应用的外接卡向 用户提示,并且在接收到用户所选择的外接卡之后,所述 FC CLF访问所述用 户所选择的外接卡上的 FC应用。
10. 根据权利要求 2至 8中任一项所述的方法, 其中, 还包括:
所述 BB和 /或所述应用处理器工作在主控模式, 所述外接卡工作在从控模 式;
通过触发片选输入引脚来从多个连接的外接卡中选择传输数据的外接卡。
11. 一种外接卡的访问系统, 包括终端和外接卡, 所述终端使用 SPI接口与所述外接卡连接;
所述终端包括应用处理器, 其中, 所述应用处理器通过所述 SPI接口访问 所述外接卡。
12. 根据权利要求 11所述的系统, 其中,
所述终端还包括 BB, 其中, 所述 BB通过所述 SPI接口和 /或 IS07816接 口访问所述外接卡。
13. 根据权利要求 11所述的系统, 其中,
所述终端还包括所述 FC CLF, 其中所述 NFC CLF通过所述 SPI接口访 问所述外接卡的 FC应用。
PCT/CN2011/078592 2010-11-24 2011-08-18 外接卡的访问方法和系统 WO2012068910A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201010559576.3A CN102033828B (zh) 2010-11-24 2010-11-24 外接卡的访问方法和系统
CN201010559576.3 2010-11-24

Publications (1)

Publication Number Publication Date
WO2012068910A1 true WO2012068910A1 (zh) 2012-05-31

Family

ID=43886749

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/078592 WO2012068910A1 (zh) 2010-11-24 2011-08-18 外接卡的访问方法和系统

Country Status (2)

Country Link
CN (1) CN102033828B (zh)
WO (1) WO2012068910A1 (zh)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102202119B (zh) * 2011-05-30 2013-11-06 惠州Tcl移动通信有限公司 一种手机
CN102368878A (zh) * 2011-09-19 2012-03-07 中兴通讯股份有限公司 一种多模终端与sim卡信息传输系统及方法
CN102625288B (zh) * 2011-12-29 2019-06-11 中兴通讯股份有限公司 多处理器终端空中下载的方法及多处理器终端
CN106201446A (zh) * 2015-04-30 2016-12-07 小米科技有限责任公司 实现电子设备的辅助功能的方法及装置
CN104955049A (zh) * 2015-06-29 2015-09-30 南京熊猫电子股份有限公司 用mini UICC卡实现二次加密的模块电路及方法
CN107592405B (zh) * 2016-07-07 2020-12-29 中兴通讯股份有限公司 一种天线调谐参数的处理方法及移动终端
CN109862553B (zh) * 2017-11-30 2022-07-12 华为技术有限公司 终端和通信方法

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101411168A (zh) * 2003-06-27 2009-04-15 诺基亚有限公司 在移动装置中实现传感器功能的系统和方法
CN101499049A (zh) * 2008-02-01 2009-08-05 希姆通信息技术(上海)有限公司 手持电子设备存储卡之间数据转移的方法
CN201571088U (zh) * 2009-12-11 2010-09-01 龙旗科技(上海)有限公司 一种新型拍照手机
CN101820460A (zh) * 2010-03-29 2010-09-01 上海华勤通讯技术有限公司 实现spi接口的模块
CN201608771U (zh) * 2009-06-26 2010-10-13 北京昆腾微电子有限公司 Cmmb条件接收模块

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1198192C (zh) * 2002-08-20 2005-04-20 技嘉科技股份有限公司 切换电脑显示器控制源的方法及利用该方法的电脑主机板
US7000056B2 (en) * 2003-03-28 2006-02-14 Intel Corporation Method and apparatus for detecting low pin count and serial peripheral interfaces
CN1320471C (zh) * 2004-11-30 2007-06-06 北京中星微电子有限公司 半双工串行通信总线外部设备接口
CN101751364B (zh) * 2010-01-25 2011-12-21 成都优博创技术有限公司 一种spi总线接口的固件isp烧录器和烧录方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101411168A (zh) * 2003-06-27 2009-04-15 诺基亚有限公司 在移动装置中实现传感器功能的系统和方法
CN101499049A (zh) * 2008-02-01 2009-08-05 希姆通信息技术(上海)有限公司 手持电子设备存储卡之间数据转移的方法
CN201608771U (zh) * 2009-06-26 2010-10-13 北京昆腾微电子有限公司 Cmmb条件接收模块
CN201571088U (zh) * 2009-12-11 2010-09-01 龙旗科技(上海)有限公司 一种新型拍照手机
CN101820460A (zh) * 2010-03-29 2010-09-01 上海华勤通讯技术有限公司 实现spi接口的模块

Also Published As

Publication number Publication date
CN102033828B (zh) 2015-06-03
CN102033828A (zh) 2011-04-27

Similar Documents

Publication Publication Date Title
WO2012068910A1 (zh) 外接卡的访问方法和系统
JP4891253B2 (ja) 移動体通信機器用の共用icカード及び無線トランシーバモジュール
CN109902043B (zh) 一种基于fpga的国密算法加速处理系统
EP3116161B1 (en) Security unit management method and terminal
WO2017201983A1 (zh) 一种接入wifi网络的方法及装置
WO2017113970A1 (zh) 近场通信方法及移动终端
US20150020160A1 (en) Method for Routing Within a Mobile Terminal Emulating a Contactless Payment Card
US20150112860A1 (en) Contactless Payment Method, Device, and System
JP2014197419A (ja) 記憶媒体
CN109902053A (zh) 一种基于双控制器的spi通信方法、终端设备及存储介质
US9635549B2 (en) Providing subscriber identity module function
CN104239829B (zh) 近场通信装置及方法
CN102368878A (zh) 一种多模终端与sim卡信息传输系统及方法
US8776251B2 (en) Data exchange between a secure element and a terminal
US20220327339A1 (en) Smart card management device and smart card management method
WO2009080685A1 (en) Technique for providing network access to different entities
WO2024036887A1 (zh) Sim卡通信电路、相关装置和控制方法
EP1773079A1 (en) Device and method for providing a multiple access to a SIM card in a mobile terminal
CN113132969B (zh) 一种多卡手机实现多个虚拟独立电话系统的方法及装置
KR100821155B1 (ko) 연결 파일 구조를 가진 ic 칩 및 그 어플리케이션 수행방법
KR100620708B1 (ko) 가입자 인증 모듈이 장착된 이동통신 단말기 및 부팅 속도향상 방법
CN109586755B (zh) 一种通信装置、通信存储装置、切换方法以及终端设备
CN112560686A (zh) 一种动态调用人脸系统、方法及云人脸数据处理端
CN110971696A (zh) 一种实现虚拟电子卡通讯的系统和方法
CN114265472B (zh) 一种电子设备及配置文件加载方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 11843085

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 11843085

Country of ref document: EP

Kind code of ref document: A1