WO2011103734A1 - 终端设备的近场通信实现方法及实现近场通信的终端设备 - Google Patents

终端设备的近场通信实现方法及实现近场通信的终端设备 Download PDF

Info

Publication number
WO2011103734A1
WO2011103734A1 PCT/CN2010/074866 CN2010074866W WO2011103734A1 WO 2011103734 A1 WO2011103734 A1 WO 2011103734A1 CN 2010074866 W CN2010074866 W CN 2010074866W WO 2011103734 A1 WO2011103734 A1 WO 2011103734A1
Authority
WO
WIPO (PCT)
Prior art keywords
near field
field communication
terminal device
host
smart card
Prior art date
Application number
PCT/CN2010/074866
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 WO2011103734A1 publication Critical patent/WO2011103734A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/18Selecting a network or a communication service
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W84/00Network topologies
    • H04W84/02Hierarchically pre-organised networks, e.g. paging networks, cellular networks, WLAN [Wireless Local Area Network] or WLL [Wireless Local Loop]
    • H04W84/10Small scale networks; Flat hierarchical networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W88/00Devices specially adapted for wireless communication networks, e.g. terminals, base stations or access point devices
    • H04W88/02Terminal devices
    • H04W88/06Terminal devices adapted for operation in multiple networks or having at least two operational modes, e.g. multi-mode terminals

Definitions

  • the present invention relates to mobile communication technologies, and more particularly to a method for implementing near field communication of a terminal device and a terminal device for realizing near field communication.
  • NFC Near Field Communication
  • RFID radio frequency identification
  • interconnection technology a short-range wireless communication technology that evolved from the combination of radio frequency identification (RFID) technology and interconnection technology, and usually works at 13.56 MHz.
  • RFID radio frequency identification
  • mobile communication terminal equipment such as mobile phones can simulate external contactless electronic tags, readers, etc., further expanding the scope of use of mobile phones and bringing convenience to people's lives. Therefore, the technology has a very broad application prospect. .
  • the terminal devices supporting the near field communication function generally include an NFC contactless front end (CLF: Contactless Front) chip connected to an RF (Radio Frequency) antenna.
  • CLF Contactless Front
  • RF Radio Frequency
  • the near field communication generally supports three different types depending on the application scenario. Working mode: Card emulation mode, reader mode and peer-to-peer mode, these three modes can also be converted according to specific application scenarios.
  • the terminal device acts as an active device to generate a radio frequency (RF) field
  • the CLF chip is configured to implement near field communication with an external contactless tag, ie from a contactless "tag" close to the terminal device (tag Reading and writing information in the card; in the card emulation mode, the external reader acts as an active device to generate the RF field, and the CLF chip is configured to implement near field communication with the external reader, that is, the terminal device is simulated as a contactless
  • the tag interacts with an external reader for information.
  • the terminal device provides an active host (host) for managing the near field communication process in the reader mode or the card emulation mode, which is configured to manage the generation and stop of the RF field, and manage the CLF chip to be non-contact with the outside.
  • a commonly used NFC application mode is shown in FIG. 1.
  • the baseband (BaseBand) processor 10 which is mainly used for data processing and storage, interacts with the CLF chip 31 through a Universal Asynchronous Receiver/Transmitter (UART) interface.
  • the baseband processor 10 functions as an active host to manage the CLF chip 31 to perform near field communication.
  • the CLF chip 31 can also realize the security of user information through the built-in, separately connected or external plug-in security chip 41.
  • the user identification module (SIM: Subscriber Identity Module) card 21 that interacts with the baseband processor 10 through the 7816 protocol or the like functions only for user information storage and the like.
  • SIM Subscriber Identity Module
  • FIG. 2 Another application method called enhanced NFC (eNFC) is shown in FIG. 2.
  • the terminal device of the application mode does not have the security chip 41, and application-related functional parts such as security authentication are placed in the SIM card 21.
  • the CLF chip 31 is connected to the C1 pin of the SIM card 21, and the CLF chip 31 still interacts with the baseband processor 10 through the UART interface, and interacts with the functional part of the SIM card 31 through a single wire protocol (SwP: Single Wire Protocol).
  • the SIM card 21 functions as an active host management CLF chip 21 for near field communication, and the CLF chip 31 and the SIM card 21 can also obtain energy through the RF antenna, thereby ensuring that the terminal device can also be depleted or dead.
  • Card analog application which can support near field communication under power down conditions.
  • a part of the terminal device shown in FIG. 3 integrates the above two application modes, that is, at least two hosts, the SIM card 21 and the baseband processor 10, and the terminal device of the application mode has both the security chip 41 and can be processed by the baseband.
  • the device 10 acts as an active host management CLF chip 31 for the near field active host management CLF chip 31 for near field communication.
  • the terminal device only allows one active host to be in working state at the same time, that is, only one reader application or card emulation application can be kept in contact with a given external contactless tag or external contact. The readers interact, so host selection is required. Summary of the invention
  • the technical problem to be solved by the present invention is to provide a method for implementing near field communication of a terminal device and a terminal device for realizing near field communication, so that the user can flexibly select the active host according to specific needs, and the use is more convenient.
  • the present invention provides a method for implementing a near field communication of a terminal device.
  • the terminal device includes a baseband processor, a smart card, and a near field communication module, and the method includes the following steps: the terminal device receives a host selection instruction;
  • the terminal device requests to activate the baseband processor or the smart card according to the host selection instruction, and The baseband processor or smart card requesting activation is set as the active host;
  • the active host management terminal device performs near field communication with an external reader or an external tag.
  • the terminal device requests to activate the baseband processor or the smart card according to the host selection instruction, and sets the baseband processor or smart card requesting activation as an active host.
  • the method includes: the baseband processor or the reader application gate in the smart card initiates an activation request event to the reader RF gate in the near field communication module, and the near field communication module sets the baseband processor or smart card that initiates the activation request event as the active host .
  • the step of the terminal device requesting activation of the baseband processor or the smart card according to the host selection instruction, and setting the baseband processor or smart card requesting activation as an active host includes: an near field communication module pre-providing an application programming interface, the terminal device notifying the near field communication module by the application programming interface that the baseband processor or the smart card requests activation, and the near field communication module is configured to activate the baseband processor Or the smart card is set to the active host.
  • the terminal device automatically releases the active host.
  • the terminal device if the terminal device receives the host selection instruction again, the terminal device refuses to execute the reselected host selection instruction.
  • the terminal device receives the host selection instruction through the human machine interface.
  • the external label is securely authenticated by the security authentication module in the terminal device; when the smart card is set as the active host, The smart card securely authenticates the external label.
  • the external reader is securely authenticated by the security authentication module in the terminal device; when the smart card is set as the active host, The smart card performs security authentication on the external reader.
  • one of the baseband processor or the smart card is set as the active host by default.
  • the terminal device requests activation of the selected smart card according to the host selection instruction, and sets the selected smart card. Is the active host.
  • the present invention also provides a terminal device for performing near field communication with an external reader or an external tag, comprising a baseband processor, a smart card, and a near field communication module for connecting the antenna, and further comprising an instruction receiving module;
  • the instruction receiving module is configured to receive a host selection instruction
  • the near field communication module is configured to accept an activation request of a baseband processor or a smart card according to the host selection instruction, and set the baseband processor or smart card that is requested to be activated as an active host; the baseband processor or smart card is configured as After being set as the active host, the near field communication module is managed to perform near field communication with the external reader or external tag.
  • the baseband processor or the smart card is provided with a reader application gate, and the near field communication module is provided with a reader RF gate; the reader application gate is configured to The reader RF gate initiates an activation request event, causing the near field communication module to set the baseband processor or smart card that initiated the activation request event as the active host.
  • the near field communication module provides an application programming interface in advance; the application programming interface is used to notify the near field communication module that the baseband processor or the smart card requests activation, so that The near field communication module sets the baseband processor or smart card that requests activation as an active host.
  • the invention has the beneficial effects that when the terminal device has multiple hosts in the card simulation mode and the reader mode of the near field communication, the user can select the baseband processor or the SIM card as the active host for the contactless application according to specific needs. , more flexible and convenient to use. In addition, if the user selects the SIM card as the active host, the terminal device can still perform near field communication in the power-down state, which further satisfies the user's needs.
  • Figure 1 is a block diagram of an existing NFC application mode
  • Figure 2 is a block diagram of an existing eNFC application mode
  • 3 is a structural block diagram of a terminal device for implementing host selection according to an embodiment of the present invention
  • 4 is a flowchart of a method for selecting a host according to an embodiment of the present invention
  • FIG. 5 is a flowchart of a host selection method in a reader application mode according to an embodiment of the present invention
  • FIG. 6 is a flowchart of a host selection method in a card simulation application mode according to an embodiment of the present invention.
  • the terminal device of this embodiment includes a baseband processor 10, a smart card 20, a near field communication module 30 that connects an RF antenna, and an instruction receiving module 50, and most terminal devices that support information security authentication further include security authentication.
  • Terminal equipment includes but is not limited to GSM (Global System for Mobile Communications), CDMA (Code-Division Multiple Access), WCDMA (Wideband Code Division Multiple Access: Wideband CDMA), TD-SCDMA ( Time Division- Synchronous Code Division Multiple Access: CDMA2000 (Code Division Multiple Access 2000), LTE (Long Term Evolution), LTE+, and other mobile phones , multi-mode terminals, laptops, PDAs, and other combinations of various systems.
  • GSM Global System for Mobile Communications
  • CDMA Code-Division Multiple Access
  • WCDMA Wideband Code Division Multiple Access: Wideband CDMA
  • TD-SCDMA Time Division- Synchronous Code Division Multiple Access: CDMA2000 (Code Division Multiple Access 2000), LTE (Long Term Evolution), LTE+, and other mobile phones
  • the baseband processor 10 is mainly used to implement functions such as data processing and storage of the terminal device.
  • the smart card 20 can be a SIM card, a UIM card (User Identity Module), and an R-UIM card (Removable-User Identity Module: removable).
  • the USIM card Universal Subscriber Identity Module
  • the UICC card Universal Integrated Circuit Card
  • the Java card a smart card created using the Java platform
  • the command receiving module 50 may be a human-machine interface provided by the terminal device, or may be a button specially set on the terminal device, and configured to receive a host selection instruction of the user, for example, the user may select the baseband by using a human-machine interface provided by the terminal device.
  • the device 10 or the smart card 20 acts as an active host.
  • the near field communication module 30 is configured to accept an activation request of the baseband processor 10 or the smart card 20 in accordance with a host selection instruction received by the instruction receiving module 50, and set the activated baseband processor 10 or smart card 20 as an active host. After the active host is set up, the near field communication module 30 can be used as an active host with an external contactless reader or other form of external reader, external contactless A proxy between a tag or other form of external tag, in near field communication with an external reader or external tag near the terminal device under the management of the active host.
  • the near field communication module 30 preferably uses the CLF chip 31.
  • the terminal device of the present embodiment When the terminal device of the present embodiment is set to the reader mode, there is a reader application gate (Reader Application Gate) in the baseband processor 10 or the smart card 20, and a reader RF gate (Reader RF Gate) exists in the near field communication module 30. A data transmission channel is established between the Reader Application Gate and the corresponding Reader RF Gate, and data transmission can be performed in the near field communication process.
  • the instruction receiving module 50 After the instruction receiving module 50 receives the host selection instruction of the user, the instruction receiving module 50 performs the baseband processor 10 or the smart card 20 selected by the host selection instruction, as indicated by the dotted line in FIG.
  • the baseband processor 10 or the Reader Application Gate in the smart card 20 initiates an activation request event (EVT_ERADER_REQUEST) to the Reader RF Gate in the near field communication module 30 in accordance with the provisions of the international standard for near field communication to enable near field communication.
  • the module 30 sets the baseband processor 10 or smart card 20 that initiated the activation request event as the active host.
  • the security authentication module 40 is configured to communicate with the external tag during the communication between the near field communication module 30 and the external device.
  • the tag is securely authenticated; if the smart card 20 is set to be the active host, the smart card 20 is further configured to securely authenticate the external tag during communication of the near field communication module 30 with the external tag.
  • the near field communication module 30 provides an application programming interface (API interface) in advance, and after the command receiving module 50 receives the host selection command from the user, the dotted line shown in FIG.
  • the instruction receiving module 50 performs data interaction with the near field communication module 30, and the API interface notifies the near field communication module 30 of a baseband processor 10 or the smart card 20 to request activation according to the host selection instruction, so that the near field communication module 30 will request activation.
  • the baseband processor 10 or the smart card 20 is set as an active host.
  • the security authentication module 40 is configured to communicate with the external reader in the near field communication module 30.
  • the external reader is securely authenticated; if the smart card 20 is set as the active host, the smart card 20 is further configured to securely authenticate the external reader during the communication between the near field communication module 30 and the external reader.
  • the user can flexibly select the baseband processor 10 or the smart card 20 in the terminal device as the current active host through the human-machine interface provided by the terminal device, etc., thereby managing the near field communication.
  • Module 30 implements near field communication of data traffic with an external contactless reader or external contactless tag proximate to the terminal device.
  • the method for implementing host selection mainly includes the following steps:
  • the terminal device receives the user's host selection instruction. For example, the user can select the baseband processor 10 or the smart card 20 as the active host through the man-machine interface input provided by the terminal device, or select through the specially set buttons on the terminal device. If there are multiple smart cards 20 in the terminal device, the user can select one of the smart cards 20 as an active host through a human machine interface or the like.
  • the terminal device requests activation of the baseband processor 10 or the smart card 20 according to the user's host selection instruction, and the near field communication module 30 sets the baseband processor 10 or the smart card 20 requesting activation as the active host.
  • the specific method of activating an active host when the terminal device works in the reader mode and the card emulation mode is different.
  • the baseband processor 10 or the Reader Application Gate in the smart card 20 initiates an activation request event to the Reader RF Gate in the near field communication module 30, and the near field communication module 30 will initiate the baseband processor 10 of the activation request event or
  • the smart card 20 is set as an active host.
  • the near field communication module 30 provides an API interface in advance, through which the terminal device notifies the near field communication module 30 that the baseband processor 10 or the smart card 20 requests activation, and the near field communication module 30 will request the activated baseband processor. 10 or smart card 20 is set as the active host.
  • the terminal device For a terminal device having a plurality of smart cards 30, the terminal device requests activation of the smart card 20 selected in step S401 in accordance with a host selection instruction, and sets the selected smart card 20 as an active host.
  • the active host management terminal device communicates with an external reader or an external tag.
  • the active host management near field communication module 30 turns on the RF field to start detecting the external tag, and passes the active host and the near field.
  • the special virtual data channel between the communication modules 30 realizes data transmission; when the terminal device is in the card simulation mode, when the near field communication module 30 detects an RF field, it passes through the special between the active host and the near field communication module 30.
  • the virtual data channel implements data transfer.
  • this step can further include security certification.
  • the manner of performing security authentication on the external label is: when the baseband processor 10 is set as the active host, the security authentication is implemented by the security authentication module 40 in the terminal device; when the smart card 20 is set as the active host, Through the smart card 20 for security authentication and other applications.
  • the way to securely authenticate the external reader is: when the baseband processor 10 is set as the active host, the security authentication module 40 in the terminal device performs security authentication; when the smart card is set as the active host, the The smart card 20 performs security authentication and other applications.
  • the terminal device may refuse to execute the host selection instruction, specifically, the terminal device.
  • the human-machine interface can also be used to prompt the user that the active host currently exists.
  • the active host's reader application or the analog card application must be stopped before the new active host is set.
  • the terminal device Since the terminal device in the card emulation mode is usually in a passive state, in order to ensure that the external reader can smoothly read the data in the terminal device, the terminal device waits for setting by the host selection instruction after receiving the user's host selection instruction and automatically releasing the active host.
  • the state of the active host one of the baseband processor 10 or the smart card 20 can be set as the active host by default. After the active host is set by default, if the host selected by the host selection command is identical to the default active host, the terminal device does not need to reset the host as the active host. Otherwise, switch the active host according to the steps shown in Figure 4.
  • the flow of selecting a SIM card 21 as an active host in the reader mode of the mobile phone includes the following steps:
  • S501 After the user selects a SIM card 21 from the human machine interface 51 of the mobile phone as the active host, the human machine interface 51 notifies the SIM card 21. If there are multiple SIM cards 21 in the mobile phone, the human machine interface 51 notifies the user to select one of the SIM cards 21.
  • the Reader Application Gate 22 in the SIM card 21 initiates an activation request event EVT_READER_REQUEST to the Reader RF Gate 32 in the CLF chip 31, indicating that the SIM card 21 requests activation, and the activation initiation mode of this step is currently specified Field communication international standards.
  • the CLF chip 31 sets the SIM card 21 as the active host, and can also feed back the setting result to the human machine interface 51 for the user to watch.
  • the CLF chip 31 detects the external non-contact tag 60 near the mobile phone and reads the tag information.
  • the Reader RF Gate 32 in the CLF chip 31 sends a tag detection message EVT_TARGET_DISCO VERED to the Reader Application Gate 22 in the SIM card 21 for notifying the Reader Application Gate 22 that the external contactless tag 60 has been detected.
  • the Reader Application Gate 22 in the SIM card 21 sends a data read/write message WR_XCHG_DATA to the Reader RF Gate 32 in the CLF chip 31, and then the Reader RF Gate 32 in the CLF chip 31 returns a response message ANY_OK to The SIM card 21, thereby completing the data communication between the SIM card 21 and the external contactless tag 60, this step can be repeated multiple times.
  • the specific selection step is completely similar to the above process, and only the Reader Application Gate 22 in the SIM card 21 is replaced with the Reader Application in the baseband processor 10.
  • the Gate performs data interaction with the Reader RF Gate 32 in the CLF chip 31.
  • the terminal device when an active host is in an active state, the user may issue a host selection instruction requesting activation of another active host to cause a conflict.
  • the terminal device in order to ensure the normal operation of the data communication, the terminal device can reject the latter host selection instruction, prompting the user that the current active host is working, and the user can select whether to stop the reader application of the currently active host and switch the active host.
  • the terminal device may reject the request, prompting the user that the current active host is working, and The user selects whether to stop the reader application of the currently active host.
  • the selection on the human-machine interface may be blocked until the terminal device releases the active host, and the human-machine interface is Provides an option for the active host.
  • the mobile phone of an embodiment of the present invention selects a SIM card in a card emulation application mode.
  • the process of acting as an active host includes the following steps:
  • Step S600 In the card emulation mode, after the CLF chip 31 powers up the SIM card 21, the communication between the physical layer and the data layer is established between the SIM card 21 and the CLF chip 31 by using a single-line protocol, and the SIM card 21 acquires the CLF chip 31.
  • the Card RF Gate 32 in the middle establishes and opens a data transmission channel between the Card Application Gate 22 in the SIM card 21 and the corresponding Card RF Gate 32 in the CLF chip 31; at the same time, the baseband processor 10 establishes and opens the A data transmission channel between the Reader Application Gate and the corresponding Reader RF Gate 32 in the CLF chip 31.
  • the default active host may not be set, that is, the active host state is maintained.
  • the default active host may be preset as the SIM card 21 or the baseband processor 10, and may also be displayed on the human machine interface 51. The default active host.
  • Step S601 The user selects a SIM card 21 from the human machine interface 51 as a new active host, and the mobile phone uses the API interface provided by the CLF chip 31 to notify the CLF chip 31 of the SIM card 21 to request activation by calling an API function.
  • Step S602 The CLF chip 31 sets the SIM card 21 as the active host, and can also feed back the setting result to the human machine interface 51 for the user to watch.
  • the API function provided by the CLF chip 31 to the mobile phone is defined as SetActiveHost ( ), and the function includes a variable Host ID, and the preset Host ID value is "01", indicating that the baseband processor is selected. 10 is the active host, and the value of Host ID is "02", indicating that the SIM card 21 is selected as the active host.
  • the API function is called inside the mobile phone, and the CLF chip 31 sets the active host according to the value of the Host ID.
  • the CLF chip 31 When the CLF chip 31 obtains the Host ID of the SetActiveHost( ) function, it may first determine whether the value of the Host ID is the same as the value of the Host ID corresponding to the current active host. If the same indicates that the active host does not need to be switched, no subsequent processing may be performed; If it is different, the host corresponding to the obtained Host ID is the active host.
  • the CLF chip 31 can also provide return information to the mobile phone. If the switching is successful or there is no need to switch, the return information can be TRUE (true), and the mobile phone displays a new active host on the human machine interface 51; if for some reason If the new active host fails, the return message is FALSE, and the mobile phone displays the selection failure on the display unit 51.
  • Step S603 The CLF chip 31 detects an external RF field near the mobile phone.
  • Step S604 The Card RF Gate 33 in the CLF chip 31 sends a tag detection message EVT_FIELD_ON to the Card Application Gate 32 in the SIM card 31, indicating that the RF field provided by the external contactless reader 70 has been detected.
  • Step S605 After the Card RF Gate 33 in the CLF chip 31 is activated, the activation notification message EVT_CARD_ACTIVATED is sent to the Card Application Gate 23 in the SIM card 21, and the SIM card 21 is notified that the CLF chip 31 has been activated, and the application protocol can be exchanged.
  • APDU Application Protocol Data Unit
  • Step S606 The Card RF Gate 33 in the CLF chip 31 will come from external contactless reading.
  • the APDU command of the device 70 is forwarded to the Card Application Gate 23 in the SIM card 21 through the data transfer message EVT_SEND_DATA, and the Card Application Gate 23 in the SIM card 21 is replied by the data transfer message EVT_SEND_DATA to complete the SIM.
  • the data communication between the card 21 and the external contactless reader 70 can be repeated multiple times.
  • Step S607 When the external contactless reader 70 no longer provides the APDU command, indicating that the mobile phone has completed the card emulation application, the Card RF Gate 33 in the CLF chip 31 sends an activation close message EVT CARD DEACTIVED to the Card Application in the SIM card 21. Gate 23 notifies the end of the data interaction.
  • Step S608 When the CLF chip 31 detects that the RF field of the external contactless reader 70 is turned off, the Card RF Gate 33 sends a card simulation end message EVT_FIELD_OFF to the Card Application Gate 23 in the SIM card 21, if the mobile phone is at This message may not be sent when the battery is low or off.
  • Step S609 The contactless card emulation application is completed, the mobile phone automatically releases the active host and notifies the CLF chip 31.
  • Step S610 The CLF chip 31 can restore the baseband processor 10 to be an active host.
  • the specific selection step is completely similar to the above process, and only the Card Application Gate 32 in the SIM card 21 is replaced with the Card Application in the baseband processor 10.
  • the Gate performs data interaction with the Card RF Gate 32 in the CLF chip 31.
  • the invention enables the terminal device to select the active host for the contactless application according to the specific needs when there are multiple hosts in the card simulation mode and the reader mode of the near field communication, and the use is more flexible and convenient.
  • the CLF chip 31 and the smart card 20 can acquire energy through the radio frequency antenna to ensure the power in the terminal device. Card simulation can also be performed in case of insufficient or no power, that is, it can support near-field communication under power-off conditions, and further meet user needs.
  • the technical solution of the present invention realizes that when there are multiple hosts in the card emulation mode and the reader mode of the near field communication, the user can select the baseband processor or the SIM card as the active host for the contactless application according to the specific needs, and use More flexible and convenient. In addition, if the user selects the SIM card as the active host, the terminal device can still perform near field communication in the power-down state, further satisfying the user's needs.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Telephonic Communication Services (AREA)
  • Telephone Function (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本发明提供了一种终端设备的近场通信实现方法和实现近场通信的终端设备,所述方法包括以下步骤:终端设备接收主机选择指令;终端设备根据所述主机选择指令请求激活基带处理器或智能卡,并将所述请求激活的基带处理器或智能卡设置为活动主机;所述活动主机管理终端设备与外部阅读器或外部标签进行近场通信。本发明使终端设备在近场通信的卡模拟模式和阅读器模式下存在多个主机时,能够根据具体需要选择活动主机进行非接触式应用,使用更加灵活方便。

Description

终端设备的近场通信实现方法及实现近场通信的终端设备
技术领域
本发明涉及移动通讯技术, 尤其涉及终端设备的近场通信实现方法及实 现近场通信的终端设备。
背景技术
近场通信( NFC: Near Field Communication )技术是一种近距离无线通信 技术, 由射频识别(RFID: Radio Frequency Identification )技术及互连技术融 合演变而来, 通常工作于 13.56MHz。 手机等移动通信终端设备集成 NFC技 术后, 能够模拟外部非接触式电子标签、 阅读器等, 进一步扩大了手机的使 用范围, 给人们的生活带来便捷, 因此, 该技术具有十分广阔的应用前景。
支持近场通信功能的终端设备一般都包含与 RF ( Radio Frequency,射频 ) 天线相连的 NFC非接触式前端 (CLF: Contactless Front ) 芯片, 根据应用场 景的不同, 近场通信一般支持三种不同的工作模式: 卡模拟模式、 阅读器模 式和点对点模式, 这三种模式还可根据具体应用场景进行相互转化。 在阅读 器模式下, 终端设备作为主动设备生成射频(RF )场, CLF芯片配置为实现 与外部非接触式标签之间的近场通信, 即从靠近终端设备的非接触式 "标签" ( tag ) 中读取和写入信息; 在卡模拟模式下, 外部阅读器作为主动设备产生 RF场, CLF芯片配置为实现与外部阅读器之间的近场通信, 即把终端设备模 拟成为非接触式标签与外部阅读器进行信息交互。
NFC技术中, 终端设备提供一个在阅读器模式或卡模拟模式下对近场通 信过程进行管理的活动主机(host ) , 它配置为管理 RF场的生成和停止, 以 及管理 CLF芯片与外部非接触式标签或外部非接触式阅读器进行近场通信的 过程。 一种常用的 NFC应用方式如图 1所示, 主要用于数据处理和存储的基 带 (BaseBand ) 处理器 10 通过通用异步接收 /发送装置 (UART: Universal Asynchronous Receiver/Transmitter )接口与 CLF芯片 31交互, 由基带处理器 10充当活动主机管理 CLF芯片 31完成近场通信的功能, CLF芯片 31还可通 过内置的、单独连接的或外置插卡形式的安全芯片 41实现用户信息的安全认 证; 与基带处理器 10通过 7816协议等方式进行交互的用户识别模块( SIM: Subscriber Identity Module )卡 21仅起到用户信息存储等作用。 以上的应用方 式目前存在于多种终端设备。
另一种称为增强型 NFC ( eNFC: enhanced NFC)的应用方式如图 2所示, 该应用方式的终端设备不具备安全芯片 41 , 安全认证等应用相关的功能部分 被放置在 SIM卡 21中, CLF芯片 31与 SIM卡 21的 C1管脚相连, CLF芯片 31仍然通过 UART接口与基带处理器 10交互,并通过单线协议( SWP: Single Wire Protocol )与 SIM卡 31中的功能部分进行交互, 这种应用方式下, SIM 卡 21充当活动主机管理 CLF芯片 21进行近场通信, CLF芯片 31和 SIM卡 21还能够通过射频天线获取能量, 保证在终端设备电量不足或没电的情况下 也能进行卡模拟应用, 即能够支持掉电状况下的近场通信。
目前, 一部分如图 3所示的终端设备集成了上述两种应用方式, 即至少 存在 SIM卡 21和基带处理器 10两种主机, 这种应用方式的终端设备既存在 安全芯片 41 ,可由基带处理器 10充当活动主机管理 CLF芯片 31进行近场通 活动主机管理 CLF芯片 31进行近场通信。 然而, 实际应用中, 为了避免控 制冲突, 终端设备在同一时刻只允许一个活动主机处于工作状态, 即只能保 持一个阅读器应用或卡模拟应用与给定的外部非接触式标签或外部非接触式 阅读器交互, 因此需要进行主机选择。 发明内容
本发明所要解决的技术问题是, 提供一种终端设备的近场通信实现方法 及实现近场通信的终端设备, 使用户能够根据具体需要灵活选择活动主机、 使用更加方便。
为解决上述技术问题, 本发明提供一种终端设备的近场通信实现方法, 终端设备中包括基带处理器、 智能卡和近场通信模块, 该方法包括以下步骤: 终端设备接收主机选择指令;
终端设备根据所述主机选择指令请求激活基带处理器或智能卡, 并将所 述请求激活的基带处理器或智能卡设置为活动主机; 以及
所述活动主机管理终端设备与外部阅读器或外部标签进行近场通信。 优选地, 当终端设备被设置成阅读器模式时, 所述终端设备根据所述主 机选择指令请求激活基带处理器或智能卡, 并将所述请求激活的基带处理器 或智能卡设置为活动主机的步骤包括: 基带处理器或智能卡中的阅读器应用 门向近场通信模块中的阅读器射频门发起激活请求事件, 近场通信模块将所 述发起激活请求事件的基带处理器或智能卡设置为活动主机。
优选地, 当终端设备被设置成卡模拟模式时, 所述终端设备根据所述主 机选择指令请求激活基带处理器或智能卡, 并将所述请求激活的基带处理器 或智能卡设置为活动主机的步骤包括: 近场通信模块预先提供应用程序编程 接口, 终端设备通过所述应用程序编程接口通知近场通信模块所述基带处理 器或智能卡请求激活, 近场通信模块将所述请求激活的基带处理器或智能卡 设置为活动主机。
优选地, 在所述近场通信完成后, 终端设备自动释放活动主机。
优选地, 在所述近场通信过程中, 如果终端设备再次接收主机选择指令, 则终端设备拒绝执行所述再次接收的主机选择指令。
优选地, 终端设备通过人机界面来接收主机选择指令。
优选地, 在所述近场通信过程中, 当设置基带处理器为活动主机时, 通 过所述终端设备中的安全认证模块对外部标签进行安全认证; 当设置智能卡 为活动主机时, 通过所述智能卡对外部标签进行安全认证。
优选地, 在所述近场通信过程中, 当设置基带处理器为活动主机时, 通 过所述终端设备中的安全认证模块对外部阅读器进行安全认证; 当设置智能 卡为活动主机时, 通过所述智能卡对外部阅读器进行安全认证。
优选地, 当终端设备未通过主机选择指令设置活动主机时, 将所述基带 处理器或智能卡中的一个缺省设置为活动主机。
优选地, 如果终端设备中存在多个智能卡, 且所述主机选择指令选择其 中一个智能卡, 则终端设备根据所述主机选择指令请求激活所述被选择的智 能卡, 并将所述被选择的智能卡设置为活动主机。 本发明还提供了一种与外部阅读器或外部标签实现近场通信的终端设 备, 包括基带处理器、 智能卡和连接天线的近场通信模块, 并且还包括指令 接收模块; 其中,
所述指令接收模块配置为接收主机选择指令;
所述近场通信模块配置为根据所述主机选择指令接受基带处理器或智能 卡的激活请求, 并将所述请求激活的基带处理器或智能卡设置为活动主机; 所述基带处理器或智能卡配置为在被设置为活动主机后, 管理所述近场 通信模块与所述外部阅读器或外部标签进行近场通信。 优选地, 当终端设备被设置成阅读器模式时, 基带处理器或智能卡中设 有阅读器应用门, 近场通信模块中设有阅读器射频门; 所述阅读器应用门配置为向所述阅读器射频门发起激活请求事件, 使近 场通信模块将发起所述激活请求事件的基带处理器或智能卡设置为活动主 机。
优选地, 当终端设备被设置成卡模拟模式时, 近场通信模块预先提供应 用程序编程接口; 所述应用程序编程接口被用来通知近场通信模块所述基带处理器或智能 卡请求激活, 使近场通信模块将所述请求激活的基带处理器或智能卡设置为 活动主机。
本发明的有益效果是, 实现了终端设备在近场通信的卡模拟模式和阅读 器模式下存在多个主机时, 用户能够根据具体需要选择基带处理器或 SIM卡 作为活动主机进行非接触式应用, 使用更加灵活方便。 另外, 如果用户选择 SIM卡作为活动主机, 则终端设备在掉电状态下仍然能够进行近场通信, 进 一步满足了用户需求。
附图概述
图 1为现有的 NFC应用方式框图;
图 2为现有的 eNFC应用方式框图;
图 3为本发明一种实施例的实现主机选择的终端设备结构框图; 图 4为本发明一种实施例的主机选择方法流程图;
图 5为本发明一种实施例的阅读器应用模式下的主机选择方法流程图; 图 6为本发明一种实施例的卡模拟应用模式下的主机选择方法流程图。 本发明的较佳实施方式
以下结合附图对本发明的具体实施方式进行详细说明。
如图 3所示, 本实施方式的终端设备包括基带处理器 10、 智能卡 20、 连 接 RF天线的近场通信模块 30以及指令接收模块 50,并且大多数支持信息安 全认证的终端设备还包括安全认证模块 40。 终端设备包括但不限于 GSM ( Global System for Mobile Communications: 全球移动通讯系统) 、 CDMA ( Code-Division Multiple Access: 码分多址) 、 WCDMA ( Wideband Code Division Multiple Access : 宽 带 CDMA ) 、 TD-SCDMA ( Time Division- Synchronous Code Division Multiple Access: 时分同步的码分多址 ) 、 CDMA2000 (Code Division Multiple Access 2000: 码分多址 2000)、 LTE(Long Term Evolution: 长期演进)、 LTE+等多种制式的手机、 笔记本电脑、 掌上电 脑, 以及其他以上各种制式相组合的多模终端。基带处理器 10主要用于实现 终端设备的数据处理和存储等功能, 智能卡 20可以为 SIM卡、 UIM卡 (User Identity Module: 用户识别模块)、 R-UIM卡 (Removable-User Identity Module: 可移除用户识别模块)、 USIM卡( Universal Subscriber Identity Module: 全球 用户识别模块)、 UICC卡 (Universal Integrated Circuit Card:通用集成电路卡)、 Java卡(使用 Java平台创建的智能卡) 以及由上述卡组合成的卡。
指令接收模块 50可为终端设备提供的人机界面,也可以为终端设备上专 门设置的按键等, 配置为接收用户的主机选择指令, 例如用户可通过终端设 备提供的人机界面选择将基带处理器 10或者智能卡 20作为活动主机。
近场通信模块 30配置为根据指令接收模块 50接收的主机选择指令接受 基带处理器 10或智能卡 20的激活请求,并将请求激活的基带处理器 10或者 智能卡 20设置为活动主机。 活动主机设置完成后, 近场通信模块 30即可作 为活动主机与外部非接触式阅读器或其他形式的外部阅读器、 外部非接触式 标签或其他形式的外部标签之间的代理, 在活动主机的管理下与靠近终端设 备的外部阅读器或外部标签进行近场通信。 近场通信模块 30优选釆用 CLF 芯片 31。
本实施方式的终端设备被设置成阅读器模式时,基带处理器 10或智能卡 20中存在阅读器应用门( Reader Application Gate ) , 近场通信模块 30中存在 阅读器射频门( Reader RF Gate )。 Reader Application Gate与对应的 Reader RF Gate之间建立数据传输通道, 能够在近场通信过程中进行数据传输。 活动主 机的选择过程中, 指令接收模块 50接收用户的主机选择指令后, 如图 3所示 的点划线所示, 指令接收模块 50与主机选择指令所选择的基带处理器 10或 智能卡 20进行数据交互,基带处理器 10或智能卡 20中的 Reader Application Gate根据近场通信国际标准的规定向近场通信模块 30中的 Reader RF Gate 发起激活请求事件( EVT— ERADER— REQUEST ) , 使近场通信模块 30将发 起激活请求事件的基带处理器 10或者智能卡 20设置为活动主机。
阅读器模式下, 对于大部分具有安全认证功能的终端设备, 如果设置基 带处理器 10为活动主机,则安全认证模块 40配置为在近场通信模块 30与外 部标签进行通讯的过程中, 对外部标签进行安全认证; 如果设置智能卡 20为 活动主机, 则智能卡 20还配置为在近场通信模块 30与外部标签进行通讯的 过程中, 对外部标签进行安全认证。
本实施方式的终端设备被设置成卡模拟模式时,近场通信模块 30预先提 供应用程序编程接口(API接口), 指令接收模块 50接收用户的主机选择指令 后, 如图 3所示的虚线所示, 指令接收模块 50与近场通信模块 30进行数据 交互, API接口根据主机选择指令通知近场通信模块 30某一个基带处理器 10 或智能卡 20请求激活,使近场通信模块 30将请求激活的基带处理器 10或者 智能卡 20设置为活动主机。
对应地, 卡模拟模式下, 对于大部分具有安全认证功能的终端设备, 如 果设置基带处理器 10为活动主机, 则安全认证模块 40配置为在近场通信模 块 30与外部阅读器进行通讯的过程中, 对外部阅读器进行安全认证; 如果设 置智能卡 20为活动主机,则智能卡 20还配置为在近场通信模块 30与外部阅 读器进行通讯的过程中, 对外部阅读器进行安全认证。 无论卡模拟模式还是阅读器模式下, 用户都可通过终端设备提供的人机 界面等, 根据具体需要灵活选择终端设备中的基带处理器 10或智能卡 20作 为当前的活动主机,从而管理近场通信模块 30与靠近终端设备的外部非接触 式阅读器或外部非接触式标签实现数据业务的近场通信。
如图 4所示, 本发明提供的一种终端设备的近场通信实现方法中, 实现 主机选择的方法主要包括以下步骤:
S400: 终端设备接收用户的主机选择指令, 例如用户可通过终端设备提 供的人机界面输入选择将基带处理器 10或者智能卡 20作为活动主机, 也可 通过终端设备上专门设置的按键进行选择。 如果终端设备中存在多个智能卡 20, 用户还可通过人机界面等选择其中的某一个智能卡 20作为活动主机。
S401 : 终端设备根据用户的主机选择指令请求激活基带处理器 10或智能 卡 20,近场通信模块 30将请求激活的基带处理器 10或者智能卡 20设置为活 动主机。 按照目前近场通信技术的通用国际标准, 终端设备工作在阅读器模 式下和卡模拟模式下时激活活动主机的具体方法有所不同。在阅读器模式下, 基带处理器 10或智能卡 20中的 Reader Application Gate向近场通信模块 30 中的 Reader RF Gate发起激活请求事件,近场通信模块 30将发起激活请求事 件的基带处理器 10或者智能卡 20设置为活动主机。 在卡模拟模式下, 近场 通信模块 30预先提供 API接口,终端设备通过该 API接口通知近场通信模块 30基带处理器 10或智能卡 20请求激活,近场通信模块 30将请求激活的基带 处理器 10或智能卡 20设置为活动主机。
对于存在多个智能卡 30的终端设备,终端设备根据主机选择指令请求激 活步骤 S401选择的智能卡 20, 并将该被选择的智能卡 20设置为活动主机。
S402: 活动主机管理终端设备与外部阅读器或外部标签进行通讯, 当终 端设备在阅读器模式下时, 活动主机管理近场通信模块 30打开 RF场开始检 测外部标签,并通过活动主机与近场通信模块 30之间专门的虚拟数据通道实 现数据传输; 当终端设备在卡模拟模式下时, 当近场通信模块 30检测到一个 RF场后, 通过活动主机与近场通信模块 30之间专门的虚拟数据通道实现数 据传递。
由于大多数近场通信技术都需要利用安全认证机制保证用户的信息安 全, 因此本步骤还可进一步包括安全认证。
具体地, 阅读器模式下, 对外部标签进行安全认证的方式为: 当设置基 带处理器 10为活动主机时, 通过终端设备中的安全认证模块 40实现安全认 证; 当设置智能卡 20为活动主机时, 通过该智能卡 20进行安全认证以及其 他应用。
卡模拟模式下, 对外部阅读器进行安全认证的方式为: 当设置基带处理 器 10为活动主机时, 通过终端设备中的安全认证模块 40进行安全认证; 当 设置智能卡为活动主机时, 通过该智能卡 20进行安全认证以及其他应用。
为了避免当前选择的活动主机正处于工作状态, 即近场通信过程中, 用 户又通过主机选择指令选择另一个活动主机而导致的冲突, 终端设备可拒绝 执行该主机选择指令, 具体地, 终端设备还可通过人机界面提示用户当前已 存在活动主机, 必须先停止该活动主机的阅读器应用或者模拟卡应用再设定 新的活动主机。 当然, 也可在活动主机处于工作状态时, 直接在人机界面上 屏蔽相关选项以拒绝接收用户的主机选择指令。
S403: 终端设备与外部阅读器或外部标签完成通讯后, 自动释放活动主 机, 回到无活动主机状态等待用户的再次选择, 还可返回到缺省设置的活动 主机。
由于卡模拟模式中的终端设备通常处于被动状态, 为了保证外部阅读器 能够顺利读取终端设备中的数据,终端设备在接收用户的主机选择指令之前、 自动释放活动主机之后等待通过主机选择指令设置活动主机的状态下, 可将 基带处理器 10或智能卡 20中的一个缺省设置为活动主机。 缺省设置活动主 机后, 如果用户通过主机选择指令选择的主机与缺省设置的活动主机完全相 同, 则终端设备无需重新设置该主机为活动主机, 否则按照图 4所示的步骤 切换活动主机。
如图 5所示, 本发明一种实施例的手机在阅读器模式下选择 SIM卡 21 为活动主机的流程包括以下步骤:
S500: 在阅读器模式下, 当 CLF芯片 31为 SIM卡 21上电后, SIM卡 21与 CLF芯片 31之间釆用单线协议建立物理层和数据层的通信, SIM卡 21 获取 CLF芯片 31中存在的 Reader RF Gate 32, 并建立和打开 SIM卡 21中 Reader Application Gate 22与 CLF芯片 31中对应的 Reader RF Gate 32之间的 数据传输通道;与此同时,基带处理器 10建立和打开其中的 Reader Application Gate 与 CLF芯片 31中对应的 Reader RF Gate 32之间的数据传输通道。 此时 由于阅读器模式中的终端设备通常处于主动状态, 可以不设置缺省的活动主 机, 即保持无活动主机状态, 当手机需要开始阅读器应用时, 由用户选择活 动主机。
S501 :用户从手机的人机界面 51上选择某一 SIM卡 21作为活动主机后, 人机界面 51通知 SIM卡 21。 如果手机存在多个 SIM卡 21 , 则人机界面 51 通知用户选择其中的某一个 SIM卡 21。
S502: SIM卡 21 中的 Reader Application Gate 22发起激活请求事件 EVT— READER— REQUEST给 CLF芯片 31中的 Reader RF Gate 32 ,表明该 SIM 卡 21 请求激活, 本步骤的激活发起方式目前已经规定在近场通信国际标准 中。
S503: CLF芯片 31将 SIM卡 21设置为活动主机,还可将设置结果反馈 给人机界面 51供用户观看。
S504: CLF芯片 31检测到靠近手机的外部非接触式标签 60, 并读取标 签信息。
S505 : CLF 芯片 31 中的 Reader RF Gate 32 发送标签检测消息 EVT— TARGET— DISCO VERED给 SIM卡 21中的 Reader Application Gate 22 , 用于通知 Reader Application Gate 22已经检测到外部非接触式标签 60。
S506: SIM卡 21 中的 Reader Application Gate 22发送数据读写消息 WR— XCHG— DATA给 CLF芯片 31中的 Reader RF Gate 32 , 接着 , CLF芯片 31中的 Reader RF Gate 32返回响应消息 ANY— OK到 SIM卡 21 , 从而完成 SIM卡 21与外部非接触式标签 60之间的数据通讯, 该步骤可以重复多次。
S507: 数据通讯完成之后, SIM卡 21中的 Reader Application Gate 22发 送阅读结束消息 EVT— END— OPERATION给 CLF芯片 31 , 提示 CLF芯片 31 关闭 RF场。 S508: SIM卡 21接收 CLF芯片 31成功关闭 RF场的消息, 并释放活动 主机。
S509: CLE 芯片 31恢复无活动主机状态, 等待下次手机开始阅读器应 用时由用户再次选择活动主机。
手机在阅读器模式下, 如果用户选择基带处理器 10为活动主机, 则具体 选择步骤与以上流程完全类似,只需将 SIM卡 21中的 Reader Application Gate 22替换成基带处理器 10中的 Reader Application Gate与 CLF芯片 31 中的 Reader RF Gate 32进行数据交互。
本实施方式中, 当一个活动主机处于工作状态时, 用户可能会发出主机 选择指令请求激活另一个活动主机从而导致冲突。 这种情况下, 为了保证数 据通讯的正常进行, 终端设备可以拒绝后一个主机选择指令, 提示用户当前 的活动主机正在工作, 还可由用户选择是否停止当前活动主机的阅读器应用 并切换活动主机。 例如当用户已选择了基带处理器 10作为活动主机, 在近场 通信进行过程中再次选择了基带处理器 10作为活动主机,则终端设备可以拒 绝该请求, 提示用户当前的活动主机正在工作, 并由用户选择是否停止当前 活动主机的阅读器应用。
另一种实施例中, 为了防止活动主机的选择冲突, 如果用户选择的活动 主机已被激活并开始工作, 可以屏蔽人机界面上的选择项, 直到终端设备释 放活动主机后, 人机界面才提供活动主机的选择项。
如图 6所示, 本发明一种实施例的手机在卡模拟应用模式下选择 SIM卡
21作为活动主机的流程包括以下步骤:
步骤 S600: 在卡模拟模式下, 当 CLF芯片 31给 SIM卡 21上电后, SIM 卡 21和 CLF芯片 31之间釆用单线协议建立物理层和数据层的通信, SIM卡 21获取 CLF芯片 31中的 Card RF Gate 32, 建立和打开 SIM卡 21中的 Card Application Gate 22与 CLF芯片 31中对应的 Card RF Gate 32之间的数据传输 通道; 与此同时,基带处理器 10建立和打开其中的 Reader Application Gate 与 CLF芯片 31中对应的 Reader RF Gate 32之间的数据传输通道。 此时可以不 设置缺省的活动主机, 即保持无活动主机状态, 当然, 也可预先设置缺省的 活动主机为 SIM卡 21或者基带处理器 10, 同时还可以在人机界面 51上显示 缺省的活动主机。
步骤 S601 :用户从人机界面 51上选择某一 SIM卡 21作为新的活动主机, 手机利用 CLF芯片 31预先提供的 API接口, 通过调用 API函数通知 CLF芯 片 31 SIM卡 21请求激活。
步骤 S602: CLF芯片 31设置 SIM卡 21为活动主机, 还可将设置结果 反馈给人机界面 51供用户观看。
例如一种实施方式中, CLF 芯片 31 提供给手机的 API 函数定义为 SetActiveHost ( ),该函数包含一个变量 Host ID(主机 ID ) ,可预设 Host ID 的 值为 "01" 表示选择基带处理器 10为活动主机, Host ID 的值为 "02" 表示 选择 SIM卡 21为活动主机。 用户通过人机界面 51选择活动主机后, 手机内 部将调用 API函数, CLF芯片 31根据 Host ID的值设置活动主机。 当 CLF芯 片 31获取 SetActiveHost ( )函数的 Host ID时, 还可首先判断 Host ID的值是 否与当前的活动主机对应的 Host ID的值相同,如果相同表示无需切换活动主 机, 可以不作任何后续处理; 如果不同, 则切换获取的 Host ID所对应的主机 为活动主机。
设置完成后, CLF芯片 31还可向手机提供返回信息, 如果切换成功或者 无需切换则可返回信息为 TRUE (真) , 手机在人机界面 51上显示新的活动 主机; 如果由于某种原因设置新的活动主机失败则返回信息为 FALSE (假), 手机在人机界面 51上显示选择失败。
步骤 S603: CLF芯片 31检测到靠近手机的一个外部 RF场。
步骤 S604: CLF 芯片 31 中的 Card RF Gate 33 发送标签检测消息 EVT— FIELD— ON给 SIM卡 31中的 Card Application Gate 32,表示已经检测到 外部非接触式阅读器 70提供的 RF场。
步骤 S605: CLF芯片 31中的 Card RF Gate 33激活后, 发送激活通知消 息 EVT— CARD— ACTIVATED给 SIM卡 21中的 Card Application Gate 23 , 通 知 SIM卡 21 CLF芯片 31已经激活,可以开始交换应用协议数据单元( APDU: Application Protocol Data Unit )命令。
步骤 S606: CLF芯片 31中的 Card RF Gate 33将来自外部非接触式阅读 器 70的 APDU命令通过数据传送消息 EVT— SEND— DATA转送给 SIM卡 21 中的 Card Application Gate 23 , SIM卡 21中的 Card Application Gate 23通过 数据传送消息 EVT— SEND— DATA进行回复,从而完成 SIM卡 21与外部非接 触式阅读器 70之间的数据通讯, 该步骤可以重复多次。
步骤 S607: 当外部非接触式阅读器 70不再提供 APDU命令时, 表明手 机已经完成卡模拟应用, CLF芯片 31中的 Card RF Gate 33发送激活关闭消 息 EVT CARD DEACTIVED给 SIM卡 21中的 Card Application Gate 23通知 数据交互结束。
步骤 S608: 当 CLF芯片 31检测到外部非接触式阅读器 70的 RF场关闭 时, Card RF Gate 33发送卡模拟结束消息 EVT— FIELD— OFF给 SIM卡 21中 的 Card Application Gate 23 , 如果手机处于低电量或关机状态时, 可不发送此 消息。
步骤 S609: 本次非接触式卡模拟应用完成, 手机自动释放活动主机并且 通知 CLF芯片 31。
步骤 S610: CLF芯片 31可恢复设置基带处理器 10为活动主机。
手机在卡模拟模式下, 如果用户选择基带处理器 10为活动主机, 则具体 选择步骤与以上流程完全类似,只需将 SIM卡 21中的 Card Application Gate 32 替换成基带处理器 10中的 Card Application Gate与 CLF芯片 31中的 Card RF Gate 32进行数据交互。
本发明使终端设备在近场通信的卡模拟模式和阅读器模式下存在多个主 机时, 能够根据具体需要选择活动主机进行非接触式应用, 使用更加灵活方 便。
无论阅读器模式还是卡模拟模式, 当 SIM卡 21或其他形式的智能卡 20 充当活动主机管理 CLF芯片 31进行近场通信时, CLF芯片 31和智能卡 20 能够通过射频天线获取能量, 保证在终端设备电量不足或者没电的情况下也 能进行卡模拟, 即能够支持掉电状况下的近场通信, 进一步满足了用户需求。
以上内容是结合具体的优选实施方式对本发明所作的进一步详细说明, 不能认定本发明的具体实施只局限于这些说明。 对于本发明所属技术领域的 普通技术人员来说, 在不脱离本发明构思的前提下, 还可以做出若干简单推 演或替换, 都应当视为属于本发明的保护范围。
工业实用性
本发明的技术方案实现了终端设备在近场通信的卡模拟模式和阅读器模 式下存在多个主机时, 用户能够根据具体需要选择基带处理器或 SIM卡作为 活动主机进行非接触式应用, 使用更加灵活方便。 另外, 如果用户选择 SIM 卡作为活动主机, 则终端设备在掉电状态下仍然能够进行近场通信, 进一步 满足了用户需求。

Claims

权 利 要 求 书
1、 一种终端设备的近场通信实现方法, 终端设备包括基带处理器、 智能 卡和近场通信模块, 所述方法包括以下步骤:
终端设备接收主机选择指令;
终端设备根据所述主机选择指令请求激活基带处理器或智能卡, 并将所 述请求激活的基带处理器或智能卡设置为活动主机; 以及
所述活动主机管理终端设备与外部阅读器或外部标签进行近场通信。
2、 根据权利要求 1所述的方法, 其中, 当终端设备被设置成阅读器模式 时, 所述终端设备根据所述主机选择指令请求激活基带处理器或智能卡, 并 将所述请求激活的基带处理器或智能卡设置为活动主机的步骤包括:
基带处理器或智能卡中的阅读器应用门向近场通信模块中的阅读器射频 门发起激活请求事件, 近场通信模块将所述发起激活请求事件的基带处理器 或智能卡设置为活动主机。
3、 根据权利要求 1所述的方法, 其中, 当终端设备被设置成卡模拟模式 时, 所述终端设备根据所述主机选择指令请求激活基带处理器或智能卡, 并 将所述请求激活的基带处理器或智能卡设置为活动主机的步骤包括:
近场通信模块预先提供应用程序编程接口, 终端设备通过所述应用程序 编程接口通知近场通信模块所述基带处理器或智能卡请求激活, 近场通信模 块将所述请求激活的基带处理器或智能卡设置为活动主机。
4、 根据权利要求 2或 3所述的方法, 还包括: 在所述近场通信完成后, 终端设备自动释放活动主机。
5、 根据权利要求 2或 3所述的方法, 还包括: 在所述近场通信过程中, 如果终端设备再次接收主机选择指令, 则终端设备拒绝执行所述再次接收的 主机选择指令。
6、 根据权利要求 2或 3所述的方法, 其中, 终端设备通过人机界面来接 收主机选择指令。
7、 根据权利要求 2所述的方法, 还包括: 在所述近场通信过程中, 当设置基带处理器为活动主机时, 通过所述终端设备中的安全认证模块 对外部标签进行安全认证;
当设置智能卡为活动主机时,通过所述智能卡对外部标签进行安全认证。
8、 根据权利要求 3所述的方法, 还包括: 在所述近场通信过程中, 当设置基带处理器为活动主机时, 通过所述终端设备中的安全认证模块 对外部阅读器进行安全认证;
当设置智能卡为活动主机时, 通过所述智能卡对外部阅读器进行安全认 证。
9、 根据权利要求 3所述的方法, 还包括: 当终端设备未通过主机选择指 令设置活动主机时, 将所述基带处理器或智能卡中的一个缺省设置为活动主 机。
10、 根据权利要求 2或 3所述的方法, 还包括: 如果终端设备中存在多 个智能卡, 且所述主机选择指令选择其中一个智能卡, 则终端设备根据所述 主机选择指令请求激活所述被选择的智能卡, 并将所述被选择的智能卡设置 为活动主机。
11、 一种与外部阅读器或外部标签实现近场通信的终端设备, 包括基带 处理器、 智能卡和连接天线的近场通信模块, 并且还包括指令接收模块; 其 中,
所述指令接收模块配置为接收主机选择指令;
所述近场通信模块配置为根据所述主机选择指令接受基带处理器或智能 卡的激活请求, 并将所述请求激活的基带处理器或智能卡设置为活动主机; 所述基带处理器或智能卡配置为在被设置为活动主机后, 管理所述近场 通信模块与所述外部阅读器或外部标签进行近场通信。
12、 如权利要求 11所述的终端设备, 其中, 当终端设备被设置成阅读器 模式时, 基带处理器或智能卡中设有阅读器应用门, 近场通信模块中设有阅 读器射频门;
所述阅读器应用门配置为向所述阅读器射频门发起激活请求事件, 使近 场通信模块将发起所述激活请求事件的基带处理器或智能卡设置为活动主 机。
13、 如权利要求 11所述的终端设备, 其中, 当终端设备被设置成卡模拟 模式时, 近场通信模块预先提供应用程序编程接口;
所述应用程序编程接口被用来通知近场通信模块所述基带处理器或智能 卡请求激活, 使近场通信模块将所述请求激活的基带处理器或智能卡设置为 活动主机。
PCT/CN2010/074866 2010-02-23 2010-06-30 终端设备的近场通信实现方法及实现近场通信的终端设备 WO2011103734A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2010101152342A CN102163995A (zh) 2010-02-23 2010-02-23 终端设备的近场通信实现方法及实现近场通信的终端设备
CN201010115234.2 2010-02-23

Publications (1)

Publication Number Publication Date
WO2011103734A1 true WO2011103734A1 (zh) 2011-09-01

Family

ID=44464998

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2010/074866 WO2011103734A1 (zh) 2010-02-23 2010-06-30 终端设备的近场通信实现方法及实现近场通信的终端设备

Country Status (2)

Country Link
CN (1) CN102163995A (zh)
WO (1) WO2011103734A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103902952A (zh) * 2014-04-23 2014-07-02 武汉恒达智慧城市交通研发有限公司 一种基于nfc对地磁传感器进行身份识别的方法
CN104102939A (zh) * 2014-07-15 2014-10-15 陈业军 一种基于hce的nfc系统

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102646184B (zh) * 2012-05-04 2014-10-22 上海天臣防伪技术股份有限公司 一种利用nfc手机读取iso15693标签的方法
CN102811376B (zh) * 2012-07-04 2016-06-22 深圳Tcl新技术有限公司 激活电视机应用的方法、系统和电视机
EP2722790B1 (en) * 2012-10-18 2015-07-29 ST-Ericsson SA Coexistence of RF barcodes and other NFC devices
US9603090B2 (en) * 2013-08-08 2017-03-21 Apple Inc. Management of near field communications using low power modes of an electronic device
CN104753550B (zh) * 2013-12-30 2017-06-20 中国移动通信集团公司 一种无线通讯终端和数据处理方法
CN105530033B (zh) * 2014-09-28 2018-08-28 中国移动通信集团公司 一种非接触通信的实现方法及装置
CN204537224U (zh) * 2015-02-11 2015-08-05 深圳市文鼎创数据科技有限公司 一种nfc支付装置
CN106330267B (zh) * 2016-08-22 2020-11-20 广州易尊网络科技股份有限公司 移动终端及基于近场通信的开卡方法
CN107315609B (zh) * 2017-06-22 2020-09-08 北京小米移动软件有限公司 卡模拟功能的切换方法及装置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1739083A (zh) * 2003-01-17 2006-02-22 3M创新有限公司 触摸模拟系统和方法
CN101159008A (zh) * 2006-10-05 2008-04-09 英赛康特雷斯公司 近场通信芯片组通信接口和主处理器之间相互认证的方法
EP1912180A2 (en) * 2006-10-12 2008-04-16 Honeywell International Inc. Method and system for controlling a security system using near field communication
US20080109903A1 (en) * 2006-11-07 2008-05-08 Spansion Llc Secure co-processing memory controller integrated into an embedded memory subsystem

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1739083A (zh) * 2003-01-17 2006-02-22 3M创新有限公司 触摸模拟系统和方法
CN101159008A (zh) * 2006-10-05 2008-04-09 英赛康特雷斯公司 近场通信芯片组通信接口和主处理器之间相互认证的方法
EP1912180A2 (en) * 2006-10-12 2008-04-16 Honeywell International Inc. Method and system for controlling a security system using near field communication
US20080109903A1 (en) * 2006-11-07 2008-05-08 Spansion Llc Secure co-processing memory controller integrated into an embedded memory subsystem

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103902952A (zh) * 2014-04-23 2014-07-02 武汉恒达智慧城市交通研发有限公司 一种基于nfc对地磁传感器进行身份识别的方法
CN104102939A (zh) * 2014-07-15 2014-10-15 陈业军 一种基于hce的nfc系统

Also Published As

Publication number Publication date
CN102163995A (zh) 2011-08-24

Similar Documents

Publication Publication Date Title
WO2011103734A1 (zh) 终端设备的近场通信实现方法及实现近场通信的终端设备
US10419997B2 (en) Communication apparatus, communication apparatus control method, and program
US8630585B2 (en) Method and apparatus for communicating with external interface device using contactless
TWI486004B (zh) 近場通訊裝置、通訊裝置及用於近場通訊裝置的方法
US11200561B2 (en) NFC service processing method, terminal, and NFC chip
EP2775739B1 (en) Near-field communications and routing
KR20140086871A (ko) 정보처리장치, 그 제어방법, 및 기록매체
JP5828772B2 (ja) 通信装置、制御方法およびプログラム
WO2021223672A1 (zh) 近场通信nfc通信方法、装置及电子设备
CN103856245A (zh) 控制能够实现近场通信的移动通信设备中的操作的方法及系统
CN103370954A (zh) 具有近场通信(nfc)设备并且提供记忆擦除的移动无线通信设备和相关方法
WO2013037153A1 (zh) 一种管理rfid卡片的方法及终端
EP2568407B1 (en) Method and system for communicating with and programming a secure element
CN102968864B (zh) 一种基于nfc的开机控制方法、装置及终端
CN114462560B (zh) 一种模拟卡的切换方法、电子设备和通信系统
WO2015184818A1 (zh) 一种终端连接无线接入点的方法及相应终端、无线接入点
WO2010105458A1 (zh) 增强型近距离无线通信装置及其实现方法
EP2996256A1 (en) Method, device and system for controlling nfc radio frequency communication
WO2010022642A1 (zh) eNFC移动终端及其电子支付控制方法
CN102567770A (zh) 一种智能卡及一种pos终端
CN103869996B (zh) 一种基于nfc的安全便捷型虚拟键盘装置
CN115442780A (zh) 一种基于nfc的数据交互方法及设备
EP4145875A1 (en) Smart card sharing method, electronic device, and computer-readable storage medium
CN108510038A (zh) 智能卡的控制方法、智能卡和计算机存储介质
CN102957794A (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: 10846357

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: 10846357

Country of ref document: EP

Kind code of ref document: A1